Error 500 when i activate "System - MyShortlist Button" plugin

4 weeks 7 hours ago - 4 weeks 7 hours ago #1 by ARNAUD FRERET
Hello,

I have an Error 500 when i activate "System - MyShortlist Button" plugin
Error happens when "Use Ajax if possible" is activated or not
No change in frontend when i activate "Show Debug" (or "Debug System" and "Error Reporting" to Maximum)
Many thanks for your help (if fix issue need time, i can pay for fixing)
Best regards
Arnaud

System Information
My Shortlist Site 1.9.774
PHP Built On Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Database Type mysql
Database Version 5.5.60-0+deb7u1-log
Database Collation latin1_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.2.11
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.9.0 Stable [ Amani ] 30-October-2018 14:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36

Please Log in or Create an account to join the conversation.

3 weeks 5 days ago #2 by Christopher Mavros
Hello Arnaud and thank you for posting.
There are two main reasons that this may happen:
1) If your site has invalid HTML (mainly unclosed tags) (or)
2) If your site has <script> tags with MASSIVE html tags in it.

MyShortlist uses PHP's DOMDocument to analyze the page structure and locate where to add MyShortlist buttons using XPath. The DOMDocument's loadHTML/saveHTML function pair fails with HTML tags inside <script> tags .

So, we had to create a preprocessor to replace all those tags. We are working on a better approach of the issue.
However, there are good news!

1) You can disable the plugin, if you don't use Custom Blocks. If you don't know what Custom Blocks is, then you don't use it.
2) We have added a few advanced options to disable the preprocessor and DOMDocument altogether. You can still have the plugin enabled and write {msl_button} wherever you want, to get a MyShortlist button. The only functionality that requires the DOMDocument functionality are the Custom Blocks.

So, for future readers: If you are getting an error with the MyShortlist plugin, you can just disable it. If you are using Custom Blocks, please contact me directly at mavrosxristoforos@gmail.com.
Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
Serving the Joomla! community with extensions since 2008.

Please Log in or Create an account to join the conversation.

3 weeks 5 days ago - 3 weeks 5 days ago #3 by ARNAUD FRERET
I have disabled Preprocess and now i haven't the error.
Do you know why?
Many thanks

Please Log in or Create an account to join the conversation.

3 weeks 5 days ago #4 by Christopher Mavros
Most probably your page has a lot of Javascript with HTML tags in it. That was not accepted as standard HTML back in the day.
If you have just disabled the Preprocessing, please make sure that your site functions as usual. It is better to disable the plugin, than just the preprocessing, unless you are sure that this is what you need.

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
Serving the Joomla! community with extensions since 2008.

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros