Needs work
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Minor
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
9 Feb 2015 at 18:27 UTC
Updated:
31 Jan 2023 at 20:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
michelleLooking at this further, I think the issue is simply that the parameter name is not matching what it is in the docs. It's actually being used correctly so not really a bug, just an inconsistency.
Comment #2
ianthomas_ukFixed link
Comment #9
rodrigoaguileraLet's fix the inconsistency
Comment #16
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
At this time we will need a D10 version of the patch
Also a rescan of functions that may not be in the D8 patch.
Please do not just reroll without showing you searched
Comment #17
sahilgidwani commentedI will reroll the patch.
Also, @smustgrave should we change the issue version to D10?
Comment #18
sahilgidwani commentedI have searched for the hook_page_attachments occurrences throughout the D10 core and created a new patch for D10, also changed version of this issue to 10.1.x.
Moving it to needs review.
Comment #19
smustgrave commentedThank you for working on this.
Sorry didn't see your comment #17 until now but yes 10.1 is correct version
Applied the patch in #18 and searched the core repo for "Implements hook_page_attachments()" found 11 instances
They all appear to have the correct parameter name and the functions code were updated also to use attachements vs page.
Great work @sahilgidwani
Comment #20
bnjmnmThe argument is the page render array, so $page is a good name, and probably why it's used in so many spots. Renaming to
$attachmentsmakes the variable name less accurate. Going in the other direction also means significantly fewer changes, it should only require changing the hook definition/example in theme.api.php