PHP 8.1 Issue
Permalink Browser Info Environment
When adding the Enlil Page List block to the page I get this error
Undefined array key "filterPageSelectSelect" Details /app/packages/enlil_page_list/blocks/enlil_page_list/controller.php(1030): Whoops\Exception\ErrorException->null /app/packages/enlil_page_list/blocks/enlil_page_list/controller.php(1030): Whoops\Run->handleError /app/concrete/src/Entity/Block/BlockType/BlockType.php(675): Concrete\Package\EnlilPageList\Block\EnlilPageList\Controller->save /app/concrete/src/Page/Collection/Collection.php(1078): Concrete\Core\Entity\Block\BlockType\BlockType->add /app/concrete/src/Page/Page.php(2787): Concrete\Core\Page\Collection\Collection->addBlock /app/concrete/controllers/dialog/page/add_block.php(107): Concrete\Core\Page\Page->addBlock /app/concrete/src/Controller/AbstractController.php(318): Concrete\Controller\Dialog\Page\AddBlock->submit /app/concrete/src/Controller/AbstractController.php(318): null->call_user_func_array /app/concrete/src/Routing/ControllerRouteAction.php(64): Concrete\Core\Controller\AbstractController->runAction /app/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute /app/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch /app/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next /app/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
Viewing 15 lines of 33 lines. View entire code block.
Type: | Ticket |
---|---|
Status: | In Progress |
This was a fresh package install, not an upgrade. It was installed via the Dashboard and there were no errors upon install. The block that you are asking about is available in the block list.
I've cornered the issue. It occurs when there are no Page Selector page attributes created. In the mean time create a page selector page attribute and save should work. I'll work this out this evening and get an update so you can remove your bum attribute :)
Whoever I might be speaking with, if you're able to edit the package files, the working solution is as follows.
In the block controller.php, around line 1030 where the issue occurs, find the following lines:
And replace them with:
This is the working fix in my development version as we speak. This, or creating a dummy attribute as described, will alleviate the issue for you until I release the next version. I'm in the middle of adding core conversation count display in the page lists at the moment, and have to populate that across all the custom templates that come with the list block when finished. If you're comfortable using one of the two options until I can push that update as well, that would be nifty? :)
In the block controller.php, around line 1030 where the issue occurs, find the following lines:
// Filter Page Select $attributesPageSelect = $this->getAvailablePageAttributes_PageSelector(); $args['filterPageSelect'] = (!empty($args['filterPageSelect'])) ? serialize($args['filterPageSelect']) : ''; // Serialize Select Page Attributes $args['filterPageSelectSelect'] = serialize($args['filterPageSelectSelect']); $args['filterPageSelectValue'] = serialize($args['filterPageSelectValue']);
And replace them with:
// Filter Page Select $attributesPageSelect = $this->getAvailablePageAttributes_PageSelector(); foreach ($attributesPageSelect as $ak) { $filterVal = $args['filterPageSelectValue'][$ak->getAttributeKeyID()]; if (empty($filterVal)) { $filterVal = 0; } $args['filterPageSelectValue'][$ak->getAttributeKeyID()] = $filterVal; } $args['filterPageSelect'] = (!empty($args['filterPageSelect'])) ? serialize($args['filterPageSelect']) : ''; // Serialize Page Select Page Attributes $args['filterPageSelectSelect'] = (!empty($args['filterPageSelectSelect'])) ? serialize($args['filterPageSelectSelect']) : ''; $args['filterPageSelectValue'] = (!empty($args['filterPageSelectValue'])) ? serialize($args['filterPageSelectValue']) : '';
This is the working fix in my development version as we speak. This, or creating a dummy attribute as described, will alleviate the issue for you until I release the next version. I'm in the middle of adding core conversation count display in the page lists at the moment, and have to populate that across all the custom templates that come with the list block when finished. If you're comfortable using one of the two options until I can push that update as well, that would be nifty? :)
This fix works perfectly, thank you!
This is fixed in v0.9.7.10.
Please note, if you used any of the "Entry Grid" templates, they will now need to have a thumbnail size selected in the edit interface. There's also a second set of "Thumb Grid" templates. Both are working as they should and have additional overlay options controlled by the Button Link options :).
Please note, if you used any of the "Entry Grid" templates, they will now need to have a thumbnail size selected in the edit interface. There's also a second set of "Thumb Grid" templates. Both are working as they should and have additional overlay options controlled by the Button Link options :).
Quick check... Do you have the Enlil Page List Tags block installed? If not, you're not properly upgraded to 0.9.7.7