I’m in the midst of setting up Kirby 3 and I’ve run into a problem…
So, I’ve created a custom directory setup here based on the one in the docs:
<?php
$base = dirname(__DIR__, 1);
include $base . '/vendor/autoload.php';
$roots = [
'roots' => [
'index' => __DIR__,
'base' => $base,
'content' => $base . '/content',
'site' => $base . '/site',
'storage' => $storage = $base . '/storage',
'accounts' => $storage . '/accounts',
'cache' => $storage . '/cache',
'sessions' => $storage . '/sessions',
],
];
$kirby = new Kirby($roots);
echo $kirby->render();
The front page works fine.
The panel however gives an error after I login:
Cannot read property ‘access’ of null. which is this piece of code:
attrs: {
"aria-current": t.$store.state.view === i
}
}, [s("k-dropdown-item", {
attrs: {
disabled: !1 === t.$permissions.access[i],
icon: e.icon,
link: e.link
}
}, [t._v(" " + t._s(t.menuTitle(e, i)) + " ")])], 1) : t._e()]
}
The response from the API to the panel with my account, which is where this data comes from (I’m assuming) looks like this:
{
"code": 200,
"data": {
"ascii": {
<snip>
},
"authStatus": {
"challenge": null,
"email": "XXXX@XXXXX.de",
"status": "active"
},
"defaultLanguage": "en",
"isInstallable": true,
"isInstalled": true,
"isLocal": false,
"isOk": true,
"kirbytext": true,
"languages": [],
"license": "XXXXX",
"locales": {
<snip>
},
"loginMethods": [
"password"
],
"multilang": false,
"requirements": {
"accounts": true,
"content": true,
"curl": true,
"sessions": true,
"mbstring": true,
"media": true,
"php": true,
"server": true
},
"site": "Site",
"slugs": [],
"title": "This is the site title",
"translation": {
"author": "Kirby Team",
"data": {
<snip>
},
"direction": "ltr",
"id": "en",
"name": "English"
},
"user": {
"avatar": null,
"content": [],
"email": "XXXX@XXXXX.de",
"id": "Foh8w0E7",
"language": "en",
"name": "XXXX XXXX",
"next": null,
"options": {
"create": false,
"changeEmail": true,
"changeLanguage": true,
"changeName": true,
"changePassword": true,
"changeRole": false,
"delete": false,
"update": true
},
"prev": null,
"role": {
"description": "The admin has all rights",
"name": "admin",
"permissions": {
"access": {
"panel": true,
"settings": true,
"site": true,
"users": true
},
"files": {
"changeName": true,
"create": true,
"delete": true,
"read": true,
"replace": true,
"update": true
},
"languages": {
"create": true,
"delete": true
},
"pages": {
"changeSlug": true,
"changeStatus": true,
"changeTemplate": true,
"changeTitle": true,
"create": true,
"delete": true,
"duplicate": true,
"preview": true,
"read": true,
"sort": true,
"update": true
},
"site": {
"changeTitle": true,
"update": true
},
"users": {
"changeEmail": true,
"changeLanguage": true,
"changeName": true,
"changePassword": true,
"changeRole": true,
"create": true,
"delete": true,
"update": true
},
"user": {
"changeEmail": true,
"changeLanguage": true,
"changeName": true,
"changePassword": true,
"changeRole": true,
"delete": true,
"update": true
}
},
"title": "Admin"
},
"username": "XXXXXXX"
},
"version": "3.5.1"
},
"status": "ok",
"type": "model"
}
Which seems correct to me…
Any tips on where to look further?