Post by Zanato » Fri Apr 08, 2022 1:36 am

OC 3.0.3.8

When you save a HTML Content module, line breaks and returns are saved in the database as...

Code: Select all

\\r\\n
But, if you export your table (System>Maintenance>Backup/Restore), the first of the \'s will be stripped and you get...

Code: Select all

\r\n


On restoring this will break things.

Seems to only happen with the HTML module and not linebreaks in descriptions.

New member

Posts

Joined
Fri Oct 04, 2013 4:58 am
Location - Dublin, Ireland

Post by mikeinterserv » Fri Apr 08, 2022 1:52 am

Zanato wrote:
Fri Apr 08, 2022 1:36 am
OC 3.0.3.8

When you save a HTML Content module, line breaks and returns are saved in the database as...

Code: Select all

\\r\\n
But, if you export your table (System>Maintenance>Backup/Restore), the first of the \'s will be stripped and you get...

Code: Select all

\r\n


On restoring this will break things.

Seems to only happen with the HTML module and not linebreaks in descriptions.
addslashes and stripslashes are escape functions of php.
https://www.php.net/manual/en/function.addslashes.php

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Fri Apr 08, 2022 1:53 am

Do not use the restore feature in OC. Rather use PHPMyAdmin or an extension such as this one: https://www.opencart.com/index.php?rout ... sion_id=17

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Fri Apr 08, 2022 1:55 am

straightlight wrote:
Fri Apr 08, 2022 1:53 am
Do not use the restore feature in OC. Rather use PHPMyAdmin or an extension such as this one: https://www.opencart.com/index.php?rout ... sion_id=17
phpMyAdmin is by far the most reliable, with other Pro DB management tools.
Personally I would not rely on an extension.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Fri Apr 08, 2022 2:45 am

mikeinterserv wrote:
Fri Apr 08, 2022 1:55 am
straightlight wrote:
Fri Apr 08, 2022 1:53 am
Do not use the restore feature in OC. Rather use PHPMyAdmin or an extension such as this one: https://www.opencart.com/index.php?rout ... sion_id=17
phpMyAdmin is by far the most reliable, with other Pro DB management tools.
Personally I would not rely on an extension.
Both suggestions have been provided for backup and restoration purposes. As of the use of the extensions and their purpose, extension developers can be contacted for more information.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Fri Apr 08, 2022 4:28 am

Zanato wrote:
Fri Apr 08, 2022 1:36 am
OC 3.0.3.8

When you save a HTML Content module, line breaks and returns are saved in the database as...

Code: Select all

\\r\\n
But, if you export your table (System>Maintenance>Backup/Restore), the first of the \'s will be stripped and you get...

Code: Select all

\r\n


On restoring this will break things.

Seems to only happen with the HTML module and not linebreaks in descriptions.
Looks like a bug with the backup function. The reason it happens with the HTML module and not descriptions is because the HTML module also JSON encodes and the description don't. The bug messes up the JSON encoded data.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Zanato » Fri Apr 08, 2022 4:15 pm

Thanks for the replies folks. I normally use PHPMyAdmin but the native Backup/Restore is handy for quickly moving updates from the development to live site. I'm simply reporting the bug is all.

New member

Posts

Joined
Fri Oct 04, 2013 4:58 am
Location - Dublin, Ireland

Post by Lorigarris » Thu May 12, 2022 2:59 pm

When editing an HTML Content module, if changes are made in the code view and then the module is saved while still in code view, the changes are not saved.
DQFanSurvey
In order to make the changes stay, the changes need to either be made in the regular view, or made in the code view, and then the code view needs to be toggled off before saving.

Newbie

Posts

Joined
Thu May 12, 2022 2:49 pm
Who is online

Users browsing this forum: No registered users and 4 guests