Are you sure that plugin is still activated? Try legacy mode instead?
I would implement this in Javascript rather than PHP. Then you can server supercached pages to every user. The Javascript would detect if the cookie was there, and set it and display the message if not.
Yes i’m sure it’s active (log-file is generated).
Javascript would work only for those who have js enabled (10% doesn’t according to analytics) and i can’t get the http_referer. The code above is only a snippet of my script. I also make different boxes for different referers. Another plugin of mine (doesn’t work anymore) handles the location-setting. I show different posts in the stream for different locations (Austria – Germany). So JS isn’t really a solution.
Do you have another guess why it doesn’t work anymore. Or can i stop the process of making supercached pages and only serve the wp-cache-md5 files? Is this a good idea? Why are wp-cache- files and supercached files generated anyway?
Thanks
-Alex
hi, i’m still stuck on this one. Do you have any further suggestions?
Please help.
I don’t see why you can’t use AJAX to load a PHP script that does all the heavy lifting and print the message to the user. Sure, 10% might not have JS installed but they’re not going to be your average user anyway.
Hi Donncha,
sure it is a solution for the fancybox-problem, but not for the location-problem. Can you have a short look on my site.
In the upper right corner is a dropdown containing flags. If you switch to the austrian flag, you only see content which is appropriate for austrians. This works because of the GET Parameter (supercache doesn’t cache requests with GET parameter). Now the cookie pj_lang is set and on the next request it should load a cache file with the Countryname in the cachekey, but this doesn’t work.
Now i may have found a solution for my problem but i’m afraid to change this setting without your insights.
A excerpt of my current wp-cache-config.php:
$cache_compression = 0; //Added by WP-Cache Manager
$cache_enabled = false; //Added by WP-Cache Manager
$super_cache_enabled = true; //Added by WP-Cache Manager
$cache_max_time = 3600; //in seconds
//$use_flock = true; // Set it true or false if you know what to use
$cache_path = WP_CONTENT_DIR . '/cache/';
$file_prefix = 'wp-cache-';
$ossdlcdn = 1; //Added by WP-Cache Manager
As i stated befor i think the problem is caused by the supercache files. And everything worked fine on a old version of wp-supercache, where only wp-cache file were generated (i’m not one-hundret percent sure about this 😉 ).
Is it save to change the settings to
$cache_enabled = true; //Added by WP-Cache Manager
$super_cache_enabled = false; //Added by WP-Cache Manager
What do you think?
Go grab the development version and test it ON A DEV SERVER, not production. It has code that changes the supercache files so they can be served to non anonymous visitors.
Look at the mobile detection code in wp-cache-phase1.php for code that makes it work. You should be able to use Supercache files with this.
hi donncha,
i made the previous changes to the config file and everything works fine now.
For the record: it seems to me, that supercache plugins which edit the cachekey via wp_cache_key only work if you set super_cache_enabled to false. Caching still works as cache_enabled is activated. So i don’t know if there are any drawbacks?
I figured out that supercache plugins are executed even if no cache was generated (because it was a known user). Is this a desired behavior?
Is your Amazon wishlist up to date? – http://www.amazon.co.uk/gp/registry/35ZCGIU2AH4NB
You’ve disabled supercaching by setting super_cache_enabled to false. I presume you’re getting lots of wp_cache* files in wp-content/cache/ ?
The only real drawback is that the plugin slows down if you have lots of wp_cache cache files. Keep the timeout low and experiment by changing it and keeping an eye on load. If you have lots of those cache files it can take longer for the plugin to update cache files as it needs to open each one to figure out what it’s caching.
Yup, wishlist is up to date now 🙂