Jump to content

[PrestaShop] Fatal error in module themeconfigurator: Call to undefined method Tools::purifyHTML()


Recommended Posts

I got this error message below, everytime I save additional new item or after I modified any item in the themeconfigurator

 

"[PrestaShop] Fatal error in module themeconfigurator:
Call to undefined method Tools::purifyHTML()"
 
Can anyone explain what sort of error is this and what should I do to fix it?
 
Regards,
  • Like 1

Share this post


Link to post
Share on other sites

Hi all,

 

thank you for responding to this post and many thanks to Abracambar and resolving this issue by rolling back to previous version as a solution.

 

Today, I would like to update on my own attempt to resolve this issue.

It seems that the latest version of theme configurator (1.1.7) required an upgrade of the prestashop itself to the latest version tha is 1.6.0.9. I was using prestashop version 1.6.0.5 when the problem with themeconfigurator arose.

I just upgraded my prestashop to the latest version (1.6.0.9), and everything is going normal now.

 

So, by this reply, I'd like to conclude that this themeconfigurator problem has been resolved by two ways:

1. by rolling back to themeconfigurator version 1.1.4 for those who still having prestashop version 1.6.0.5

2. by upgrading the prestashop to the version 1.6.0.9 for those who would like to keep updated themeconfigurator version 1.1.7

 

The major differences between prestashop version 1.6.0.5 and 1.6.0.9 is that the latest version has a feature of HTML Purifier while version 1.6.0.5 has not. This explained the fatal error message below

 
"[PrestaShop] Fatal error in module themeconfigurator:
Call to undefined method Tools::purifyHTML()"

 

Have a great day, happy prestashop-ing... :D

 

Best regards

  • Like 1

Share this post


Link to post
Share on other sites

This 2 ways doesn't work forme!

 

I try to desactivate and re-activate the modul but now all the themeconfiguratore as disapear off my front-office!

 

What can i do?

 

I want to say that i have upgrade this module in a  another server that i had in a synology witch is the exact copy of my site (1.6.0.5)

and there is no problem!!

 

How can i be back my theme configurator, please?

 

(sorry for my english) but many peoples in the french section have the same problems!

 

the site is in production, it is a real problem for us!

Share this post


Link to post
Share on other sites

This 2 ways doesn't work forme!

 

I try to desactivate and re-activate the modul but now all the themeconfiguratore as disapear off my front-office!

 

What can i do?

 

I want to say that i have upgrade this module in a  another server that i had in a synology witch is the exact copy of my site (1.6.0.5)

and there is no problem!!

 

How can i be back my theme configurator, please?

 

(sorry for my english) but many peoples in the french section have the same problems!

 

the site is in production, it is a real problem for us!

 

hi dln,

 

I'm sorry to hear your problem hasn't been resolved. I'd love to help, but I already upgrade my prestashop to 1.6.0.9 and I don't intend to revert back to older version since everything is doing well with me now.

Also I'm just a regular user, not prestashop official support member. So, I'm afraid I cannot help you further while you're still using version 1.6.0.5.

But, if by any chance I found the solution, you'll be the first to know.

 

Right now, I may suggest you to try upgrading your prestashop to version 1.6.0.9

Try upgrade using automatic update and read the documentation on how to proceed here:

http://doc.prestashop.com/display/PS16/Automatic+update (English)

or here:

http://doc.prestashop.com/pages/viewpage.action?pageId=11272345 (French)

Share this post


Link to post
Share on other sites

No problem [email protected]

 

It's not your fault and i appreciate your help!

 

But i found a way to resolve this problem

 

I remove the module and install it again and now it works!!

 

You must make again the configuration but all works fine!

 

thanks for help

  • Like 1

Share this post


Link to post
Share on other sites

For me, on my PS 1.6.0.9 (with default-bootstrap theme), Theme configurator 1.1.7 is broken: its tab doesn't appear anymore on the front-end.

I had to uninstall it and downgrade to 1.1.6 and to adjust all my settings again…

 

How may I know wich version of the module will be installed by an update? The "Update" button doesn't say it, and I don't want to have this 1.1.7 version again..

Share this post


Link to post
Share on other sites

For me, on my PS 1.6.0.9 (with default-bootstrap theme), Theme configurator 1.1.7 is broken: its tab doesn't appear anymore on the front-end.

I had to uninstall it and downgrade to 1.1.6 and to adjust all my settings again…

 

How may I know wich version of the module will be installed by an update? The "Update" button doesn't say it, and I don't want to have this 1.1.7 version again..

 

This is strange, as I also use ps 1.6.0.9 and default-bootstrap theme. My theme configurator 1.1.7 is doing very fine and all the tab is there.

 

I have no idea. I suggest that you better ask for a direct support from Prestashop teams.

 

Regards.

Share this post


Link to post
Share on other sites

OK, I really think there is a bug with Theme Configurator 1.1.7 : I just made a brand new fresh installation of PS 1.6.0.9, with vanilla default-bootstrap, then upgraded all modules, and the little tab on the front office is not there anymore (the one with the cog-wheels and settings for colors and fonts, see screenshot below).

[of course, I have set Display Theme Configurator on Yes in the back-office]

kHHz9Qts.jpg

Edited by Orphee (see edit history)

Share this post


Link to post
Share on other sites

I am the owner of an actual brick & mortar store - a retail merchant just going online.

 

I am a total newbie with PrestaShop  and I was having trouble with Theme Configurator also.

