- Issue created by @FeyP
Looks like theme hooks are called after module hooks and theme hooks are not listed in hook_module_implements_alter(), thus the current implementation in Klaro doesn't allow to manage page attachments added (or, to a limited extent, altered by) themes using hook_page_attachments_alter().
Add a page attachment in a theme using hook_page_attachments_alter() according to the documentation also linked from the help text of the "Attachments" option in the service definition. Add the attachment id to a Klaro service. Verify that Klaro doesn't manage the attachment.
For now, probably update the help text and clarify that attachment handling doesn't work for attachments added via themes to warn users.
Investigate, if this changes with the new hook implementation in Drupal 11 and later. If so, try to support this in Drupal 11 and later. If not, file a core issue that proposes any necessary API changes so that Klaro can manage these attachments in the future.
Active
3.0
Documentation