neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

BUG after upgrade from 8.3.12 to 8.3.13: deleting nodes does not flush relevant caches #5105

Closed patricekaufmann closed 3 months ago

patricekaufmann commented 4 months ago

Is there an existing issue for this?

Current Behavior

In 8.3.13, caches are no longer getting flushed when a node is deleted. The cache configurations make use of the EEL helpers Neos.Caching.nodeTypeTag and Neos.Caching.descendantOfTag, in both cases caches are no longer getting flushed when deleting a node that should lead to a cache flush. I verified the issue not occuring in 8.3.12.

Expected Behavior

Referencing cache entries should be flushed when a node is deleted.

Steps To Reproduce

No response

Environment

- Flow: 8.3.9
- Neos: 8.3.13
- PHP: 8.1 / 8.3

Anything else?

Edit: I noticed that backend caches are flushed correctly and it's merely the frontend caches that are not getting flushed.

dlubitz commented 4 months ago

Thanks for your report. Might be related to https://github.com/neos/neos-development-collection/pull/4291

patricekaufmann commented 4 months ago

The cause is the commit https://github.com/neos/neos-development-collection/commit/c99cd8b1b609d60fd6775f4dd16f381664dc0f63

When I delete the lines, it is working as expected.

patricekaufmann commented 4 months ago

I also noticed that backend caches are flushed correctly and it's merely the frontend caches that are not getting flushed. Looking at the previously mentioned commit I would assume that the node is already null in live workspace and therefore the method returns early.

dlubitz commented 3 months ago

Fixed with https://github.com/neos/neos-development-collection/pull/5124. Will be released with next bugfix release soonish.

crydotsnake commented 3 months ago

What exactly was the behavior you had? @patricekaufmann In 8.3.14 i have the issue, that when i delete a node and publish the workspace, the node is still there. But I will check it more closely during the day as it was a bit late last night :) But it was on a freshly new 8.3.14 project i started yesterday.

patricekaufmann commented 3 months ago

With 8.3.14, I cannot reproduce any of the issues I encountered before. I also tried publishing to another internal workspace first. It works as expected when publishing to the live workspace afterwards via the workspace module.

crydotsnake commented 3 months ago

This is the behavior i have with Neos 8.3.14:

Animation

When i add a node to the page, and publish and refresh the backend, the node is not visible in the backend and frontend but still visible in the content tree. In the frontend only a empty content collection will be rendered.

crydotsnake commented 3 months ago

I recorded it again but in OBS and with a better solution:

https://github.com/neos/neos-development-collection/assets/39345336/ae56f304-ca51-4c00-95f5-5266742ecdd8

I even updated my project to Neos 8.3.15 but this didnt help either..

And i dont believe this is a problem with my NodeType configuration.

crydotsnake commented 3 months ago

And if i edit my publishd node, the change will not even be registered.

https://github.com/neos/neos-development-collection/assets/39345336/f15bb286-ac7b-46e2-a5a3-0930ea50ee8e

crydotsnake commented 3 months ago

I solved it but i really have no idea what the issue was.

For small nodes like a headline i always build my renderer like:

headline = ${q(node).property('title')}
renderer = afx`
  <Neos.Neos:Editable property={props.headline}/>
`

But this didnt work. I'm 100% sure this SHOULD work! As i have done this the same way hundred of times already.

With:

     headline = Neos.Neos:Editable {
         property = 'title'
     }

    renderer = afx`
        {props.headline}
    `

It works.

jonnitto commented 3 months ago

I solved it but i really have no idea what the issue was.

For small nodes like a headline i always build my renderer like:

headline = ${q(node).property('title')}
renderer = afx`
  <Neos.Neos:Editable property={props.headline}/>
`

But this didnt work. I'm 100% sure this SHOULD work! As i have done this the same way hundred of times already.

With:

     headline = Neos.Neos:Editable {
         property = 'title'
     }

    renderer = afx`
        {props.headline}
    `

It works.

The first didn't work because it is wrong. Neos.Neos:Editable want the property name, not the value of the property. So your code should look like this:

headline = 'title'
renderer = afx`
  <Neos.Neos:Editable property={props.headline}/>
`

But it is better anyway to keep the Neos.Neos:Editable outside of an afx tag, as it is an integration part and not a presentation

crydotsnake commented 3 months ago

The first didn't work because it is wrong. Neos.Neos:Editable want the property name, not the value of the property. So your code should look like this:

Yes 🤦🏼‍♂️ I dont know if i should laugh or cry 😅..

Thanks @jonnitto ❤️