[MAGNOLIA-6957] I18nNodeWrapper no longer wraps child-nodes Created: 13/Feb/17  Updated: 10/Apr/17  Resolved: 06/Apr/17

Status: Closed
Project: Magnolia
Component/s: i18n
Affects Version/s: 5.5.1
Fix Version/s: 5.4.12, 5.5.4

Type: Bug Priority: Neutral
Reporter: Mikaël Geljić Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 1
Labels: i18n, link, upload
Remaining Estimate: 0d
Time Spent: 4d 5h
Original Estimate: 3d

Issue Links:
Relates
relates to MAGNOLIA-4866 Make sure every node and property ret... Closed
relates to MAGNOLIA-4031 i18n: doesn't work for binaries which... Closed
relates to MGNLUI-3602 info.magnolia.dam.app.ui.field.defini... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 86, Saigon 87, Saigon 88, Saigon 89, Saigon 90
Story Points: 5

 Description   

As Magnolia 5.4.11/5.5.2 restores support for upload fields with i18n. It now appears that the mgnl:resource nodes created with i18n suffix are not properly accounted for.

  • First, it appears I18nNodeWrapper no longer delegates #getNode to the I18nContentSupport, as it does for properties, and as it did between 4.5.2 and 4.5.8.
  • Once we sort this out, we should ensure link generation gets it right.

Thanks for reporting, tomwespi:

I tested with 2 languages (de/en), created an i18n file upload field, uploaded 2 files (test_de.pdf, test_en.pdf) and created a link to them with cmsfn.link(content.file).

It creates following, wrong link:
/test/main/0/test_de.pdf
/en/test/main/0/test_de.pdf

The files are saved correctly under the node
/test/main/0/file/filename ...
/test/main/0/file_en/filename ...



 Comments   
Comment by Oanh Thai Hoang [ 22/Mar/17 ]

Fail Jenkins in EE bundle

[INFO] [talledLocalContainer] Caused by: info.magnolia.jcr.RuntimeRepositoryException: javax.jcr.PathNotFoundException: about
[INFO] [talledLocalContainer]   at info.magnolia.jcr.wrapper.I18nContentDecorator.getI18nNode(I18nContentDecorator.java:71)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.wrapper.I18nContentDecorator.wrapNode(I18nContentDecorator.java:56)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.decoration.ContentDecoratorNodeIterator.wrapNode(ContentDecoratorNodeIterator.java:69)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.decoration.ContentDecoratorNodeIterator.next(ContentDecoratorNodeIterator.java:55)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.decoration.ContentDecoratorNodeIterator.next(ContentDecoratorNodeIterator.java:44)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.iterator.FilteringRangeIterator.queueNext(FilteringRangeIterator.java:105)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.iterator.FilteringRangeIterator.hasNext(FilteringRangeIterator.java:65)
[INFO] [talledLocalContainer]   at org.apache.jackrabbit.commons.iterator.FilteringNodeIterator.seekNext(FilteringNodeIterator.java:112)
[INFO] [talledLocalContainer]   at org.apache.jackrabbit.commons.iterator.FilteringNodeIterator.<init>(FilteringNodeIterator.java:42)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.util.NodeUtil.getNodes(NodeUtil.java:669)
[INFO] [talledLocalContainer]   at info.magnolia.jcr.util.NodeUtil.getNodes(NodeUtil.java:677)
[INFO] [talledLocalContainer]   at info.magnolia.templating.elements.AreaElement.end(AreaElement.java:279)
Comment by Jan Haderka [ 23/Mar/17 ]

Do we know which test was failing w/ that exception?

Comment by Mikaël Geljić [ 23/Mar/17 ]

There were tons of those, that one points to the about page, others pointed to variant nodes afair.

Generated at Mon Feb 12 04:19:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.