modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

Unable to flush permissions after upgrading to 2.6.0 from 2.5.7 #13687

Closed muzzwood closed 6 years ago

muzzwood commented 6 years ago

Summary

Unable to flush permissions after upgrading to MODX 2.6 from 2.5.7

Step to reproduce

Upgrade to 2.6 then try to flush your permissions in the manager.

Observed behavior

Browser gets an empty response from the processor and error in console is: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Expected behavior

Permissions should flush.

Environment

MODX 2.6.0, PHP 7.1

muzzwood commented 6 years ago

https://github.com/modxcms/revolution/blob/2.x/core/model/modx/processors/security/access/flush.class.php#L14

Line 14 in the link above is returning false.

muzzwood commented 6 years ago

https://github.com/modxcms/revolution/blob/2.x/core/model/modx/modcachemanager.class.php#L772

Line 772 in modCacheManager is what's failing.

The contents of the $serialized variable in the line above (771) is: a:3:{i:0;s:2:"en";i:1;s:3:"mgr";i:2;s:3:"web";}

OptimusCrime commented 6 years ago

If it is failing, do you have anything in your error log?

Edit: MODX error log or PHP error log, that is.

muzzwood commented 6 years ago

Nothing in either frustratingly. (MODX log level also set to 4) I tracked the above by using modx->log() at each line to see exactly where it was going wrong.

muzzwood commented 6 years ago

Also can confirm it's happening on more than one install. Both fresh 2.6 install and upgraded from 2.5.7/2.5.8. Also different environments: local as well as remote server.

OptimusCrime commented 6 years ago

MySQL version?

muzzwood commented 6 years ago

One environment is MySQL 5.6.37 another is MySQL 5.7.17

Bruno17 commented 6 years ago

maybe it was introduced with this commit? https://github.com/modxcms/revolution/commit/ecc1b0d00bd01ff6d94aa4a830e771a8425185eb#diff-7815df8a113600b79e256c26e16369cf

return false instaed of $this->modx->error->success('');