Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Move access to objectAccess of TemplateObjectAccessInterface into getByPath #3041

Merged
merged 1 commit into from
May 9, 2023

Conversation

dlubitz
Copy link
Contributor

@dlubitz dlubitz commented May 9, 2023

... as accessors are not used anymore for variable provider within fluid, starting v2.8.0.

Due to the missing accessors the objectAccess of TemplateObjectAccessInterface didn't get called anymore, so the result of the getByPath method was an object of FusionPathProxy instead of an rendered string.

See:
TYPO3/Fluid@2.7.4...2.8.0#diff-a0aa72aa19d9eb57cdb9a4dcd344c3706d75ae7ca408286f91a846e495b3c766L122
TYPO3/Fluid@2.7.4...2.8.0#diff-a0aa72aa19d9eb57cdb9a4dcd344c3706d75ae7ca408286f91a846e495b3c766L341
TYPO3/Fluid@2.7.4...2.8.0#diff-a0aa72aa19d9eb57cdb9a4dcd344c3706d75ae7ca408286f91a846e495b3c766L312

…into getByPath, as accessors are not used anymore for variable provider within fluid
@dlubitz dlubitz added the 9.0 label May 9, 2023
@dlubitz dlubitz self-assigned this May 9, 2023
@github-actions github-actions bot added the Bug label May 9, 2023
Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

Looks good, so fine if it works for you… 😇

Copy link
Member

@robertlemke robertlemke left a comment

Choose a reason for hiding this comment

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

Looks good, quickly tested this also with an application using Fluid.

@robertlemke robertlemke merged commit 4cdd47d into 9.0 May 9, 2023
@robertlemke robertlemke deleted the bugfix/fluid-template-variable-container branch May 9, 2023 13:59
@kdambekalns
Copy link
Member

kdambekalns commented May 23, 2024

As I found out today, this does not work when you use {image.title} in Fluid and image is a FusionPathProxy:

  1. StandardVariableProvider checks for ArrayAccess, FusionPathProxy provides that. offsetExists() and offsetGet() only check for the offset directly in the partial fusion tree – there we have no title
  2. Now $subject is an object (our FusionPathProxy), but has no matching get/set/is/property
    3 Our TemplateVariableContainer is getting null back, and thus exits in https://github.com/neos/flow-development-collection/blob/9.0/Neos.FluidAdaptor/Classes/Core/ViewHelper/TemplateVariableContainer.php#L37 – that results in null again.
  3. title ends up as null

robertlemke added a commit that referenced this pull request Jun 14, 2024
Flow 8.x only works correctly with typo3fluid 2.7.x - see: #3038, #3041 and #3358
kdambekalns added a commit that referenced this pull request Jun 14, 2024
This reverts commit 4cdd47d, reversing
changes made to 854c557 in PR #3041.
robertlemke added a commit that referenced this pull request Jun 14, 2024
Flow 8.x only works correctly with typo3fluid 2.7.x - see: #3038, #3041 and #3358
neos-bot pushed a commit to neos/flow that referenced this pull request Jun 14, 2024
neos-bot pushed a commit to neos/fluidadaptor that referenced this pull request Jun 14, 2024
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.

3 participants