Hi All,
Upgrading a few older sites. From 2.2.16. PHP 5.4.45. Linux/Apache. Hosted by Webfaction. MySQL 5.5.45-37.4
Tried to jump to 2.4.2 but got this error after the Install button is clicked. Note, all the tests passed.
Fatal error: Call to a member function checkPolicy() on a non-object in /...blah/core/model/modx/modx.class.php on line 1880.
The fatal lines in question.
/**
* Returns true if user has the specified policy permission.
*
* @param string $pm Permission key to check.
* @return boolean
*/
public function hasPermission($pm) {
$state = $this->context->checkPolicy($pm);
return $state;
}
Could this mean the User Object (this) doesn't exist?
So tried an earlier version 2.3.6. Same result. Tried 2.3.0. Same, so not a "too big a jump" thing. Repeated on another website on the same server/setup also at 2.2.16. Same result. In both cases re-installing 2.2.16 works. Suggesting it isn't a "folder not writeable" kind of thing. Note when upgrading using 2.3.0 the checkpolicy call is on line 1876.
Perhaps a database issue, Users not found? But I'm thinking the hosting company setup. Webfaction are awesome (like a VPS for $9.99/month) but they are more Python experts. Perhaps PHP or MySQL has been updated since the installation a year ago.
I had deleted the cache(from the manager). Upgraded all packages (list below) and Flushed Sessions. Then manually deleted the core/cache. And deleted the Firefox Cache on some runs.
Fairly standard Packages. Breadcrumb, FormIt, GetResources, SimpleSearch, SiteAtoZ, TincyMCE, Wayfinder. A few more on the other site.
This is probably a side effect but my notes from last night state...
After deleting core/cache and browser cache - hit back from the error page and got
Warning: array_merge(): Argument #2 is not an array in /...blah/core/xpdo/xpdo.class.php on line 341
Fatal error: Class 'xPDODriver_' not found in /...blah/core/xpdo/xpdo.class.php on line 1880
Probably a side effect of a half installation.
Had a good rummage around for help. But stumped. At least the sites/manager still work at 2.2.16.
Stuart
[ed. note: parthian last edited this post 8 years, 6 months ago.]