1

I'm using CE Cache's Static driver, which essentially uses EE to generate the first view of a page, and then saves the output to a text file, which is served on subsequent page views; pretty easy to setup, and, super fast.

We have a simple, keywords only, Low Search form in the header of every page on our site. It looks like it includes a couple of fields that might be unique to the user/session/cookie, XID, and, possibly, param?

When another user comes in and performs a search on a cached page, they're getting an error - "you are not authorized to perform this action."

Is there anything I can do to get the Low Search form working? Any potential "gotchas" to just building a form that will GET to generate the correct URL, e.g. example.com/search/?keywords=widget ?

Currently using EE 2.7.2, Low Search 3.0.3 (I just saw that that's out of date now), and CE Cache 1.10.1.

3
  • 1
    Before anything, I'd upgrade to the latest version of Low Search, and see if the problem persists. There was some work done with the whole XID bit.
    – Low
    Mar 14 '14 at 18:59
  • Will update and report back as soon as I can on this, which will likely be next week. Was able to work around with no apparent ill-effect by just building a form that builds the correct URL. Mar 14 '14 at 21:14
  • @Low, thanks for patching that bug, it looks like it's cleared up the issue relating to XID (see my answer below). Mar 18 '14 at 18:33
0

There are (were) two issues at play here:

Bug with Relying on XID Would Break Search Form for Users who Didn't Generate Cached Version of Page

The search form's XID getting cached on non-results pages was causing trouble, but appears to be resolved upgrading from Low Search 3.0.3 to 3.1.2. I'll attempt to check back in and confirm this, but early testing looks promising.

Low Search Results with CE Cache Static Driver

When search results pages are built with a query string (example.com/search/?keywords=foo, CE Cache's static driver ignores (rightfully so) query strings.

This can be worked around by using encoded queries which replace the human readable query string /?keywords=foo with hashed segment eyJrZXl3b3JkcyI6ImhlbGxvIHdvcmxkIn0, which should play nicely with CE Cache's static driver.

In the event that encoded queries are unacceptable, any of CE Cache's non-static methods should work just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.