Page Selector

Permalink Browser Info Environment
Hey there

The "File Selector in repeatable" has been resolved, thanks.
On a different Project i have troubles getting a "Page" type Attributes in a repeatable. The pasted env is from a demo Project.

Demo Project:
New Block with a "Page"-type Attribute and a "Repeatable" with a "Page"-type inside. Data gets saved (page id) to the db. The Forms behave normal, the selected Pages (inside and outside the repeatable) is saved and displayed.
The view gets only the PageID from the outer "Page" Attribute, the Attributed inside the Repeatable return 'false' (but the page id is in the db)

Actual Project:
Same here but even the outer "Page" attr (not in repeatable) returns 'false'

BD is 1.4.1, Concrete is 9.1.1

Thanks in advance & kind regards
Donat (lemonbrain)

Type: Ticket
Status: Resolved
Lemonbrain
View Replies:
Lemonbrain replied on at Permalink Reply
Lemonbrain
Hello Ramon

We still have that problem. To be precise it only happens using php8.1 (works as expected on php 7.4 but EOL ...)

Do you think you can work something out or have pointers for us on where to look?

Kind regards
donat (lemonbrain)


example config.php i used for a block on concrete v9.1.3/PHP8.1 - only "pagelink" gets displayed, the "page_link" inside "repeadetLink" repeatable are not working.

<?php
return [
    // Block
    'block' => [
        'name' => t('Test'),
        'description' => t('Created with Block Developer'),
    ],
    // Fields
    'fields' => [
        'title' => [
            'type' => 'Text',
            'label' => t('A Text Input Field'),
            'description' => t('This is the description of the field'),
            'required' => true,
            'searchable' => true,
Lemonbrain replied on at Permalink Reply
Lemonbrain
Hello again

For a quick fix, we changed is_string($cID) => is_numeric($cID) in
src/BlockDeveloper/FieldType/Page/Page.php's getPageObject() method. Somehow $cID can be integer too.

Regards
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

This isn't a quick fix, this is THE fix. Indeed this value has to be numeric, and PHP 8.1 and up is more strict on this. And since it should always have been numeric, this is the correct way to solve this issue. I've just tested with PHP 7.4, 8.0 and 8.1 and they all seem to behave like they should.

That's why version 1.4.2 is now live, with the fix you proposed. Thanks for pointing this out. I also put you in the change log with a special thanks :)

Keep up the good work!

Kind regards
Ramon

concrete5 Environment Information

# Concrete Version
Core Version - 9.1.1
Version Installed - 9.1.1
Database Version - 20220516191423

# Database Information
Version: 8.0.30-0ubuntu0.20.04.2
SQL Mode: STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Block Developer (1.4.1), Project (0.1.0)

# Concrete Overrides
blocks/repeatable_file/composer.php, blocks/repeatable_file/db.xml, blocks/repeatable_file/form.php, blocks/repeatable_file/config.php, blocks/repeatable_file/add.php, blocks/repeatable_file/controller.php, blocks/repeatable_file/edit.php, blocks/repeatable_file/view.php, blocks/repeatable_file/icon.png, blocks/repeatable_file, blocks/page_link_test/composer.php, blocks/page_link_test/db.xml, blocks/page_link_test/form.php, blocks/page_link_test/config.php, blocks/page_link_test/add.php, blocks/page_link_test/controller.php, blocks/page_link_test/edit.php, blocks/page_link_test/view.php, blocks/page_link_test/icon.png, blocks/page_link_test

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

# Server Software
Apache/2.4.54 (Ubuntu)

# Server API
apache2handler

# PHP Version
8.1.9

# PHP Extensions
apache2handler, bz2, calendar, Core, ctype, curl, date, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, shmop, SimpleXML, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xdebug, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 2500
memory_limit - 128M
post_max_size - 8M
upload_max_filesize - 2M
zend.exception_string_param_max_len - 0
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
unserialize_max_depth - 4096
xdebug.max_nesting_level - 256
xdebug.max_stack_frames - -1
xdebug.var_display_max_children - 128
xdebug.var_display_max_data - 512
xdebug.var_display_max_depth - 3
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 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

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.