Skip to content

BUGFIX: Nodes show action does not handle \JsonSerializable objects and crashes if object is not StringAble#5706

Merged
mhsdesign merged 1 commit intoneos:8.3from
mhsdesign:bugfix/nodes-action-handle-non-stringable-JsonSerializable-objects
Dec 11, 2025
Merged

BUGFIX: Nodes show action does not handle \JsonSerializable objects and crashes if object is not StringAble#5706
mhsdesign merged 1 commit intoneos:8.3from
mhsdesign:bugfix/nodes-action-handle-non-stringable-JsonSerializable-objects

Conversation

@mhsdesign
Copy link
Member

With neos/neos-ui#3723 and neos/neos-ui#3723 the NodePropertyConverterService returns \JsonSerializable objects directly in the expectation that they are serialized directly. This is also true for the usages within the Neos Ui.

But this legacy endpoint here in Neos doesnt do it. And throws

"Object of class Sitegeist\Archaeopteryx\Link could not be converted to string"

on some occasions whenever the endoint is used. Funnely the Neos Ui really does not care about the node properties rendered here via fluid in html so we could also return "nudelsuppe" here. Its just important that it not crashes.

<f:for each="{convertedNodeProperties}" as="value" key="name">
<tr class="node-property">
<th class="node-property-name">{name}</th>
<td class="node-property-value">{value}</td>
</tr>
</f:for>

In the future we should have this whole thing killed :D

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

… and crashes if object is not StringAble

With neos/neos-ui#3723 and neos/neos-ui#3723 the `NodePropertyConverterService` returns `\JsonSerializable` objects directly in the expectation that they are serialized directly. This is also true for the usages within the Neos Ui.

But this legacy endpoint here in Neos doesnt do it. And throws

"Object of class Sitegeist\Archaeopteryx\Link could not be converted to string"

on some occasions whenever the endoint is used. Funnely the Neos Ui really does not care about the node properties rendered here via fluid in html so we could also return "nudelsuppe" here. Its just important that it not crashes.

https://github.com/neos/neos-development-collection/blob/1aeef6c02142b41e4626ea32434f06cd0f84e9bd/Neos.Neos/Resources/Private/Templates/Service/Nodes/Show.html#L30-L35

In the future we should have this whole thing killed :D
@mhsdesign
Copy link
Member Author

See also report in slack https://neos-project.slack.com/archives/C04PYL8H3/p1765379093714569

This fix is especially important for 9.1 as well have a native non stringalbe but jsonserializeable link value object: #5682

Copy link
Member

@nezaniel nezaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

@mhsdesign mhsdesign merged commit 3fbcb70 into neos:8.3 Dec 11, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants