Closed (works as designed)
Project:
Boost
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2013 at 13:12 UTC
Updated:
22 Dec 2014 at 12:46 UTC
Jump to comment: Most recent
Comments
Comment #1
drupalove commentedUpdate: Just noticed there is a similar issue at http://drupal.org/node/403814 which did not offer a solution to my case.
Comment #2
bnayal commentedI had a similar bug,
When the page alias path is for example: "about/company.html"
and a user tries entering the url with a trailing slash, for example: "about/company.html/" drupal does loading the correct page but boost does not caching it.
I noticed that the bug is in boost.module, in function "boost_transform_url" boost tries loading from drupal_get_normal_path the real node url and with trailing slash it cannot do that.
A workaround which I did and works for me (from first looking) is replacing:
With:
it checks if it didn't find the real path and if so tries again without the trailing slash. but it costs in another db query.
Any thoughts?
Bnaya
Comment #3
alan delval commentedWorks without problem #2, using Trailing Slash.
Configuration used (Nginx): https://github.com/perusio/drupal-with-nginx/blob/D7/apps/drupal/drupal_boost.conf
I think until now is the only thing that works.
Comment #4
Anonymous (not verified) commentedI am struggling to understand why
is a boost problem. The standard drupal rewrite rules go, if it's not a file or a folder then redirect to index.php which would be cached, so why the installation of an additional module to enforce a trailing slash on an incorrect URI like index.html/ which should result in a 404 should be boost's issue is beyond me. Surely the trailing slash module if it has modified the URI should therefore then change the values and not boost ? Surely boost is working correctly because it is not caching a URI that should result in a 404, it makes little sense to me to modify boost for a limited case to fix broken behaviour by another module, or by a user putting in an incorrect URI.
Comment #5
drupalove commentedI certainly agree with what are you're saying. This issue is old; the search engines and people's understanding of URLs have changed. The standard drupal's URL alias probably meets the needs of everyone. The few cases not covered, if any, can use bnayal's suggestion in comment #2.
I think this issue should be closed since the boost module is not responsible for extending the trailing slash module to meet special cases, would you mind if I close it.
Comment #6
yultyyev commentedI get this issue but only on taxonomy pages that very strange. So I tried to solve this by hacking boost module.
boost.module, line 436
Function request_uri() return $uri = '/' . ltrim($uri, '/'); - allowing trailing slash, so I think it would be fine if in the boost module to clean up trailing slashes:
Comment #7
ymeiner commentedIt seams that the problem here is not exactly request_uri() in boost_transform_url but the lack of hook to control the url structure if needed. I can think of more reasons why the url var should be flexible.
what is the procedure to re-open the issue so we can add a hook to control $url? something like $url = module_invoke_all($hook); before the check if URL is empty.
BTW, if someone chose to go with #6 just fyi that you will also need to change htaccess to fit.
Example: