PECE-project / drupal-pece

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

Language appearing twice on artifacts #486

Open mlncn opened 1 month ago

mlncn commented 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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.

mlncn commented 3 weeks ago

i believe Lindsay has fixed all of these now.

mlncn commented 2 weeks ago

@lindsaypoirier reports still twice on one particular artifact type but which one is not in the notes.

See https://github.com/PECE-project/drupal-pece/issues/486#issuecomment-2409842650 for why this happens.

To prevent mistakes like this opening an issue to reduce what layout builder allows to be placed to the things that make sense #509