-
Notifications
You must be signed in to change notification settings - Fork 10
Description
What is this?
A long title for a simple issue:
We don't verify if the loaded defaults still apply. Issue is that we allow settings to be set via YAML but there is not further/post validation. Because of that if an exposed endpoint is configured to use a given Metadata display entity ID, and that one is missing you get a whitescreen on /admin/config/archipelago/metadataexpose
Error: Call to a member function get() on null in Drupal\format_strawberryfield\Entity\Controller\MetadataExposeConfigEntityListBuilder->getDemoUrlForItem() (line 98 of /var/www/html/web/modules/contrib/format_strawberryfield/src/Entity/Controller/MetadataExposeConfigEntityListBuilder.php)
#0 /var/www/html/web/modules/contrib/format_strawberryfield/src/Entity/Controller/MetadataExposeConfigEntityListBuilder.php(63): This is a bug. I just removed a stray/orphan config from esmero/archipelago-deployment@c48e827. So if you are there, do a git pull and sync or simply edit your config.
Code solution is to check and disable if no metadata display entity exists for the configured endpoint. IF you encounter this problem then adding an empty template with missing ID also serves the purpose or even removing the config/setting config to an existing one via configuration sync.
Long term solution is to store UUIDs on the config (needed, not numeric ids !) and always check