To Reproduce:
- Turn clean URLs off AND disable mod_rewrite. mod_rewrite must be off, since D7 allows and uses clean urls even if they are disabled.
- Go to the overlay dashboard.
http://localhost/drupal_cvs/#overlay=%3Fq%3Dadmin -
If you click "edit" on a piece of content in the "Recent content" block, you are taken to the edit form:
http://localhost/drupal_cvs/?q=node%2F1%2Fedit&destination=%23overlay%3Dadmin -
If you submit the form, you end up back at:
http://localhost/drupal_cvs/#overlay=admin
This makes the overlay attempt to load http://localhost/drupal_cvs/admin, which results in a 404 error.
It also occurs if, instead of pressing submit, you press the "Add to Default Shortcuts" plus symbol next to the title.
It is pretty clear by comparing the first and last url that the "q=" is getting lost along the way.
The cause seems to be that the click handler in overlay-parent.js doesn't take clean URLs into account when it is rewriting the overlay links.
This patch adds a JS variable for clean URLs and adds a URL encoded "?q=" before the overlay destination in the redirect, so that the proper redirect is formed. Is there a Drupal standard way to check clean URLs in JS?
Thoughts?
Comment | File | Size | Author |
---|---|---|---|
#12 | d7-overlay-404-789920-12.patch | 1.4 KB | loganfsmyth |
#10 | d7-overlay-404-789920-10.patch | 1.44 KB | loganfsmyth |
#9 | shot-errors-un-def-index.png | 454.12 KB | marco71 |
#1 | d7-overlay-redirect.patch | 922 bytes | loganfsmyth |
Comments
Comment #1
loganfsmyth CreditAttribution: loganfsmyth commentedHere is the patch.
Comment #2
loganfsmyth CreditAttribution: loganfsmyth commentedI can't reproduce this anymore, so I think that it was fixed at some point. My sample case definitely doesn't work now since editing a node takes you out of the overlay entirely.
Comment #4
andrea.paiola CreditAttribution: andrea.paiola commentedmod_rewrite turned off
New dev install, modify an article redirect to /#overlay=admin/content then redirect to /admin/content generating 404 error.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedIt seems like some parts of the overlay don't work correctly with clean URLs turned off yet. For example, with clean URLs turned off, when you add a shortcut via the "+" icon next to the page title the shortcut does not immediately appear in the toolbar.
A lot of this (particularly in the case where you have turned mod_rewrite off on a server where it used to be on) may be a duplicate of #13594: Fix 404 handling without clean URLs, though - i.e., not specific to the overlay.
Comment #6
mightyiam CreditAttribution: mightyiam commentedI'm experiencing this:
http://drupal.org/node/852190
Perhaps it is a duplicate of this one?
There is an easy way to test this issue - by editing a user.
Blessings,
Shahar
Comment #7
sun#852190: Redirected to admin/people after changing user info even when Clean URLs are not enabled has been marked as duplicate.
Comment #8
marco71 CreditAttribution: marco71 commentedI think I have this problem with a 7.2 manual install. But you guys are talking 8.0 right?
Just downloaded 7.2 and experience not being able to navigate to the admin/config page.
(apache2.2.19/ PHP 5.2.17)
I end up with a URL like so
http://localhost/?q=node#overlay=%3Fq%3Dadmin/config
Also editing this does not get me to the page. I get a blank screen.
Might this be related?
Regards Marco71
I now imported the non fuctioning site into a acquia-stack-installer set up and now thing work.
(apache2.2.17/ PHP 5.2.17)
I tried many of the things I read about apche config for Drupal mod rewrite and all that but that wouldn't work.... Still on this.
Comment #9
marco71 CreditAttribution: marco71 commentedAdded a screenshot
Comment #10
loganfsmyth CreditAttribution: loganfsmyth commentedHere is a rerolled patch that does the same thing as the previous patch.
This is still happening, but it isn't quite so bad now because it does not error our at step 4 anymore.
Now it redirects /#overlay=admin to /admin, which now works because of the changes to how drupal processes clean urls. That behavior is still wrong though, since it should go back to the overlay.
@marco71 Those errors you posted in #9 don't look related to this unfortunately. That looks like it would be caused by one of your modules having a non-existent access callback.
The link to admin/config that you posted works on my D7 copy, so perhaps you have something configured strangely?
Comment #12
loganfsmyth CreditAttribution: loganfsmyth commentedOops, forgot to make the patch have the right base directory.
Comment #13
lyricnz CreditAttribution: lyricnz commentedPatch doesn't fix problem as described in #1193796: Page not Found When validating a modification of a taxonomy term.
Comment #14
WilliamB CreditAttribution: WilliamB commentedSorry, is there any patch for 7.2 for this issue?
Comment #15
WilliamB CreditAttribution: WilliamB commented2nd bug that is critical for 7.2 and that lacks backport to 7.2 ...
Is there any chance someone could post their fix, because as it is it redirect me everytime after editing taxonomy and nodes to the error not found page.
Comment #16
lyricnz CreditAttribution: lyricnz commented@WilliamB: either fix your clean urls, or turn off overlay module.
http://drupal.org/getting-started/clean-urls
Problem is not unique to 7.2 - it's been around a while. Chances are your upgrade broke clean urls (.htaccess file?), which made this bug apparent.
Comment #17
WilliamB CreditAttribution: WilliamB commentedThank you, found out that the problem was related to apache config.
Sorry about that.
Comment #18
David_Rothstein CreditAttribution: David_Rothstein commentedLooks like this should be needs review for the patch in #12 (I think?).
Comment #19
commander_keen CreditAttribution: commander_keen commentedRunning fresh Drupal 7.1 on IIS6 this error is still present. (clean URLs cannot be used on IIS)
It redirects from /#overlay=%3Fq%3Dadmin%252Fpeople to /admin/people and throws a 404 not found.
The patch from loganfsmyth works, the problem is fixed afterwards. Only the line-numbers are already outdated. Please apply this fix to a release!
Comment #20
xgougeon CreditAttribution: xgougeon commentedAlso running fresh D7...
Can't edit taxonomy terms !!!! -> page not found when I click "Save"... Great.
Is there a definitive solutions ???
Comment #21
webbermusic CreditAttribution: webbermusic commentedI found a solution that works for me, maybe for others too???
I have two test sites on my laptop, one for commerce and one for ubercart. The ubercart taxonomy module would not update, the commerce one would update.
So I looked in admin/modules/list and compared the two.
Adding chaos tools, rules, and views modules seems to have fixed it. If not than something else did, in any case I can now update modules.
Caveat - I'm a complete beginner at this and don't know what I'm doing so don't be surprised if it doesn't work for others but I suspect that if a backup is done first (probably files and dbase) then not too much damage can be done by adding modules.
Hope this helps.
Comment #22
webbermusic CreditAttribution: webbermusic commentedThe plot thickens:
It happened again, couldn't save updates. Turned off (disabled) taxonomy manager and updates can be saved again.
Will it last?
no
Comment #23
fkelly12054@gmail.com CreditAttribution: fkelly12054@gmail.com commentedNew local install of 7.17. Being sent to admin/people, thus generating a 404 upon saving a user change. Reading this thread, turned off overlay module. Problem disappeared.
Note: user change was completed, destination AFTER the change was incorrect.
Comment #24
David_Rothstein CreditAttribution: David_Rothstein commentedI think the changes to clean URLs in Drupal 8 do mean this is a Drupal 7 bug only now (at least that seems to be the case based on some quick testing).
In general, please check that before changing the version away from 8.x, though... thanks :)
Comment #25
mgifford12: d7-overlay-404-789920-12.patch queued for re-testing.