Forums / General Questions / Unwanted code/text on my pages

Unwanted code/text on my pages

Started by avaadorn on 13 Jul 2014, 1:55 PM · Views: 944

Results 1 to 16 of 16
13 Jul 2014, 1:55 PM
#1
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Unwanted code/text on my pages

Hi, I have unwanted code showing up on my website as well and I'm not sure what files to edit to fix it. Would someone point me in the right direction? I've found it in 2 instances. You can see it here:

http://www.avaadorn.com/index.php?main_page=product_reviews&products_id=409

To the left of the image, there is a text link with the model number of the product and it shouldn't be there.

The other instance is on the home page under the main banner image. It says, "Home Ava Adorn". I don't know why that is there. I'm sure it happened during one of my many changes to the site.

I appreciate any help. Thanks.

15 Jan 2015, 9:20 PM
#2
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

I fixed it on the home page. That was a bread crumb issue and also define_main_page.php. Still trying to fix the first problem.

16 Jan 2015, 3:51 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Unwanted code/text on my pages

AvaAdorn:

Hi, I have unwanted code showing up on my website

To the left of the image, there is a text link with the model number of the product and it shouldn't be there.
Somehow your site is adding ```
<br />
<span ...>[modelno]</span>

And, since the product name is also used as title-and-alt-text for images, the extra HTML you've got in there is what's making the display go funny.

Need to determine why you've got the model number added like that in the first place, and take action from there.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jan 2015, 9:28 PM
#4
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

DrByte:

Somehow your site is adding ```
<br />
<span ...>[modelno]</span>

> And, since the product name is also used as title-and-alt-text for images, the extra HTML you've got in there is what's making the display go funny.
> 
> Need to determine why you've got the model number added like that in the first place, and take action from there.

I'm not even sure where to begin. Would this be a stylesheet issue?
16 Jan 2015, 9:58 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Unwanted code/text on my pages

AvaAdorn:

I'm not even sure where to begin. Would this be a stylesheet issue?

The additional information (<span...> etc) is more likely added in the php code.

If you enter your admin panel then go to tools->developers toolkit.

You can search for the text (probably good to search either for something unique in the text described, or one aspect at a time like [modelno]

Using the lower left corner box, enter the text to be searched, select the area(s) to be searched and then select the search button. The results will identify everywhere the text is found in the filetype that was chosen. The lines can be chased down based on in which file(s) they are. If you like you could post the resulting filenames (obscure the admin folder name if it is to be included, such as admin) and perhaps the "trouble" file(s) can be narrowed down. More than likely if that statement is in a folder that is named the same as your template and it is not in an equivalent file without a template folder name (or if the template folder name is template_default) then that file(s) probably should be looked at for how the statement is used and added to the code.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Jan 2015, 10:52 PM
#6
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

I know this may sound basic, but is it perhaps called something other than [modelno]? I did a search for that and it came up with nothing.

17 Jan 2015, 3:31 AM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Unwanted code/text on my pages

AvaAdorn:

I know this may sound basic, but is it perhaps called something other than [modelno]? I did a search for that and it came up with nothing.

Legitimate question. Of course I based my explanation off of what seemed to be straight suggestion and that the entire line was being searched brfore. So [modelno] was a representation of the data presented, not the actual variable. That said though, do you currently or did you have TPP installed? Tabbed products pro I think it is called?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

18 Jan 2015, 8:27 PM
#8
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

mc12345678:

Legitimate question. Of course I based my explanation off of what seemed to be straight suggestion and that the entire line was being searched brfore. So [modelno] was a representation of the data presented, not the actual variable. That said though, do you currently or did you have TPP installed? Tabbed products pro I think it is called?

No, I've never installed that.

18 Jan 2015, 8:31 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Unwanted code/text on my pages

When I don't know what files are affecting something, I use this approach: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jan 2015, 8:32 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Unwanted code/text on my pages

AvaAdorn:

No, I've never installed that.

What plugins do you have installed to your site? Might have been something that either is not up-to-date or is causing this and needs a minor correction added that may be published in the particular thread.

It had been found before that some addins that use jquery do not properly account for something when the photos are displayed and thus adds the model number for some reason to the image... Ie. Similar result as is being seen now on your site.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Jan 2015, 8:57 AM
#11
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Unwanted code/text on my pages

mc12345678:

Legitimate question. Of course I based my explanation off of what seemed to be straight suggestion and that the entire line was being searched brfore. So [modelno] was a representation of the data presented, not the actual variable. That said though, do you currently or did you have TPP installed? Tabbed products pro I think it is called?

It's NOT TPP.. (and I think I've pointed this out before)..

The OPs issue MIGHT BE similar to this:
[http://www.zen-cart.com/showthread.php?209750-Done-v1-6-0-quot-Write-Reviews-quot-Minor-issue-with-model-number-display&highlight=review

](http://www.zen-cart.com/showthread.php?209750-Done-v1-6-0-quot-Write-Reviews-quot-Minor-issue-with-model-number-display&highlight=review)I DISCOVERED the issue because installing and activating TPP ILLUMINATED (but did not CAUSE) the issue..

OP has very modified review pages.. suggest they check them ALL..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Apr 2015, 3:01 PM
#12
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

Do you see any syntax error with this code? I think the error might be here:

if ($product_info->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $product_info->fields['products_model'] . ']</span>';
} else {
$products_model = '';

7 Apr 2015, 5:06 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Unwanted code/text on my pages

AvaAdorn:

Do you see any syntax error with this code? I think the error might be here:

if ($product_info->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $product_info->fields['products_model'] . ']</span>';
} else {
$products_model = '';
Please look at the link I post in the post JUST above yours.. Make your code look like that..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Apr 2015, 5:50 PM
#14
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

DivaVocals:

Please look at the link I post in the post JUST above yours.. Make your code look like that..

Thank you, DivaVocals. That fixed it!

7 Apr 2015, 6:02 PM
#15
avaadorn avatar

avaadorn

Zen Follower

Join Date:
Feb 2012
Posts:
106
Plugin Contributions:
0

Re: Unwanted code/text on my pages

Do you know how to turn off the Model Number on the reviews? If I enter through the reviews page, the model number is turned off. But if I read the review or write a review from the product page, the model number seems to always be displayed. I can't figure out how to turn it off.

8 Apr 2015, 7:08 AM
#16
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Unwanted code/text on my pages

AvaAdorn:

Thank you, DivaVocals. That fixed it!

Sure.. that's why it pays to read the threads for responses 1st..:blush:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.