Jako / emo

E-Mail Address Obfuscation with Javascript in MODX Revolution
https://jako.github.io/emo/
GNU General Public License v2.0
5 stars 1 forks source link

Uninstalling breaks site #11

Closed visuellemedien closed 4 years ago

visuellemedien commented 4 years ago

Uninstalling Emo causes a blank page in the browser. Chrome displays an HTTP-Error 500. After reinstalling page shows up again. After migrating a site to a new server Emo causes the other Scripts (jQuery etc.) not to work. Only Emo is working.

Jako commented 4 years ago

Could you see what was causing the error 500? Maybe this is visible in the server logs. I can't reproduce that here.

For the frontend issue: Which errors were shown in the browser console? If the emo javascript file is not found, the decoding does not work and this could have impact on other javascripts.

visuellemedien commented 4 years ago

I'm sorry but I don't have access to proper log files. I migrated the installations to shared servers (Strato). I can't uninstall Emo either on the source server nor the target server without breaking the sites. With other browsers than Chrome I get just a blank white browser window. Chrome at least tells me that it is a 500 error. This happens with several instances of MODX when I uninstall Emo. The sites just break. Reinstalling Emo fixes it. But moving to another server breaks other JavaScript, too. This includes jQuery and also vanilla stuff. Then only Emo works. It is not that any files are not loaded. Firebug or Chrome DevTools don't claim anything is missing.

Jako commented 4 years ago

Could you deactivate the emo plugin before deinstalling the package? But I don't see a reason why deinstalling the package would not remove the plugin. Have you cleaned the cache after uninstalling the package?

If the other scripts don't work anymore, there should be a javascript error in the console. The plugin just adds some javascript to the document content.

visuellemedien commented 4 years ago

Screenshot_2020-05-17-Package-Verwaltung Yes I did clean MODX cache completely even twice: Before and after deactivating Emo. When I deactivate emo (without deleting the package) the site doesn't work any more: When I reload the site in the browser there is no entries at all in Chrome DevTools console, because there is no site which to log, just the error 500. MODX error log shows this (domain name replaced by "domainname"):

[2020-05-17 06:02:15] (ERROR in xPDO::getService @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 1234) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:15] (ERROR in modRestCurlClient::construct @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:17] (ERROR in xPDO::getService @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 1234) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:17] (ERROR in modRestCurlClient::construct @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:17] (ERROR in xPDO::getService @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 1234) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:17] (ERROR in modRestCurlClient::construct @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:02:20] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found [2020-05-17 06:02:20] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): {"status":500,"code":2,"message":"DOMDocument::createTextNode() expects paramete [2020-05-17 06:02:20] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): ^ [2020-05-17 06:02:20] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at: https://rest.modx.com/extras/ [2020-05-17 06:02:29] (ERROR in resource 13 @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/modparser.class.php : 1373) Bad link tag [[~]] encountered [2020-05-17 06:02:29] (ERROR in resource 13 @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/modparser.class.php : 1373) Bad link tag [[~]] encountered [2020-05-17 06:02:29] (ERROR in resource 13 @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/modparser.class.php : 1373) Bad link tag [[~]] encountered [2020-05-17 06:02:29] (ERROR in resource 13 @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/modparser.class.php : 1373) Bad link tag [[~]] encountered [2020-05-17 06:03:23] (ERROR in xPDO::getService @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 1234) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:03:23] (ERROR in modRestCurlClient::construct @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::construct is deprecated since version 2.3.0. Use the modRest classes instead. [2020-05-17 06:03:27] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found [2020-05-17 06:03:27] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): {"status":500,"code":2,"message":"DOMDocument::createTextNode() expects paramete [2020-05-17 06:03:27] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 240) PHP warning: simplexml_load_string(): ^ [2020-05-17 06:03:27] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at: https://rest.modx.com/extras/ [2020-05-17 06:03:29] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 644) Could not load class: Emo from emo. [2020-05-17 06:03:29] (ERROR @ /var/www/vhosts/domainname.org/httpdocs/core/xpdo/xpdo.class.php : 1247) Problem getting service emo, instance of class Emo, from path /var/www/vhosts/domainname.org/httpdocs/core/components/emo/model/emo/

I have 4 different MODX sites on that server which I want to move to another hoster. I use Emo on all 4.

Jako commented 4 years ago

Do you have a duplicated and renamed emo plugins in your installation? Otherwise the backend issue cannot happen. If you want, I could look into your backend (my contact could be found in my profile).

Since the loaded javascripts are cached in the resource, the frontend issue could happen. But after clearing the resource cache, this issue should be away.

visuellemedien commented 4 years ago

Yes, that makes sense. I'll contact you soon. Thanks for the quick reaction and help.

Jako commented 4 years ago

During an uninstall, the previous version was installed, causing this issue.