merkle-open / aem-generic-multifield

Generic Multifield component dialog extension for AEM
MIT License
15 stars 6 forks source link

Language Copy for a CF Path #68

Closed tmastalirsch-tlv closed 3 weeks ago

tmastalirsch-tlv commented 3 weeks ago

Hello everyone, in my project I have a problem with your generic multifield. The dialog have a reference to a cf path, see pictures below. Now, when I create a language copy of my page, the value or the path will not change to the specific language, like EN The crx saves the german path here in the example.

Do you have any ideas where can fixed or is the issue not know ?

I hope you can help :)

Screenshot 2024-10-08 at 15 50 08 Screenshot 2024-10-08 at 15 50 16 Screenshot 2024-10-08 at 15 51 17

MichaelHeil commented 3 weeks ago

Hello @tmastalirsch-tlv,

so you are expecting component properties of a language copy to automatically adjust themselves to what logic? That is not really how language copies work. The content of your copied page, and thereby the copied component with the references to content fragments will not automatically adjust "pathbrowser" component dialog properties to an alternate language version.

regards, Mike

tmastalirsch-tlv commented 3 weeks ago

Hey @MichaelHeil,

I also have a component on my site, SimpleLink, which has a linkPath as "pathbrowser" field to a german language page, like “/content/wknd/de/path/to/other/page”. If I create a Language Copy from this page where the SimpleLink component is present, the linkPath automatically becomes “/content/wknd/en/path/to/other/page”. I would have assumed that this would also happen with the generic-multifield, where the sub dialog only contains a "pathbrowser" field.

mkiti commented 3 weeks ago

Hi @tmastalirsch-tlv , I think you are looking for the error in the wrong place. I think it is rather a problem with language copy and paths pointing to content fragments or experience fragments. There are various posts on the internet that point to such problems, e.g. https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/language-copy-issue-with-experience-fragments-references/m-p/273527

You can use a path that points to a regular content page as a test.

tmastalirsch-tlv commented 3 weeks ago

Hi @mkiti

the problem was already addressed once in SP 16 and then fixed with SP 19 NPR-41364.

My question is if there is anything I need to consider with the generic-multifield or is it apparently still a problem with Adobe ?

MichaelHeil commented 3 weeks ago

Hello @tmastalirsch-tlv,

it seems that I have initially misunderstood your intension of what you are trying to achieve.

The problem you are addressing is Adobe internal. You can easily confirm this by creating a use case for yourself. Create a dummy component without the generic multifield, which contains a pathfield property. Set a reference to a CF within that component. Then create a language copy of the page containing an instance of such a component in a valid language copy content tree setup. Check if your reference to the CF now behaves as you intended.

We have internally just created a use case with the generic multifield containing "cq/gui/components/coral/common/form/pagefield" as well as "granite/ui/components/coral/foundation/form/pathfield" properties. All references within the generic multifield instances towards pages resolve correctly to the language copies as expected.

regards, Mike

tmastalirsch-tlv commented 3 weeks ago

Hi @mkiti & @MichaelHeil,

we found a workaround for add translation rules on a specific assetNode :). Thx you for your feedback.

regards Thilo