I have a block based on a View using Node Reference. (Articles show the issue they came from - see here: http://www.rawvision.com/articles/baptista-antunes - the correct back issue should be showing in right sidebar but now it's showing the one that happened to be cached.)
In my eagerness to cache the heck out of my site (it was crashing server!) I mistakenly set the Views Block to "Cache once for everything (global)".
This was an idiotic mistake. I should have set it to "Per page."
I have reset the original block cache settings to "per page". However Boost is still showing incorrect Node References.
Rather than clear all Boost caches (2,300+) is there a best practices way to clear just this block?
Thank you for your help.
Comments
Comment #1
bgm commentedThis is not possible. Boost creates a single ".html" file for the whole page in the cache (you can see the cache on your server's filesystem in cache/normal/[domain]/[...]).
An option to regenerate your cache could be to crawl on a faster dev machine, and upload the resulting cache afterwards.
Comment #2
katharine_gates commentedThank you for this.
I think it would be very helpful for someone to come up with a cheat sheet (FOR IDIOTS LIKE ME!) on how to handle Views, Ubercart and Blocks with this module. In other words, some kind of recommendations on cache settings when a View involves an "Add to Cart" button.
Whatever I've done has completely hosed the Add to Cart button. The form actions are turning into some kind of cached mush. For example, sometimes, when anon users click on 'Add to Cart" they might go to another node entirely. Other times, they get the "Print" link.
On the few occasions when things do get added to cart, something goes terribly screwy with completing the Paypal sale as well and it hangs up at Paypal indefinitely.
Thank you for your help.
--kg
Comment #3
katharine_gates commentedOK here are some things I've figured out with Boost, Views and Ubercart, hope this helps others.
1) Under admin/settings/performance/boost
Statically cache specific pages: Cache every page except the listed pages:
cart
cart/*
checkout
checkout/*
user*
user/*
2) Under advanced settings: DISABLE Exit () inside of Boost _exit.
Comment #4
bgm commentedHi,
The Ubercart hook_exit() bug is in #679422: hook_exit() causes Ubercart "Add to Cart" to fail. We should probably make it a default setting (or hook_requirement) when Ubercart is enabled (or backport the solution from 7.x-1.x).
I added a Ubercart section in the "tips and tricks" handbook page, it's an important issue and I had forgotten about it:
http://drupal.org/node/583264#ubercart
Feel free to add more info in there. It's a great way to contribute back to the community.
Maintenance of the Boost module is tricky because we still have a lot of people still on Drupal 6, but we need to focus on improving in Drupal 7. I'm considering doing a 6.x-2.x branch that may have less features, but easier to use/support for the average use-case. (the way we deal with hook_exit in 7.x-1.x has changed, and is more reliable, in my opinion) Then again.. all that takes a lot of time :)
Comment #5
katharine_gates commentedThank you I did read that thread about the hook_exit.
What I really screwed up is in the block caching.
I finally get it (I think) that Boost uses the cache settings for individual block to determine the cache settings for a page.
On my site I have tons and tons of blocks with products on them that are used on pages with otherwise static content. It appears that I cannot cache blocks with products and "Add to Cart" buttons AT ALL as they are wrecking the posting functions of the buttons themselves.
Is this correct or is there some other reason why that might be happening?
http://www.rawvision.com
Comment #6
katharine_gates commentedHere's an example: Click on the "Add to Cart" button this page: http://www.rawvision.com/articles/artist-formerly-known-nikifor.
Instead of adding the product to the cart, it just takes you back to the same page. On other pages, the "Add to Cart" button is taking you to other weird places in the site. None of them involves adding anything to a cart.
I look at Source in Firebug and the form action usually shown inside the button is for some reason turning into a link instead of adding to cart?
I have this views block as "cache once per page" since it is based on a node reference and I figured that would be safe. I cleared all of the caches in Boost and elsewhere just to make sure.
Is this happening with anyone else? Should I not cache these blocks at all?
Any ideas? Broken site and very very angry client!
--KG
Comment #7
katharine_gates commentedOK I think I might have fixed this aspect at least by changing the settings for the views block that contains an "add to Cart" button into "Do Not Cache".
I do not understand why a block containing "add to Cart" cannot be cached but I guess I'll have to live with it.
This might be usf
-kg
Comment #8
mikeytown2 commentedSomething to look into is loading of the block via ESI or AJAX
http://drupal.org/project/esi