Problem/Motivation

The tab strip built by CloudflarePurgeLinks::build() attaches the cloudflare_purge/navigation library only on its own render element, which carries a #cache keyed by route + permissions. That element's bubbled #attached can be served stale from the render cache: we observed the credentials page (with settings.php overrides) rendering the tab markup while nav.css was absent, so the tabs fell back to a plain bullet list.

Proposed resolution

Also attach the library at form level, next to the existing cloudflare_purge/form attachment in CloudflarePurgeForm, so the stylesheet loads regardless of the sub-element's cache state:

     $form['#attached']['library'][] = 'cloudflare_purge/form';
+    $form['#attached']['library'][] = 'cloudflare_purge/navigation';

Comments

julien created an issue. See original summary.

julien’s picture

Status: Active » Needs review
StatusFileSize
new1 KB

Attaching the patch.

julien’s picture

Issue summary: View changes
flashwebcenter’s picture

Status: Needs review » Fixed

Hello,

Thank you for the patch. Done and committed to the 3.1.x-dev branch. The navigation library is now attached at the page level on all 9 pages that render the tab strip, and the scan confirmed it loads only on those pages.

Best wishes,
Alaa

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.