All too often, people turn on the clean URL feature without having mod_rewrite support and end up locking themselves out of their own site. We do have a clear FAQ on how to undo this problem, but it's still very annoying, especially because many people mess with a bunch of settings at once and don't realize what's causing their site to be 'broken'.
This patch tries to solve this issue by doing a test for clean URLs: the menu path "system/test" is registered, and is fetched with drupal_http_request() with a clean URL. If the request does not return HTTP 200/OK, then something is wrong with clean URLs and we gray out the option in the settings screen, because otherwise the option would cause the site to break.
| Comment | File | Size | Author |
|---|---|---|---|
| cleanurltest.patch | 2.43 KB | Steven |
Comments
Comment #1
moshe weitzman commentedvery clever. +1
Comment #2
TDobes commented+1... this will help users avoid what seems to have become a common mistake.
Comment #3
Stefan Nagtegaal commented+1 for the functionality, I' did run into this more than one time.. But, as pointed out earlier (http://drupal.org/node/12353), I don't think we should display the options which couldn't be used or from modules which aren't enabled..
Comment #4
Steven commentedUI rules dictate that you should disable options which can be enabled somehow, and only hide options which are not possible.
By disabling the Clean URL option rather than hiding it, we signal to the user that this option requires advanced configuration, but can still be used. The description of the clean URL option suggests looking at modrewrite support and .htaccess.
If we hide the option altogether, then people will wonder "why does my Drupal install not show the clean URL option? is this a bug? different version?" etc etc.
Comment #5
Bèr Kessels commented-1 for removing: that is considered bad ui design
From http://syllable.sourceforge.net/interface_guide.php: " If a menu item is unavailable it should be greyed out, not removed from the menu."
Comment #6
Stefan Nagtegaal commentedWell, in the general configuration I don't mind a lot.. But, in the block overview and modules overview i do find it really disturbing to see the 'Throttle'-fields when the module isn't enabled.. So, for this on this place a big +1.. But please, have some second thought on http://drupal.org/node/12353 and please comment on this one.
Comment #7
dries commentedLooks like a great feature. Feel free to commit this. Note sure it is required to install a test-page but I guess it makes sense from a performance point of view.
Comment #8
Steven commentedApplied to HEAD.
Comment #9
(not verified) commented