Post by BeerinaBottle » Mon Jan 19, 2015 10:36 pm

I find that using HTML or a javascript snippet within the information pages does not work. For instance, just putting a simple html table into a page, when viewing this all the formatting is lost and if I go back to the code it has been corrupted. Is there a reason / cure for this?

Real Ales from an Online Beer Shop


New member

Posts

Joined
Wed Feb 12, 2014 11:35 pm
Location - Hull, East Yorkshire

Post by Cue4cheap » Mon Jan 19, 2015 11:03 pm

Have you tried to enter it in 'source' mode?

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by BeerinaBottle » Tue Jan 20, 2015 12:33 am

Yes, it looks fine to begin with, but as I said, when I save and then go back to the code it has been corrupted.

Real Ales from an Online Beer Shop


New member

Posts

Joined
Wed Feb 12, 2014 11:35 pm
Location - Hull, East Yorkshire

Post by onlinemarketer » Tue Jan 20, 2015 9:10 am

paste/screenshot an example of the corruption

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by BeerinaBottle » Fri Jan 23, 2015 2:44 am

onlinemarketer wrote:paste/screenshot an example of the corruption
Once I have entered my HTML, whether this be on an 'Information' page or within an HTML Content Mod, after saving the work and viewing it, it is corrupted. If I go back to view the code this:

<table align="left" border="0" cellpadding="10" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td align="center"><a href="https://www.facebook.com/beersinabottle#" target="_blank"><img alt="Facebook Page" src="http://www.beerinabottle.co.uk/image/da ... cebook.png" style="width: 70px; height: 52px;" /></a></td>
<td align="center"><a href="https://twitter.com/beerinabottle" target="_blank"><img alt="Foolow us on Twitter" src="http://www.beerinabottle.co.uk/image/da ... witter.png" style="width: 70px; height: 52px;" /></a></td>
</tr>
</tbody>
</table>

Ends up as this:

<table style="\"width:" 100%;\"="" align="\"left\"" border="\"0\"" cellpadding="\"10\"" cellspacing="\"1\"">

<tbody>

<tr>

<td align="\"center\""><a href="\"https://www.facebook.com/beersinabottle#\"" target="\"_blank\""><img alt="\"Facebook" page\"="" src="\"http://www.beerinabottle.co.uk/image/da ... cebook.png\"" style="\"width:" 70px;="" height:="" 52px;\"=""></a></td>

<td align="\"center\""><a href="\"https://twitter.com/beerinabottle\"" target="\"_blank\""><img alt="\"Foolow" us="" on="" twitter\"="" src="\"http://www.beerinabottle.co.uk/image/da ... witter.png\"" style="\"width:" 70px;="" height:="" 52px;\"=""></a></td>

</tr>

</tbody>

</table>

Real Ales from an Online Beer Shop


New member

Posts

Joined
Wed Feb 12, 2014 11:35 pm
Location - Hull, East Yorkshire

Post by onlinemarketer » Fri Jan 23, 2015 4:01 am

Looks like all your speech marks are having a slash added - this is normally a server/htaccess issue.

Does the same slashes appear if you use a speech mark on your product title?

Active Member

Posts

Joined
Sat May 14, 2011 8:21 pm

Post by pablopancho » Fri Jan 23, 2015 5:03 pm

This is probably a magic quotes problem as in this topic:
http://forum.opencart.com/viewtopic.php?f=191&t=136206

Long story short: you need to edit .htaccess file and make sure that the following lines are there and they are uncommented:

Code: Select all

php_flag magic_quotes_gpc Off
php_value magic_quotes_gpc Off

Newbie

Posts

Joined
Wed Oct 08, 2014 8:03 pm

Post by BeerinaBottle » Fri Jan 23, 2015 10:30 pm

Thanks for the suggestion, but when I made this change to .htaccess the site was no longer available, pages just came up as 404 errors.

Real Ales from an Online Beer Shop


New member

Posts

Joined
Wed Feb 12, 2014 11:35 pm
Location - Hull, East Yorkshire

Post by pablopancho » Sat Jan 24, 2015 12:08 am

Sorry to hear that. :(
I am a bit out of my depth here but there is also a setting in php.ini regarding magic quotes.
Also, from what I know this issue is a problem in older versions of php and updating your server to the recent version could help. But sometimes we have no control over our hosting so this may be impossible.

As I mentioned in the linked thread, the temporary solution is to avoid putting quotes in source code and deleting them each time you edit content. It is very inconvenient and time consuming though.

Sorry I can't give more solutions :(

Newbie

Posts

Joined
Wed Oct 08, 2014 8:03 pm

Post by BeerinaBottle » Sun Jan 25, 2015 9:13 pm

This issue has now been resolved. After contacting my server hosts they turned off 'magic quotes' for me and that did the trick.

Real Ales from an Online Beer Shop


New member

Posts

Joined
Wed Feb 12, 2014 11:35 pm
Location - Hull, East Yorkshire
Who is online

Users browsing this forum: imnotaprogrammer and 34 guests