Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Feb 2014 at 11:13 UTC
Updated:
8 Aug 2015 at 19:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
divesh.kumar commentedI'll take on Authorization files.
Comment #2
divesh.kumar commentedMade required changes.
Comment #4
sidharthapHere it fails simple test.$title = $_SESSION['authorize_operation']['page_title']; Title is being render before this $title rendered to page.
Comment #5
divesh.kumar commentedHi sidharthap,
All of the instance of drupal_set_title are getting change without failing any test. However when I remove this one it fails the test.
Any help or pointers on this?
Comment #6
ianthomas_uk#2060401: Remove useless "early render" in authorize.php may be relevant
Comment #7
ianthomas_ukI started the attached patch from scratch, but it ended up broadly similar to #2.
#2 didn't replace the title it removed from authorize_access_denied_page(). That was presumably because it was inside a function, so you couldn't just use a local variable like some of the others. That function didn't seem to add much value, so I've just copied its contents inline (wrapping the 'Access Denied' title inside t() in the process).
There was a bit of a weird dance going on with $_SESSION['authorize_operation']['page_title'], because all of $_SESSION['authorize_operation'] gets unset, which is why drupal_set_title needed to be called from authorize_run_operation() and also why the title has to be restored in update_authorize_update_batch_finished. By changing the title to $_SESSION['authorize_page_title'] it won't get unset, so none of that is needed (the title will just be picked up from $_SESSION in authorize.php).
Comment #8
awochna commentedTested patch (drupal-2192653-set_title-authorize-7.patch) and everything works as expected.
Comment #9
wim leersI don't have a local FTP server going, so I can't use the update manager completely. However, I do get to see the previous "Update manager" title, so AFAICT all is well.
RTBC +1
Comment #10
webchickCommitted and pushed to 8.x. Thanks!
Comment #11
ianthomas_ukThis doesn't seem to have been pushed.
Comment #12
webchickSorry, Drupal.org hates me. Pushed now.
Comment #14
David_Rothstein commentedRemoving those broke the page title in some cases - adding it back in #2547667: Fix broken page title Update Manager (authorize.php). It is admittedly confusing why it needs to be there since it's also set elsewhere, but I think the other places only set it under a limited set of conditions or something.