Benjamin
(Benjamin A)
September 20, 2023, 5:15am
1
Hi,
i want to read a node property (integer) and i’ve defined the following:
limit:
type: integer
defaultValue: 6
ui:
label: i18n
showInCreationDialog: true
reloadIfChanged: true
inspector:
group: 'blogs'
the code:
prototype(myTasty.Vendor:Content.ListableBlogList) < prototype(Flowpack.Listable:PaginatedCollection) {
[...]
itemsPerPage = ${q(node).property('limit')}
[...]
}
When i cange/set the value, i get the following error in the backend:
Exception in line 71 of /app/Packages/Application/Neos.Fusion/Classes/Core/RuntimeConfiguration.php: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
After some time/reloads, it seems the change of the value is working as it has an effect on the frontpage. Anyway, is there a way to prevent it?
Probably related: Issue 3541
Happens with Neos 8.3.3 / php:8.1-cli (docker)
Thanks!
Marc
(Marc Henry Schultz)
September 20, 2023, 11:17am
2
Hi yes i stumbled upon a similar issue. In my case i forgot the content element wrapping (via Neos.Neos:ContentComponent
.
Since newer php versions this error is thrown. Ill investigate how we could adjust this to be more gracefully.
1 Like
Benjamin
(Benjamin A)
September 21, 2023, 6:33am
3
Good morning!
In general it is not a big deal, as the defaultvalue usually never got changed. But if it is the case it might be kinda confusing for the editors
Marc
(Marc Henry Schultz)
September 21, 2023, 10:03am
4
In my Tests the value got always changed correctly and the change was visible after reload
Marc
(Marc Henry Schultz)
September 22, 2023, 6:59am
5
I could fix my problem with: BUGFIX: Guard that Fusion path cannot be empty by mhsdesign · Pull Request #4547 · neos/neos-development-collection · GitHub
you can use this as patch right now:
{
"patches": {
"neos/fusion": {
"BUGFIX: Guard that Fusion path cannot be empty": "https://github.com/neos/neos-development-collection/pull/4547.patch"
}
}
}
via this composer plugin: GitHub - cweagans/composer-patches at 1.x
Benjamin
(Benjamin A)
September 27, 2023, 7:36am
6
Hey @Marc ,
i “hardpatched” it, without using composer but the error seemed to stay. When i look at the fix, it basicially just throws another exception, right?
My full definition looks like:
prototype(Neos.Demo:Content.ListableNewsList) < prototype(Flowpack.Listable:PaginatedCollection) {
[...]
itemsPerPage = ${q(node).property('limit')}
[...]
}
prototype(Flowpack.Listable:Pagination) < prototype(Neos.Fusion:Component) {
[...]
renderer = Neos.Fusion:Collection {
@if.paginationNeeded = ${(props.totalCount/props.itemsPerPage) > 1}
[...]
collection = Flowpack.Listable:PaginationArray {
[...]
itemsPerPage = ${props.itemsPerPage}
[...]
}
}
}
The Yaml:
'Neos.Demo:Content.ListableNewsList':
superTypes:
'Neos.Neos:Content': true
'Neos.Demo:Constraint.Content.Main': true
[...]
properties:
limit:
type: integer
defaultValue: 6
ui:
label: i18n
showInCreationDialog: true
reloadIfChanged: true
[...]
Actually i’m not sure where to look out for the content element wrapping using Neos.Neos:ContentComponent. Do you think this could be missing inside Flowpack.Listable:PaginatedCollection
? Because it just implements Neos.Fusion:Component
instead of ContentComponent
Greetings!
Hmm, had the same issue yesterday while upgrading to Neos 9.0 and thought it was an issue in the newer release. Interesting!