Closed (won't fix)
Project:
CacheExclude
Version:
6.x-2.1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2012 at 17:57 UTC
Updated:
16 Dec 2015 at 05:14 UTC
Jump to comment: Most recent
Comments
Comment #1
Ludovik commentedHi.
I have the same problem. I set to exclude my home page. Does anyone know what to do?
This is what appears on the home page for the anonymous users since I installed Cache exclud: "The page you requested does not exist. For your convenience, a search was performed using the query 403 shtml."
Comment #2
Crell commentedI have no idea what that error message means. All this module does is toggle the global cache variable off. I don't know how it could possibly cause pages to not exist unless you have something else going on.
Comment #3
fandreatta commentedHi Crell,
We faced a very simmilar issue on a site of ours. We realized that, when cacheexclude executes the hook_init, it validates whether the current node should be cached or not, by checking its type. The following code shows that:
But, on a custom module, when a menu item is defined using the hook_menu, and the access callback is a function declared in a separated file (probably loaded on hook_init), the execution of menu_get_object('node') tries to identifies the permission of this item before loading the file that declares the access callback function.
Is is possible to validate if the current path is a node before executing the menu_get_object('node') call?
Thanks very much
-- Fábio --
Comment #4
Crell commentedUgh. That issue. I don't know of a way around it, I'm afraid. That's a design flaw in Drupal 7. The only thing I can think of is to not use menu_get_object() but use arg() instead, but I don't even know if that would work and I refuse to use that crime against nature in a module. :-)
Comment #5
m4oliveiHello,
We had this issue as well. We were excluding only the home page and found that the 404 response somehow got by the cacheexclude rule and got cached. Sounds like the exact circumstance OP had and @fandreatta. I don't understand the comment in #3 though, it's not making sense to me, as for the homepage, in cacheexclude_init() it should match the first if statement, set cacheable to FALSE and return. How can the homepage possibly get cached as 404 here?
In our case, I was able to refactor so that we no longer had to exclude the homepage and I could turn off cacheexclude. Then the issue went away (at least I hope) after that.
Thanks,
Matt
Comment #6
Crell commented