Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The hook_page_top() implementation for the node module has a wrong definition. The function argument should be called $variables
, not $page
. And the node_preview
form container should be added directly into the argument, not into a 'page_top' sub-key.
Comment | File | Size | Author |
---|---|---|---|
#24 | reroll_diff_19-24.txt | 1.26 KB | sahil.goyal |
#24 | 2832074-24.patch | 1.27 KB | sahil.goyal |
#21 | interdiff_20-21.txt | 337 bytes | Tanuj. |
#21 | 2832074-21.patch | 1.09 KB | Tanuj. |
#20 | drupal-fix_node_page_top_hook_implementation-2832074-20.patch | 1.28 KB | Medha Kumari |
Comments
Comment #2
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedThis patch might break some alter hooks that rely on the `node_preview` form container being in the wrong place.
Comment #3
Chi CreditAttribution: Chi commentedThe hook definition suggests $page_top.
Comment #4
BerdirNeeds work because of #3.
Comment #7
SweetchuckComment #8
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedLooks like a good small cleanup :)
Comment #18
DanielVezaSame issue still exists on 10.1.x, the patch will just need to be rerolled and tested against 10.1 to make sure it still passes tests.
I think
\Drupal\node\Form\NodePreviewForm
can be replaced with NodePreviewForm::class, but I'm unsure if thats out of scope for this.Comment #19
leolandotan CreditAttribution: leolandotan at Merkle commentedI have rerolled the patch for 10.1.x but didn't include the replacement of
\Drupal\node\Form\NodePreviewForm
with
NodePreviewForm::class
yet. I also didn't remove the "Needs reroll" tag since it would still need it for 9.5.x. I hope this is alright.Comment #20
Medha KumariRerolled the patch #19 in drupal 9.5.x.
Comment #21
Tanuj. CreditAttribution: Tanuj. as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedFixed CCF on #20
added interdiff text
Comment #23
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedwork on this
Comment #24
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedReroll patch again for the version 9.5.x considering #18 and attaching the reroll_diff corresponding to #19
Comment #25
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #26
ameymudras CreditAttribution: ameymudras at Salsa Digital commentedTested on 9.5.x patch #24
1. The issue summary is clear and explains the problem
2. The code change is as expected and as described in the issue summary
3. Applied the patch and checked for the "back to content editing" link on the node preview, which is shown as expected
4. Additional tests are not required in this case
Looks RTBC to me.
Comment #27
catchCommitted/pushed to 10.1.x, thanks!
Comment #28
catch