Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

What the \\\\\\ is going on? (2nd try)
 
Solar Frenzy
Member
 
Avatar
Total Posts:  48
Joined:  2007-09-05
London
 

I tried to post this before, wrote a long post but now it’s lost.

Long story short, I’m trying to edit the CMS pages but each time I hit “Save page” something/ somehow enters a \ before each “ or ‘ so I end up with something like - <div class=\\\"col-left side-col\\\">

In general, I cannot edit any CMS files at all and now the site has errors all over it.

I used FF (MacOSX) but also tried in Safari, same problem.

Solution?

Anyone know where I might find this file so I can manually change it on the server?

the shop is tottaly knackered like this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

hm.. i would suggest that for some reason magic_quotes_gpc didn’t get turned off..

Please try to find this setting in your php.ini and set it to Off.

You might also try phpinfo() or get_magic_quotes_gpc() to check the status

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solar Frenzy
Member
 
Avatar
Total Posts:  48
Joined:  2007-09-05
London
 

spot on, I got this result from the phpinfo file:

magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

I’ve asked the host to sort this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Cool, didn’t think that would happen, will put additional safeguard in next release

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solar Frenzy
Member
 
Avatar
Total Posts:  48
Joined:  2007-09-05
London
 
Moshe - 06 September 2007 06:24 AM

will put additional safeguard in next release

which will be ...?

in the meantime I’m re-uploading the app/code/core/Mage/Admin and AdminHTML folder/ contents. will this restore everything or is this a case of hacking the DB?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

as long as you do not touch the `core_resource` table, the database structure won’t be touched by the code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Something like this:

function StripMagicQuotes($arr{
         
foreach ($arr as $k => $v$arr[$k] is_array($v) ? StripMagicQuotes($v) : stripslashes($v);
         return 
$arr;
}

if (get_magic_quotes_gpc()) {
        
if (!empty($_GET)) $_GET StripMagicQuotes($_GET);
        if (!empty(
$_POST)) $_POST StripMagicQuotes($_POST);
        if (!empty(
$_REQUEST)) $_REQUEST StripMagicQuotes($_REQUEST);
        if (!empty(
$_COOKIE)) $_COOKIE StripMagicQuotes($_COOKIE);
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Solar Frenzy
Member
 
Avatar
Total Posts:  48
Joined:  2007-09-05
London
 

sorry ... where would that go?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

for now the simplest would be to put it in index.php before

require 'app/Mage.php';
Mage::run('base');
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Sorry, if you have multiple index.php, it should be in app/Mage.php right after the notice of license.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solar Frenzy
Member
 
Avatar
Total Posts:  48
Joined:  2007-09-05
London
 

man, what a nightmare!!

I couldn’t get in anywhere, front or back page but luckily I had the dodgy page cached so I just installed all the changes you suggested and then sorted the cached code.
Thankfully it all worked.

Thanks loads for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top