I am trying to update my current work project to 3.5 (mainly due to the much improved date input), but I am getting two different error messages in the panel. I have no idea what they mean or how I could possibly debug them. Help would be much appreciated.
Error #1: "notification is not defined"
This happens on the site level of the panel, where I basically list the main pages of the site, as well as at an projects subpage where I list project subpages. It appears when I open the site:
Error #2: "Call to a member function is() on null"
This one happens on my project subpage after I changed a field and try to save the page.
From which version are you updating? I saw the first error recently on a project as well, which was 3.3.x when I just threw 3.5 into it, but didn’t have the time to look into it.
Have you made sure to clear the cache, both Kirby and browser, remove the media file etc.?
Thank you Sonja. I was able to figure out these errors, but now I am stuck a a new one.
The first error was caused by a now outdated version of the Custom Add Fields plugin. The second error was caused by the breaking changes regarding hooks on the 3.4 update. Now I fixed that issue, by properly renaming the hook parameter.
But now I am stuck a at a new error message that relates to that hook and some custom methods I had set up in the hooks to handle writing to structure fields within structure fields within the pagebuilder plugin. As the pagebuilder plugin is obsolete now, I am really at loss how I can transfer the existing setup to the current version of Kirby.
Here is the error message I am getting (again after updating the page):
$blocks = $page->text()->toBlocks();
$newBlock = new Kirby\Cms\Block( [
'content' => [
'text' => kirbytext('The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. '),
'type' => 'text',
'isHidden' => false,
$blocks = $blocks->add($newBlock);
'text' => Data::encode($blocks->toArray(), 'json')
What you have to add as parameters to your new Block, depends on the block type.
The alternative would be to work with $blocks->toArray() from the outset. But to me, the above seems more straightforward.