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)
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 |
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
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
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
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
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.