Skip to content

Fix featured articles homepage hook#5263

Open
kopfduenger wants to merge 1 commit into
openlibhums:masterfrom
kopfduenger:community/featured-homepage-hook
Open

Fix featured articles homepage hook#5263
kopfduenger wants to merge 1 commit into
openlibhums:masterfrom
kopfduenger:community/featured-homepage-hook

Conversation

@kopfduenger
Copy link
Copy Markdown

No description provided.

@kopfduenger
Copy link
Copy Markdown
Author

This PR fixes the Featured Articles homepage element so it no longer depends on the display name "Featured Articles" to decide whether the hook should run.

The previous implementation checked the element name, which made the feature fragile: if a journal renamed the homepage block, the featured articles context was no longer added and the block could stop rendering its articles. The change uses the stable configure_url (featured_articles_setup) instead, and also exposes that identifier in the plugin hook registration.

I added coverage for both the hook-level behavior and the journal homepage rendering case where the element has been renamed, so the intended behavior should be protected from regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant