Skip to content

BUGFIX: Take the retranslation language from the inspected node - #107

Open
gradinarufelix wants to merge 1 commit into
3.3from
bugfix-retranslation-language-from-inspected-node
Open

gradinarufelix wants to merge 1 commit into
3.3from
bugfix-retranslation-language-from-inspected-node

Conversation

@gradinarufelix

Copy link
Copy Markdown
Collaborator

Client-side counterpart of #106 for the Neos 9 line.

Problem

useNodeInfo takes the node from the inspected node but the coordinates from the globally active dimension. The Neos UI marks a newly selected dimension as active before it resolves the document in it, and while the "create variant" dialog is open the inspector still shows the node of the previous dimension. The view then reports the retranslation status of a variant the editor is not looking at, or {} coordinates keep the query disabled.

On the Neos 8 line the same mismatch produces a server error, because that controller resolves the node before it checks for a referenceLanguage (see #106). Here the controller tolerates it, so the symptom is a silently wrong status rather than a failure.

Change

Read the dimension space point from the inspected node's address, which the hook already parses for the content repository id, instead of the active dimension. Node, content repository and coordinates then always come from the same address.

The dimension values are passed through as before, so DimensionSpacePoint::fromArray in getTranslationMetadataAction receives the same shape it does today.

Verification

  • Plugin.js rebuilt with the pinned toolchain (yarn 4.15.0, esbuild 0.25.1); the diff is the change plus minifier symbol churn.
  • Not verified in a running backend, and .github/workflows/build.yml only triggers for 3.0, so this PR gets no CI run.

The view combined the inspected node with the globally active dimension. When the editor
switches to a dimension the node does not exist in, the Neos UI marks the new dimension
as active before it resolves the document, so node and dimension did not belong together
while the create-variant dialog was open, and the reported status belonged to a different
variant.

Read the dimension space point from the inspected node's address instead, which is
already parsed there for the content repository id.
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

Successfully merging this pull request may close these issues.

1 participant