I need to stop a certain block from appearing on a certain page on a Drupal site. I went to admin->site building->blocks and set the block I wanted not to appear on the page I don't want it on. However, this change is only effecting logged in users, anonymous users still see the block. Any suggestions?
It sounds like it might be a cache issue: anonymous users get pre-rendered pages from the cache, so your change wouldn't affect them until the cache is cleared.
Try running http://www.yoursite.com/devel/cache/clear if you have devel installed, or resetting the cache at http://www.yoursite.com/admin/settings/performance if you're not using devel.
Related
Hi I'm having an issue with a site where visitors need to be members to access certain pages, but once logged in they go to these pages and still see the 'not logged in' page and need to refresh to view the actual content.
This obviously leads to a lot of bounces and I'd like to fix so that they see the content right away.
The root issue comes from some cache settings or something from the host - unfortunately we can't change host (and it's not a regular hosting company with a website but a design company reseller) for the time being. This issue does not occur in our offline environment of the same site.
I've already had to add a ?randomnumber to the stylesheet so it loads new versions properly. I was wondering if something like this would work - but dynamically as pages are being added all the time by different admins.
Or any other solutions also appreciated!
Thanks
Like you said, tweaking the caching settings would be the most ideal. But since that's not an option, I'd suggest adding a random, meaningless query string to the URL of the member pages so that it's seen as a 'new page' and (likely) won't cache.
So instead of /member-page
Direct them to /member-page?cache-buster=randomlyGeneratedStringHere
wonder if someone can help. I am trying to add a cart widget to the header of a woocommerce enabled site. However, when WP Super Cache is enabled, the widget doesn't update when something is added to the cart, understandably.
I am trying to add the following so the widget isn't cached:
<!--dynamic-cached-content-->
<?php echo time(); ?>
<!-- my_dynamic_content(); -->
<!--/dynamic-cached-content-->
I have just displayed the time in this case to see if I can get it working.
I have set the caching to PHP cache, with late init and dynamic caching enabled but the time still doesn't update when I'm logged out of the administrator.
I have trailed through documentation to see if there is another way to get this working but so far I have not found a way.
Can anyone point me in the right direction? Maybe I've got this completely wrong!
I just want one widget to be dynamic in the header.
Thank you in advance.
There are multiple types of cache for web applications, and WordPress has ways to take advantage of all of them.
Plugins like WP Super Cache, W3 Total Cache, and Batcache as well as server components like Varnish and Nginx implement page caching. These tools store a copy of the complete page and use that cached copy every time the same URL is requested. This is the fastest cache available, but the down side is they return the same HTML to everyone.
If you want to use a page cache but still have dynamic elements like your header widget, you'll have to render them in JavaScript.
If you've written your own theme, you can implement fragment caching by storing the rendered HTML of different sections of the page except the part you want to be dynamic. There's no plugin you can download that'll do it for you. You'll need to make your own judgement calls about what needs to be cached and for how long.
Lastly, you can just cache the data used to render pages. Look for information on WordPress persistent object caching or write code to use WordPress's Transients API. A persistent object cache plugin can automatically store the results of WordPress's queries to something like Memcached or Redis if you have that available.
I want to edit contents of the existing page in wordpress.It is a live site so user side should not be changed
untill i want to publish that after all changes made to that page.Is there any plugin or what
i have to do for this.
Anyone please help me.
It depends what sort of changes. As noted above if you're channing post contents if will be enough not to publish them, but I guess you already now that.
However if you want to change appearance of the site then caching plugin might help. E.g. with w3 total cache you can do any change to template/css/php and so on and only logged in users will see changes (any non logged in user will get cached version of the page until you clean cache or cache expires).
If you have also users which are logging in into your wordpress, then I'm not aware of already made plugin that have such functionality - you probably would have to create development version of your site and test changes there.
For content - agree with previous answers.
But if you are changing the theme and want some changes to be visible only for you (admin) then you can use is_admin() function to print out different content for admin (new one) and different for other users (old one).
http://codex.wordpress.org/Function_Reference/is_admin
I'm new to drupal. There is a client website that we do some changes by using admin panel.
Changing some text in some pages. But the changes does not appear if you are not logged as admin or the user who made the changes.
after one day you can see that the changes can be seen by not logged users as well.
I search for cache problems or permission problems but I could not find anything in google.
What do you think is this?
not: cleaning browser cache or ctrl+f5 won't work.
If page caching for anonymous users is enabled, those visitors will see a cached version (and not the latest modified version).
Depending your configuration, this caching (minimum cache lifetime) can be between 1 minute and 24 hours. To verify / change your settings go to admin/config/performance.
i am in involving in developing the site builder by using Drupal. since it is site builder,user able to create a site based on needs and manipulate his menu items but other user won't edit this menu items.is it possible do like this.
Any one guide me how to control the menu items.
You did not mention your Drupal version, if you want to do this in code or through the UI...
So I am not really sure how well the answer will fit.
You need to have permissions set upon block creation for all users (IE: anonymous) to have access permissions on that block and it's content.
I believe there are permissions that may also need to be allowed on the permission configuration page in admin/user/permissions on Drupal 6. Look for the permissions that allows users access to other user content, most content usually allows anonymous viewing by default, though if I remember correctly.
Blocks can also be configured individually through the UI and by permissions set by ROLE, so you may want to check in the block configuration page also if you plan to do any changes to that blocks permissions manually.
Too lazy to log in to get screenshots, but it should give you clues on where to look.
On a sidenote, you should post your Drupal questions on drupal.stackexchange.com, you will get more Drupal users there to respond than here.
Hope that helps, good-luck