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

Fusion: "Neos.Fusion:Case" object - combine key with @process #3388

Closed
mhsdesign opened this issue Jul 28, 2021 · 2 comments
Closed

Fusion: "Neos.Fusion:Case" object - combine key with @process #3388

mhsdesign opened this issue Jul 28, 2021 · 2 comments

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Jul 28, 2021

Description

When using a process (that changes the 'value' in any kind) directly on a false key of "Neos.Fusion:Case" a following true key wont be rendered with success.

Steps to Reproduce

  1. Goto https://fusionpen.punkt.de/fusionpen/3d4e4215ad94834cef22ee1ab8ddeef9fbf528cf.html
  2. or run:
prototype(My:Case) < prototype(Neos.Fusion:Case) {

    isFalse {
        condition = ${false}
        renderer = "should not be displayed"
        @process.anything= ${value + ' test'}
    }

    isTrue {
        condition = ${true}
        renderer = "should be displayed"
    }
}

Expected fusion behavior

should be displayed

Actual fusion behavior

"_____________NO_MATCH_RESULT_____________"

What works:

  1. rendering the condition with the process
    isFalse.condition = ${true} -> renders should not be displayed test
  2. moving the isFalse key to the bottom (in the code or via @position = "end")
  3. removing the process
  4. using this process isFalse.@process.anything= ${value}
  5. using isFalse.renderer.@process.anything - but that wont work for renderPath
  6. using renderer with an additional "Neos.Fusion:Renderer"
@Sebobo
Copy link
Member

Sebobo commented Jul 30, 2021

But your Fusionpen example works fine when changing the process to apply to the renderer, same when using renderPath.
https://fusionpen.punkt.de/fusionpen/c05df2dd2c32398d669db8c38ef32c87af11c053.html

Don't think there is an adjustments needed therefore.
isFalse is not the actual result of the implementation, but the renderer. So applying the process to the condition doesn't make too much sense IMO.

@mhsdesign
Copy link
Member Author

Yes; you are right - applying it on the condition doesnt make sense. And i was using a too complex renderPath wrongly with the @process.

I was playing around with the renderPath like a type (https://fusionpen.punkt.de/fusionpen/76384575e49fdc9c7ac72a4aa7a434a69da5ee46.html):

and found out that this is just wrong:

renderPath = ${"<My:Prototype>/data"}
renderPath.@process.json = ${Json.stringify(value)}

instead this would work:

renderPath = ${"element<My:Prototype>/data"}
element.data.@process.json = ${Json.stringify(value)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants