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

Type: Ticket
Status: In Progress
hutman
View Replies:
enlil replied on at Permalink Reply
enlil
was this a fresh install of latest version or an upgrade? Possibly forgot to run the package update after uploading the files? Based on the line number I can see you have v0.9.7.7 files uploaded. Reason I ask is I vaguely recall this issue recently and thought it was fixed. I'm also unable to replicate v9.2.2 php8.0.30. If it's a certain issue I will investigate further :)

Quick check... Do you have the Enlil Page List Tags block installed? If not, you're not properly upgraded to 0.9.7.7
hutman replied on at Permalink Reply
hutman
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.
enlil replied on at Permalink Reply
enlil
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 :)
enlil replied on at Permalink Reply
enlil
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:

// 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? :)
hutman replied on at Permalink Reply
hutman
This fix works perfectly, thank you!
enlil replied on at Permalink Reply
enlil
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 :).

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.4
Version Installed - 9.2.4
Database Version - 20231207100748

# Hostname
8b07512f8830

# Environment
production

# Database Information
Version: 5.7.29
SQL Mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Afixia: Automatic WebP Image Conversion (2.0.1), Afixia: SEO Redirects (1.1.6), CloudFlare IP Proxy (1.0.0), Enlil Page List (0.9.7.7), Formify (5.0.0), Maxwell Healthcare Associates Theme (1.0.8)

# Concrete Overrides
blocks/page_list/controller.php, blocks/page_list, blocks/share_this_page/view.php, blocks/share_this_page, blocks/page_attribute_display/controller.php, blocks/page_attribute_display/templates/date_time.php, blocks/page_attribute_display/templates, blocks/page_attribute_display, blocks/next_previous/view.php, blocks/next_previous, elements/header_required.php

# Concrete Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.56 (Debian)

# Server API
apache2handler

# PHP Version
8.1.18

# PHP Extensions
apache2handler, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, memcached, mysqli, mysqlnd, OAuth, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, Phar, posix, redis, Reflection, session, SimpleXML, soap, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 90
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 900
max_input_vars - 10000
max_multipart_body_parts - -1
memory_limit - 1G
post_max_size - 100M
upload_max_filesize - 100M
zend.exception_string_param_max_len - 15
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
memcached.sess_lock_max_wait - not set
memcached.sess_lock_wait_max - 150
memcached.sess_server_failure_limit - 0
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
redis.pconnect.connection_limit - 0
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.