I'm having an issue getting Boost to cache panels pages that have url variables at the end, specifically the paging variable page=0%2C1 generated from using a pager with views. I have the option in the settings page turned on to cache pages with url variables but the panels pages with url variables don't seem to be getting cached. All other pages/content are being cached correctly by Boost.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | boost-632746.patch | 1.01 KB | mikeytown2 |
| #9 | boost-632746.1.patch | 10.56 KB | mikeytown2 |
| #8 | boost-632746.patch | 9.54 KB | mikeytown2 |
| #7 | boost-632746.patch | 9.54 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedpage=0,1Turn verbose to level 9 and try to cache the page. If it doesn't cache, turn off "Only allow ASCII characters in path" and try again. Let me know what the dblog shows in both cases.
Comment #2
atracht commentedIt appears Boost is caching the non comma escaped version of the url string, so page=0,1 gets cached when the url shows page=0%2C1
Since the paging links still remain page=0%2C1 the cached version is not shown unless page=0,1 is typed in manually in the address bar.
Is this a specific issue with Boost or is there an issue I'm having with Drupal escaping certain characters in url strings?
Here's the output of the debug first with only ascii characters on, then with the setting off.
Comment #3
mikeytown2 commentedSounds like to do this correctly I need to save both versions of the html; one with url encoded strings, one without url encoded strings. This is an apache issue; it appears that apache is looking for a file that contains
%2Cinstead of a file that contains,. To verify my hypothesis would you mind copyingnews_page=0,0.htmltonews_page=0%2C0.htmland see if the cached version gets served.Comment #4
atracht commentedWhen copying
news_page=0,0.htmltonews_page=0%2C0.htmlthe cached version gets served.Comment #5
mikeytown2 commentedComment #6
mikeytown2 commentedNeed to make a function that will output a list of potential filenames given the input and settings; otherwise this is going to get unmanageable.
First step is to apply urlencode() to the filename, if it's different then save that copy as well. Internally they are already urldecoded. After that apply gzip if wanted.
Comment #7
mikeytown2 commentedComment #8
mikeytown2 commentedWRONG FILE
Comment #9
mikeytown2 commentedComment #10
mikeytown2 commentedcommitted
Comment #11
atracht commentedAfter applying the patch it appears that Apache still isn't serving the cached file. The page is being saved as
news_page%3D0%2C0.htmlbut will only show up if renamed tonews_page=0%2C0.htmlIt looks like the equal sign being encoded is causing the problem.Comment #12
mikeytown2 commentedthanks for pointing that out; try this patch, hopefully this does it. I may want to be selective and only encode certain characters instead of doing it this way.
Comment #13
atracht commentedThe last patch seems to fix it for me. The cached pages are now being served. Thanks!
Comment #14
mikeytown2 commentedThanks for testing. Committed.