I have 16.0.9 PS & TC ver. 1.1.7

 

When adding a photo to Home page, I chose an image from my PC and did the rest.

This is supposed to be an alternative to loading a URL an online location for the image (e.g. Flickr / Photobucket). 

 

But the SAVE button failed with the error "URL not specified"

 

The module itself has a RESET option in its own drop-down menu - which fixed this issue!

 

This might fix the other glitches cited in this thread.       Maybe.     Worth trying, no?

Share this post


Link to post
Share on other sites

 

Hi,

I had the same problem and i have tried both solutions. But I cannot see the images neither use the "Live Configurator".

When I try to update new imagen I have the error: "An error occurred when saving the data."

When I try to use "Live Configurator", it doesn't work at all.

I have the same behavior in the old store (1.6.0.5) and the new one I have created to solve this problem (1.6.0.9).

Any idea about it?

Thx

Share this post


Link to post
Share on other sites

simple fix for now... download a 1.6.0.6 from "old versions" download page on prestashop.  Unzip the zip, go to the modules folder and get the themconfigurator folder.  Ftp into your live 1.6.0.6 store, rename the themeconfigurator folder in the modules folder something else like themeconfigurator_bad and then upload the new themeconfigurator folder.

 

Open the themeconfigurator.php file and change the version from 0.8 or whatever to 10.8 and now the upgrade button will disappear in the modules list for it so you dont re-do the same accident with an update all.

  • Like 1

Share this post


Link to post
Share on other sites

simple fix for now... download a 1.6.0.6 from "old versions" download page on prestashop.  Unzip the zip, go to the modules folder and get the themconfigurator folder.  Ftp into your live 1.6.0.6 store, rename the themeconfigurator folder in the modules folder something else like themeconfigurator_bad and then upload the new themeconfigurator folder.

 

Open the themeconfigurator.php file and change the version from 0.8 or whatever to 10.8 and now the upgrade button will disappear in the modules list for it so you dont re-do the same accident with an update all.

 

Hi, David

 

It's always a good solution by rolling back to previous working version when you experienced problems after updating a module.

 

But...

I wouldn't recommend altering the module version number to a higher level number manually (in php file script) only to ignore the update/upgrade button. This method will make you unable to receive notification for a further upgrade in the future to that module.

 

Actually,  even when an "update it!" button appears, we can still configure the module without updating it to a newer version by selecting "configure" in the dropdown list. You don't necessary to manipulate its current version, you can still use your current version as long as you want and keep ignoring the "update it!" notification.

 

see attached image below...

 

Regards.

 

mod_conf_without_update.jpg

Edited by [email protected] (see edit history)

Share this post


Link to post
Share on other sites

Sure, Aryheru, you are right.

But the annoying version of Theme Configurator is 1.1.7, and the working one is 1.1.6.

1.1.6 is installed, and I want to ignore only 1.1.7.

So if I modify the version number of my installed version to 1.1.7, I will still be able to receive notification for a further upgrade in the future to that module, for example, the 1.1.8, right ?

Share this post


Link to post
Share on other sites

Sure, Aryheru, you are right.

But the annoying version of Theme Configurator is 1.1.7, and the working one is 1.1.6.

1.1.6 is installed, and I want to ignore only 1.1.7.

So if I modify the version number of my installed version to 1.1.7, I will still be able to receive notification for a further upgrade in the future to that module, for example, the 1.1.8, right ?

 

Yeah... that should be okay... and thank you for putting a clear example.

my previous post was only a reminder that changing a module version manually in the script should be done with precaution that other people may plainly take your advice and changing the version higher then latest version availble. That's all.

 

Again, thank you for all of your replies here. They are definitely useful to those having same problem here.

 

Best regards

Share this post


Link to post
Share on other sites

Hi,

 

I'm on Prestashop 1.6.0.5, I just upgraded my theme configurator version directly to 1.1.8 and I do experience the same PurifyHTML issue.

 

Does any one has Prestashop 1.6.0.5 working with 1.1.8 or is it just 1.6.0.9 ?

 

Any suggestions ?

 

Thanks for your updates....

Share this post


Link to post
Share on other sites

Hello,

i edited themeconfigurator.php at line 454 and 593:

 

pSQL(Tools::purifyHTML($content), true)

 

becomes

pSQL($content, true)

Now it seems to work (make a backup of the old file, just in case...)

Thanks will give it a try

Share this post


Link to post
Share on other sites

Hello,

i edited themeconfigurator.php at line 454 and 593:

pSQL(Tools::purifyHTML($content), true)

becomes

pSQL($content, true)

Now it seems to work (make a backup of the old file, just in case...)

 

 

 

oups... i'm french (sorry for my english..). I have the same problems.. I have try but now i have nothing and this message :

[PrestaShop] Fatal error in module themeconfigurator:

syntax error, unexpected ')'

 

:wacko: 

Share this post


Link to post
Share on other sites

 

i think it was a wrong copy and paste. Should be:

line 454:

html = \''.pSQL($content, true).'\'

line 593:

\''.pSQL($content, true).'\',

 

i have that :

 

html = \''.pSQL($content), true).'\'
WHERE id_item = '.(int)Tools::getValue('item_id')
 
and
 
\''.pSQL($content), true).'\',
1)'
))
 
it's ok ?! 
 
i have the same problem...

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
  • 1 month later...
  • 1 year later...
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More