Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
toolbar.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
14 Feb 2014 at 00:25 UTC
Updated:
29 Jul 2014 at 23:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sam152 commentedPatch attached.
Comment #2
sam152 commentedComment #3
dcrocks commentedI'm not 100% sure but I think #2194763: 'back to site' button doesn't work on site configured for 'dirty' url's is a duplicate of this. Can you give more info on what error you actually saw? Steps on how to reproduce would help.
Comment #4
sam152 commentedThis is an entirely different issue. This isn't related to clean URLs or accessing index.php directly. Basically any time you leave the main website and venture into the admin panel, the state is saved so you can click "Back to site". Since the homepage is stored as an empty string, when the code included in the patch includes
if (escapeAdminPath)it prevents the button from appearing because empty strings are falsey in JavaScript.Since
sessionStorage.getItemreturns null for values that don't exist, we can safely update the condition to be more strict in it's checking.Comment #5
dman commentedYeah, the problem definition here, succinctly described as :
Is hard to treat as an actionable "bug"
Needs:
much more clear functional, testable steps to reproduce
a description of the fail state and the expected success state.
Anything else cannot be evaluated without a huge number of unstated assumptions.
Comment #6
sam152 commentedComment #7
sam152 commentedComment #8
sam152 commentedDman, thanks for the review of the issue summary. First time using the template, the "Proposed resolution" section seemed somewhat superfluous.
I have updated the issue with some more information to hopefully make this issue easier to follow.
Comment #9
dcrocks commentedTried to reproduce. When I run without clean url's, this doesn't happen. When I run with clean url's, this doesn't happen the 1st time I click on a toolbar admin tab, but does happen every time afterward. The process:
0. I'm running on OS X 10.6.
1. Clone a current dev copy of D8 into %username/Sites directory.
2. Modify .htaccess to turn on 'RewriteBase /~%username/drupal8'.
3. Run D8 install.
4. Sign in to drupal8. Toolbar is displayed at top of page.
5. Click on 'Content' tab and 'Back to site' button displayed.
6. Click on 'home'
7. Click on 'Content' tab again and 'Back to site button' is NOT displayed.
8. Repeat #6 and #7 n* times, with any any toolbar tab, and result always same, no 'Back to site' button.
Sign in and sign out and the behavior repeats.
Comment #10
dman commentedYeah I'm seeing this too. Can replicate.
This is indeed unexpected and a UI WTF.
I can confirm that this patch fixes it. as expected.
The code is a good fix.
Comment #11
dman commentedI was going to RTBC this when I reviewed, but was in a hurry so stepped back to consider if there was anything I hadn't thought of. Seeing as nothing has come to mind since then, I do vote this as good to go.
Comment #12
nod_Not a big deal but usually we compare things the other way around:
escapeAdminPath !== nullComment #13
sam152 commentedI have a habit of using yoda conditions. Is there a concrete precedent on this? I can provide a reroll if necessary.
Comment #14
nod_A precedent as in all the JS in core?
Comment #15
nod_Comment #16
webchickThis was screwing me up last week when I was taking screenshots for a presentation. Happy to see this fixed! Thanks, Sam152!
Committed and pushed to 8.x, along with un-yodaing the condition. :) Thanks!
Comment #17
dman commentedBravo!
Good to see work by @Sam152 at the DrupalSouth code sprint getting in here.
FIRST TIME CORE CONTRIBUTOR! - You get a badge!
Thanks all!