Guest HSN_Tom Posted April 24, 2010 Share Posted April 24, 2010 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. Quote Link to comment Share on other sites More sharing options...
Guest HSN_Tom Posted April 24, 2010 Share Posted April 24, 2010 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 ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted April 25, 2010 Share Posted April 25, 2010 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 Here Andrea Quote Link to comment Share on other sites More sharing options...
Guest Classic Crackers Posted April 30, 2010 Share Posted April 30, 2010 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 Here Andrea This didn't work for me. Any other ideas anyone? Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted April 30, 2010 Share Posted April 30, 2010 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 Quote Link to comment Share on other sites More sharing options...
tomoharu Posted May 2, 2010 Share Posted May 2, 2010 Still a problem here, no matter how that line is changed. Quote Link to comment Share on other sites More sharing options...
Guest Citrus Posted May 4, 2010 Share Posted May 4, 2010 Make sure you have 'UTF-8' and not "UTF-8" Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted May 4, 2010 Share Posted May 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
Guest Classic Crackers Posted May 14, 2010 Share Posted May 14, 2010 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! Quote Link to comment Share on other sites More sharing options...
tomoharu Posted May 14, 2010 Share Posted May 14, 2010 Wouldn't matter if I had 398563458967 double quotes, single ones, or none at all. It's still borked. Quote Link to comment Share on other sites More sharing options...
Guest Classic Crackers Posted May 14, 2010 Share Posted May 14, 2010 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.