Open MattAppleton opened 3 years ago
What PHP version are you running?
PHP Version 7.4.21
I can try downgrading through serverpilot... the CLI and app are both using 7.4 atm.
Grav admin crashes if I downgrade to 7.3...
/srv/users/chrisbrooks/apps/chrisbrooks/public/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
$resource = fopen($filename, 'r');
$line = fgets($resource);
if ($line !== false) {
$lifetime = (int) $line;
}
if ($lifetime !== 0 && $lifetime < time()) {
fclose($resource);
return false;
}
while (($line = fgets($resource)) !== false) {
$data .= $line;
}
fclose($resource);
return unserialize($data);
}
/**
* {@inheritdoc}
*/
protected function doContains($id)
{
$lifetime = -1;
$filename = $this->getFilename($id);
if (! is_file($filename)) {
return false;
}
$resource = fopen($filename, 'r');
$line = fgets($resource);
if ($line !== false) {
$lifetime = (int) $line;
}
Arguments
"Erroneous data format for unserializing 'Grav\Common\Flex\Types\Users\UserObject'"
Admin is OK at first sight on php 8.0 - -but still the same license manager crash...
I can't seem to replicate this. I've clicked on it in plugins list and also in the sidebar, and it works fine with latest Grav + Admin (previous versions worked fine too) using PHP 8 and 7.4
I would also try clearing your cache completely.
hmmm... tried that... maybe I can just add the warm-cache plugin manually, and register the license another way?
I think the issue is coming from here: https://github.com/getgrav/grav-plugin-license-manager/blob/develop/license-manager.php#L104
Thanks @mahagr for looking... is there something I can try on this file do you think?
Happy to share admin login / repo of the site in question if that helps?
I think I found the problem... I guess it might have happened due to internet outage which was plaguing us the other day...
Basically I looked at the license.yaml and compared it to a site where everything was working well. The problem site had a license but no prefix (?!) — see redacted screenshot.
As soon as I added warm-cache
before the license key it seemed to solve the issue.
Might be a problem that can be triggered again by mis-spelling the slug or saving issues, not sure if it counts as an on-going bug :) ?
The misspelling shouldn't affect it, you can still save it. I am not sure if you can save it without it though. If you can save without the slug part, perhaps that's what happened
I have a problem where license manager crashes with this error after installing it whenever I click on the plugin in the admin interface...
highlighting this line below
$ret = $object->$method();
My environment: Grav v1.7.18 - Admin v1.10.18