nivar Posted May 12, 2010 Share Posted May 12, 2010 upgraded to the latest version of the cc4 (from cc 4.3.8 to 4.3.9) get this error message on the title tag of the page. <title>Warning: htmlentities() expects parameter 2 to be long, string given in /home/public_html/mystore.com/admin/sources/products/index.inc.php on line 949 - Shoe Store</title> how to fix it? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 upgraded to the latest version of the cc4 (from cc 4.3.8 to 4.3.9) get this error message on the title tag of the page. <title>Warning: htmlentities() expects parameter 2 to be long, string given in /home/public_html/mystore.com/admin/sources/products/index.inc.php on line 949 - Shoe Store</title> how to fix it? Yes here you go. http://bugs.cubecart.com/view.php?id=2063 that should fix it Regards, Andrea Quote Link to comment Share on other sites More sharing options...
Guest groovejuice Posted May 13, 2010 Share Posted May 13, 2010 Upgraded versions a couple of weeks ago - cannot find the code to fix on or near line 957... thnx Quote Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2010 Share Posted May 14, 2010 Upgraded versions a couple of weeks ago - cannot find the code to fix on or near line 957... thnx This is for version 4.3.9 > *if you are getting the error then you need to search for this code* htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8") and change to this... htmlentities($results[0]['prod_metatitle'],ENT_QUOTES,'UTF-8') Regards, Andrea :) Quote Link to comment Share on other sites More sharing options...
WhiteWillowStitching Posted May 24, 2010 Share Posted May 24, 2010 Upgraded versions a couple of weeks ago - cannot find the code to fix on or near line 957... thnx This is for version 4.3.9 > *if you are getting the error then you need to search for this code* htmlentities($results[0]['prod_metatitle'],"ENT_QUOTES","UTF-8") and change to this... htmlentities($results[0]['prod_metatitle'],ENT_QUOTES,'UTF-8') Regards, Andrea I've got the same error but I don't have that line in the code anywhere that I can find nor can notepad, word pad or excel find that coding to replace it so what now? Quote Link to comment Share on other sites More sharing options...
Robsta Posted May 25, 2010 Share Posted May 25, 2010 I've got the same error but I don't have that line in the code anywhere that I can find nor can notepad, word pad or excel find that coding to replace it so what now?Excel? never heard of someone trying to edit PHP files in Excel before... however neither Excel, Notepad or wordpad are designed to edit PHP files, saving them using those applications may cause problems with additional characters being saved/add. Use an editor designed for PHP files, like Crimson Editor to name one. Google for PHP editors. Are you sure you're editing the correct file? Quote Link to comment Share on other sites More sharing options...
Ossie Posted May 25, 2010 Share Posted May 25, 2010 I too have this same problem with V4.3.9. The file I have edited is admin/sources/products/index.inc.php Still have the same problem. is this the correct file and location? Look forward to your help thanks Quote Link to comment Share on other sites More sharing options...
Guest VFR Guy Posted June 2, 2010 Share Posted June 2, 2010 Well, I just started selling CC, and this is my first project - Pretty scary to find such a horrible security issue on my first job! I have looked at the code in index.inc.php, and removed the quotes around the ENT_QUOTES - but this hasn't fixed the issue... In fact, I can rename the index.inc.php file comepltely, and I still get the same error. I'm don't know much about Ioncube, but I suspect the original code is cached somewhere, and is still being used. Quote Link to comment Share on other sites More sharing options...
Robsta Posted June 2, 2010 Share Posted June 2, 2010 Well, I just started selling CC, and this is my first project - Pretty scary to find such a horrible security issue on my first job! I have looked at the code in index.inc.php, and removed the quotes around the ENT_QUOTES - but this hasn't fixed the issue... In fact, I can rename the index.inc.php file comepltely, and I still get the same error. I'm don't know much about Ioncube, but I suspect the original code is cached somewhere, and is still being used.Did you clear the store cache afterwards? 'Rebuild & Recount' menu option. Quote Link to comment Share on other sites More sharing options...
Guest VFR Guy Posted June 2, 2010 Share Posted June 2, 2010 Hi Robsta, Yep... I've tried that... Rebuild & Recount - Clear Cache I'm a sys admin, and I've never come across anything like this... Does cubecart add symlinks to directories? I actually renamed the /admin directory completely, as a sanity test, and it still gives the same error for line 949 of /admin/sources/products/index.inc.php even though the file doesn't even exist there any more! Cubecart havn't been much help so far either, just citing the bugfix again. There must be some sort of caching going on. Google is riddled with search results from other spoiled sites... Steve Quote Link to comment Share on other sites More sharing options...
Guest VFR Guy Posted June 2, 2010 Share Posted June 2, 2010 Problem solved. It's nothing to do with caching... I had a great - if cryptic response from support: If you already stored product with this error message you have to edit and remove it from the meta record area. This really didn't make much sense to me, but it pointed me at the database, where I found the error message had actually embedded into one of the database fields... Any products that are added while this code error exists will inherit the error message into the prod_metatitle field of the CubeCart_Inventory table. The only way to eliminate the problem is to re-edit each product and clear the error message from the Specific Product Meta Data >> Browser Title field. Or just go into MySQL and clear out the crap from all of the records affected... you can do this by: UPDATE prefix_CubeCart_Inventory SET prod_metatitle = '' WHERE prod_metatitle LIKE '%htmlentities%' Where prefix_ = your chosen prefix, and you don't really want to use the word htmlentities in any of your product titles! Steve Quote Link to comment Share on other sites More sharing options...
Guest gennad Posted August 4, 2011 Share Posted August 4, 2011 I was affected by this last year and thought I had manually fixed all the items. Upgraded to 5.0.1 and noticed it is still on at least one item. The option to edit the title is now gone though from the products. Is that sql snippet still correct for running on the v5 database to fix them? 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.