Jump to content

Browser Title problem since 4.3.9 update


Guest HSN_Tom

Recommended Posts

Guest HSN_Tom

Hi all,

Since updating to CubeCart 4.3.9 I have had this little annoying problem which I cannot put my finger on.

When you edit a product (not tried making a new one yet) an entry is automatically put into the Browser title field for seo.

The error reads as follows

<br /> <b>Warning</b>:  htmlentities() expects parameter 2 to be long, string given in <b>/home/useracc/public_html/admin/sources/products/index.inc.php</b> on line <b>960</b><br />

This is something thats not been placed there during the update but something thats automatically being entered upon going in to edit the product. I have deleted the entries from the database directly, cleared my cache and again gone into the same product to edit it, and hey presto its back.

Any ideas anyone, as this could be a killer for SEO if you overlook it :s

Cheers,

Tom.

Link to comment
Share on other sites

Guest HSN_Tom

Ok I have done a little digging and the problem appears to be cause by a recent addition t line 960 in admin/sources/products/index.inc.php

this is what CC 4.3.8 looked like

<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo $results[0]['prod_metatitle']; ?>" /></td>




and this is what CC4.3.9 looks like


<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8"); ?>" /></td>




The problems is coming from the


htmlentities(
 just after the echo there and the 
,"ENT_QUOTES","UTF-8")

just before the php closing tags.

I hope this helps the CC team ;)

Link to comment
Share on other sites

Ok I have done a little digging and the problem appears to be cause by a recent addition t line 960 in admin/sources/products/index.inc.php

this is what CC 4.3.8 looked like

<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo $results[0]['prod_metatitle']; ?>" /></td>




and this is what CC4.3.9 looks like


<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8"); ?>" /></td>




The problems is coming from the


htmlentities(
 just after the echo there and the 
,"ENT_QUOTES","UTF-8")

just before the php closing tags.

I hope this helps the CC team ;)

A bug report and fix had been submitted :yeahhh:

Here

Andrea

Link to comment
Share on other sites

Guest Classic Crackers

Ok I have done a little digging and the problem appears to be cause by a recent addition t line 960 in admin/sources/products/index.inc.php

this is what CC 4.3.8 looked like

<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo $results[0]['prod_metatitle']; ?>" /></td>




and this is what CC4.3.9 looks like


<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8"); ?>" /></td>




The problems is coming from the


htmlentities(
 just after the echo there and the 
,"ENT_QUOTES","UTF-8")

just before the php closing tags.

I hope this helps the CC team :)

A bug report and fix had been submitted :cry:

Here

Andrea

This didn't work for me. Any other ideas anyone?

Link to comment
Share on other sites

Open admin/sources/products/index.inc.php. Find AROUND line 960, this code

<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8"); ?>" /></td>




Unquote "ENT_QUOTES". It should now look like this




<td align="left"><input name="prod_metatitle" type="text" size="35" class="textbox" value="<?php if(isset($results[0]['prod_metatitle'])) echo htmlentities($results[0]['prod_metatitle'],ENT_QUOTES,"UTF-8"); ?>" /></td>

Clear cache and try it, it should work.

Lee

Link to comment
Share on other sites

  • 2 weeks later...
Guest Classic Crackers

The double quotes work for me. I can update products with no error. Here is the bug fix from CC and you can see the UTF-8 has double quotes. http://bugs.cubecart.com/view.php?id=2063

Yes it works now but all previously entered products still have the problem. Newly entered products don't. The only way around it for me is to delete the products and re-enter them!

Link to comment
Share on other sites

Guest Classic Crackers

Wouldn't matter if I had 398563458967 double quotes, single ones, or none at all. It's still borked.

Search the error in google and you'll see that you're not alone!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...