Code Monkey home page Code Monkey logo

Comments (2)

nezaniel avatar nezaniel commented on August 18, 2024

Hi there,

thanks for reporting!
before diving in more deeply I have one question:
Which is the one and which is the other language you create/delete the nodes in? Due to the fallback mechanism in place (en->de), the exact order of events is important.

from neos-development-collection.

beromir avatar beromir commented on August 18, 2024

Hi @nezaniel,
this does not make a difference.

These are the database entries for the node identifier after the node was created in de and modified in en:

workspace identifier removed dimensionvalues
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 de
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 en

After switching to the new workspace, removing the node and publishing it:

workspace identifier removed dimensionvalues
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 de
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 en
staging-ggxco 87f3f35d-f03e-4632-879a-d95b108d0005 1 de

If you now try to remove the node in en, no new database entry will be created.
The same thing happens, if you remove the node in en first.

I may have found the problem:

// If the node is marked to be removed but didn't exist in a base workspace yet, we can delete it for real, without creating a shadow node.
// This optimization cannot be made for shadow nodes which are moved.
if ($nodeData->isRemoved() && $nodeData->getMovedTo() === null && $this->nodeDataRepository->findOneByIdentifier($nodeData->getIdentifier(), $this->workspace->getBaseWorkspace()) === null) {
if ($this->persistenceManager->isNewObject($nodeData) === false) {
$this->nodeDataRepository->remove($nodeData);
}
return;
}

If I add removedNodes: true to $this->nodeDataRepository->findOneByIdentifier the changes are applied and a new database entry is created:

workspace identifier removed dimensionvalues
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 de
live 87f3f35d-f03e-4632-879a-d95b108d0005 0 en
staging-ggxco 87f3f35d-f03e-4632-879a-d95b108d0005 1 de
staging-ggxco 87f3f35d-f03e-4632-879a-d95b108d0005 1 en

The problem is that it tries to find the node in the staging workspace, but as it is already marked as removed for the other dimension the method returns null. But as I understand from the method description, it should also search in another base workspace. So it should also search in live? But this does not seem to be happening.

from neos-development-collection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.