[MTE-132] Wrong description for title fields are always shown Created: 15/Aug/21  Updated: 25/Mar/22

Status: Open
Project: Magnolia Templating Essentials
Component/s: None
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jordie Diepeveen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-08-15 at 09.46.37.png     PNG File Screenshot 2021-08-15 at 10.02.01.png     PNG File image-2021-08-15-10-02-46-263.png    
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:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:

 Description   

All fields with the name 'title' are showing the description icon with the following text:

Enter a title for the link. If no title is entered, either the page URL or the title of the linked content will be used.

 

 

This translation is specified in the file magnolia-templating-kit-messages_en.properties as "fields.title.description".

 

The translation now counts for all title fields, and title is a field that is used in almost all dialogs. Also the translation is really specific for a link field and not a generic title field.

Also this is really bad practice to have a field translated on the most global level, but the translation is specific for another field.

 

Possible solution: Remove it, or rename it to be more specific for the type of field so it will not interfere with generic fields.

 

Steps to reproduce

  1.  Create a dialog definition with a title field
  2.  Open that dialog
  3.  Click on the  -icon
  4. The wrong translation is displayed

 

Expected results

The  icon should not be there if no description has been provided in the dialog definition, or message-bundle.

Actual results

The  - icon is shown behind all title field.

Workaround

add the following items to the message bundle of your owne module:

fields.title.description=

Development notes

 



 Comments   
Comment by Roman Kovařík [ 16/Aug/21 ]

Hi jdiepeveen,

 

Thank you for reporting the issue.

add the following items to the message bundle of your owne module:

fields.title.description=

This could work only if you are "lucky" and classloader loads your i18n file after magnolia-templating-kit-messages_en.properties. (the order is not controlled by module dependencies order).

You can hotfix https://demo.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/mtk2/i18n/magnolia-templating-kit-messages_en.properties:edit and remove the problematic keys from the MTK file (or provide longer / more specific keys for those).

Alternatively, if you are not using MTK2 templates (e.g. you are still on older MTK), you might remove MTK2 from the webapp. 

 

Regards

Roman 

 

Comment by Jordie Diepeveen [ 16/Aug/21 ]

Hi Roman,

You are correct, the workaround is kinda bad. The other workarounds are also valid of course, but it will mean additional work .

Regards,

Jordie

Generated at Mon Feb 12 07:41:49 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.