PECE-project / drupal-pece

PECE development repository
GNU General Public License v3.0
21 stars 28 forks source link

Language appearing twice on artifacts #486

Open mlncn opened 2 days ago

mlncn commented 2 days ago

See for example https://demo-pece.agaric.coop/content/what-has-taiwan-gained-and-lost-20-years-operation

Screenshot 2024-10-13 at 20-49-50 What has Taiwan gained and lost in 20 years of operation PECE

mlncn commented 2 days ago

The core langcode is displayed as configured in manage display / layout builder.

The additional field-language-display form element is shown only to administrators.

mlncn commented 2 days ago

Both appear to be the wrong field entirely, or else Custom Language field | Drupal.org does really weird things, and i think maybe it does.

mlncn commented 2 days ago

The fields look identical in bloody layout builder which hides essential information like machine name, even the configuration options are almost the same and certainly no real indication of which is better, but the first one here is the core langcode field, that's the actual language of the content (and English on versions of not applicable are the only options), bad, do not want to display:

Screenshot 2024-10-13 at 22-36-05 Edit layout for Artifact - Image content items PECE

And the second one is the field_language, which is the correct field, it displays correctly, and no extra stuff displays.

Screenshot 2024-10-13 at 22-40-13 Edit layout for Artifact - Audio content items PECE

Why/how it displays itself a second time for admins i have no idea, but if it is not displayed at all, that is not a problem.

However i do think that Custom Language Field is trying to stay synced with the core langcode and we do not want that, we should switch to something that stays independent.

mlncn commented 2 days ago

Well despite what that fixed issue says, i have tested switching both the langcode and the field_language and neither one affects the other so i think we are fine "simply" making sure we do not place the wrong field. I guess the duplication, as bizarre as it is, is a very helpful indicator that the wrong field has been placed, before we start confusing people by listing "Language: English" for artifacts in Russian and whatnot.