Class Concrete\Core\Permission\Key\BoardKey does not exist

Permalink
Hi,

My C5 site was installed using Composer. When upgrading, something went wrong, and started getting the following error on line 734 of concrete/vendor/illuminate/container/Container.php

Class Concrete\Core\Permission\Key\BoardKey does not exist


Line 734 is:
$reflector = new ReflectionClass($concrete);


To troubleshoot, I created a new site by downloading as a zip, moved my application/files and config over, but still get this same error.

Searching for class Concrete\Core\Permission\Key\BoardKey, I found it doesn't exist on either my composer site or zip created site, but it does exist in the github repositoryhttps://github.com/concrete5/concrete5/blob/develop/concrete/src/Per...

Please provide any ideas. Thanks!!!

 
NotionCommotion replied on at Permalink Reply
I've both searched all C5 files as well as the entire database the term "BoardKey" but it doesn't exist. I've since made a little progress, and found that Concrete\Core\Permission\Key\Key::loadAll() results with $class as \Core\Permission\Key\BoardKey (and $pkgHandle as null). So, maybe just manually edit the DB? Worried that new problems will result...

public static function loadAll()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $permissionkeys = [];
        $txt = $app->make('helper/text');
        $e = $db->executeQuery(<<<'EOT'
select pkID, pkName, pkDescription, pkHandle, pkCategoryHandle, pkCanTriggerWorkflow, pkHasCustomClass, PermissionKeys.pkCategoryID, PermissionKeyCategories.pkgID
from PermissionKeys
inner join PermissionKeyCategories on PermissionKeyCategories.pkCategoryID = PermissionKeys.pkCategoryID
EOT
        );
        while (($r = $e->fetch(PDO::FETCH_ASSOC)) !== false) {
            if ($r['pkHasCustomClass']) {
                $class = '\\Core\\Permission\\Key\\' . $txt->camelcase($r['pkHandle'] . '_' . $r['pkCategoryHandle']) . 'Key';

{
    "pkID": "138",
    "pkName": "View Board",
    "pkDescription": "",
    "pkHandle": "view_board",
    "pkCategoryHandle": "board",
    "pkCanTriggerWorkflow": "0",
    "pkHasCustomClass": "0",
    "pkCategoryID": "27",
    "pkgID": null
}
NotionCommotion replied on at Permalink Reply
My hack solution was to just add the following to src/permission/keys. Not sure why I needed to do so, but it seemed to have worked.

[code]
<?php
namespace Concrete\Core\Permission\Key;

/**
* @deprecated
* Only here to keep errors from happening on upgrade
*/
class LogsKey extends Key
{

}

<?php
namespace Concrete\Core\Permission\Key;

class BoardKey extends Key
{
}


<?php
namespace Concrete\Core\Permission\Key;

class BoardAdminKey extends Key
{
}['code']