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

BUG: Cut & paste does not work if new parent does not exist in original dimension #5368

Closed
1 task done
pKallert opened this issue Nov 15, 2024 · 8 comments
Closed
1 task done

Comments

@pKallert
Copy link
Contributor

pKallert commented Nov 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When cut & pasting a node using the "gatherAll" strategy in a dimension where the new parent does not exist in the original dimension, I get an error: https://github.com/neos/neos-development-collection/blob/9.0/Neos.ContentRepository.Core/Classes/Feature/NodeMove/NodeMove.php#L129

image

Node aggregate "75b063ce-c1cb-420e-a806-be34bbdd61cf" does not cover expected dimension space point set [{"language":"en_US"},{"language":"de"},{"language":"en_UK"}] but [{"language":"de"}].

unrelated

Right now locally I am running into the error
Bildschirmfoto 2024-11-15 um 09 45 59

Hint: I hard-coded the Strategy to SCATTER in the Neos UI

Expected Behavior

I would expect the same behavior as in 8.3 -> that I can cut& paste content to a parent even if the parent does not exist in the "original" dimension

Steps To Reproduce

  1. Copy & create "Features > Multiple Columns" to german
  2. Create new page in German under home named "Testing"
  3. Create "Three column element" in Testing
  4. Publish All
  5. Cut & Paste Any Content inside the columns in "Multiple Columns" to "Three column element" in "Testing"
  6. Error is thrown

Environment

- Flow:
- Neos:
- PHP:

Anything else?

No response

@mhsdesign
Copy link
Member

We should try to relax the constraint checks and introduce a test for this

@mhsdesign mhsdesign removed their assignment Nov 26, 2024
@mhsdesign mhsdesign moved this to Prioritized 🔥 in Neos 9.0 Release Board Nov 26, 2024
@kitsunet
Copy link
Member

kitsunet commented Nov 30, 2024

Just realized it's a mysql syntax error for you locally there, probably because your DB version doesn't support COLUMNS access to JSON yet, this is supported from:

MariaDB starting with 10.6.0

So maybe that fixes it already?

@mhsdesign
Copy link
Member

mhsdesign commented Dec 1, 2024

Paulas db is too old shes using MariaDB 10.5 see #4337

but the actual problem is still there, will update the description with the error once i reproduce it.

edit tested and updated

and after that error the paste button seems to be broken :D

image

-> this is actually a bug in 8.3: neos/neos-ui#3890

@mhsdesign
Copy link
Member

EDIT: i forgot to pull the ui update

but with neos/neos-ui#3876 i can confirm that it really works!

i suspect that

Hint: I hard-coded the Strategy to SCATTER in the Neos UI

was not done when you (paula) tested that originally and now the db error came into play.

So indeed can be closed.

I also checked 22 from 137 behat test failed if i mess with the logic and cases like

Scenario: Scatter a node aggregate by moving a specialization variant to a different parent. Then let a sibling variant follow suit and move the sibling before the node in both variants.

Move a single node after the last of its siblings, which does not exist in all variants

seem to say its perfectly tested and working!

@mhsdesign mhsdesign moved this from Prioritized 🔥 to Under Review 👀 in Neos 9.0 Release Board Dec 1, 2024
@mhsdesign
Copy link
Member

mhsdesign commented Dec 1, 2024

Though the problem - as desired? - persists for document nodes which are still gather all:

image

I cannot move the variant 'multiple columns' beneath 'german only' and for that case we might have to offer 'scatter' or at least display a nice message as this is not a bug but bad intention. And the optimistic node move by the neos ui is now in the wrong state (fixed after reload)

@kitsunet
Copy link
Member

kitsunet commented Dec 1, 2024

Though the problem - as desired? - persists for document nodes which are still gather all:

I cannot move the variant 'multiple columns' beneath 'german only' and for that case we might have to offer 'scatter' or at least display a nice message as this is not a bug but bad intention.

right but at least this is to be expected if it's not scatter.

@mhsdesign
Copy link
Member

mhsdesign commented Dec 1, 2024

Nice :D First win!

the page move as described here: #5368 (comment) is also broken for Neos 8.3

Node Multiple columns can not be moved. When moving Document Nodes, they are moved across all dimensions. For node Multiple columns, we attempted to move it across the following dimensions: - Language English (US) (ERROR: Non-Existing Parent) - Language English (UK) (ERROR: Non-Existing Parent) - Language French

image

So for the release its okay to keep that behaviour.
In the future i could imagine either detecting that case from the Neos ui and then offering scatter or introducing a gatherAllIfPossible strategy to prevent failure.

Though it might still make sense to make the error message a little nice for now ;)

@mhsdesign
Copy link
Member

so closing this as it has been fixed via neos/neos-ui#3876

@github-project-automation github-project-automation bot moved this from Under Review 👀 to Done ✅ in Neos 9.0 Release Board Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants