Dirty Butter Posted February 25, 2015 Share Posted February 25, 2015 Upgrade from v5.2.16 HAD fully formatted Contact Form document with font colors, sizes, and paragraphs. v6.0.0b6 lost all formatting when I made a slight change and saved. This has happened to me on every beta upgrade, was reported, but CC could not replicate. Need help verifying it's just my install, please. If it is just me, any suggestions? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 25, 2015 Share Posted February 25, 2015 Hopefully you have a backup of the CubeCart_config table, and can get the contents from the 'array' column of the "Contact_Form" record. In the file admin/sources/documents.contact.inc.php, make this edit: Near line 32: Was: $data['description'] = base64_encode(stripslashes($data['description'])); Now: $data['description'] = base64_encode(stripslashes($GLOBALS['RAW']['POST']['contact']['description'])); CubeCart 5 maintains a list of POSTed form names that are exempt from getting sanitized (that would strip out any HTML tags). CubeCart 6 keeps a copy of all the data arriving into CubeCart (GET, POST, COOKIE, REQUEST) in another array, $GLOBALS['RAW']. Then sanitizes everything in the real GET, POST, COOKIE, and REQUEST arrays. Therefore, any code that wants to use the form submissions that involve rich text content will need to use the ['RAW'] copy. The admin Contact Form code does not (yet). Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 25, 2015 Author Share Posted February 25, 2015 I learn almost all my lessons the hard way, Bsmither. I do have a copy of the whole v5 database, so it was easy to replace. After your edit, I was able to make the edit to Contact and keep my formatting.This needs to be added to GitHub - I've made so many goofy requests there - can you do it please, Bsmither? You have great cred there LOL. 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.