After migrating my modx installation from one provider to another there are some errors popping up when navigating to the package manager.
[2019-04-16 13:14:54] (ERROR @ /storage/web/modx/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at: https://rest.modx.com/extras/
Seems to be related to the system setting ‘locale’, see below.
Step to reproduce
Set the system setting ‘locale’ to the value ‘de_DE.UTF-8’. While the page output (including dates) should now be with german locale there are some errors when navigating to the package manager. Reset the system setting to an empty value and the errors are gone.
After some research I tried to add two new system settings ‘setlocale’ (true) and ‘setmgrlocale’ (false) which helps a little bit as sometimes the errors are gone, but sometimes they are there again.
Digging into it: I tried to output the rest response into the modx log, which should be correctly styled xml.
Seems to work up to this line (240) in modrestclient.class.php:
Seems that I have the same issue with 2.7.1. The setting Locale is emtpy. In the error log the following errors appear:
[2019-04-19 20:15:31] (ERROR in modRestCurlClient::__construct @ /home/[user]/public_html/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-04-19 20:15:31] (ERROR @ /home/[user]/public_html/core/model/modx/rest/modrestclient.class.php : 245) Could not connect to provider at: https://rest.modx.com/extras/
[2019-04-19 20:15:31] (ERROR in modTransportProvider::find @ /home/[user]/public_html/core/model/modx/transport/modtransportprovider.class.php : 276) MODX krijgt geen response van de provider. Controleer de service URL en controleer of het de juiste provider is.
This started after an upgrade from 2.7.0 to 2.7.1.