Jump to content

Page displaying differently when logged in


mike62
 Share

Recommended Posts

I'm working on a page and it's showing up differently when I'm logged in. It's not that a field is set to private or anything, because it's still pulling data from that field. It looks like the "public" view is simply using an old version of the template (home.php), and the logged-in view is using the current version of home.php. See attached screenshots.

Is there something that caches template files? Is there a way to force it to use the most recent version of the template?

EDIT: I found the Pro Cache module and cleared it. That seemed to help. 

Thanks,

-Mike

logged-in.png

not-logged-in.png

Link to comment
Share on other sites

So, this isn't as "solved" as I thought it was. I'm still having caching issues, even though I've removed the Pro Cache module completely. On one browser, it's loading the most recent template files, but only when logged in, and it's still not loading the most recent CSS file. On another browser it'll load the most recent CSS file, but not the template files. It's making me crazy! Am I missing something obvious? This is making development extremely difficult. :(

Link to comment
Share on other sites

54 minutes ago, DaveP said:

In Chrome, with dev tools open, you can long-click the refresh button for browser cache-busting super powers.

59f990463f29e_ScreenShot2017-11-01at09_10_53.png.7765486eecc431f762a80ac08cd7984d.png

Alternatively you can hold down the shift button and click refresh to clear the cache for the website and refresh.

  • Like 1
Link to comment
Share on other sites

The problem I'm having is not to do with the browser's cache. I am updating home.php, uploading it, emptying the cache, and I'm still not seeing the changes I just made. It's very frustrating.

EDIT: It seems like the solution is to use this setting (see screenshot) for the template itself. Then to be able to see the changes I make:

  1. Upload home.php via FTP.
  2. In the ProcessWire admin, open the Home page and save it.
  3. Switch to Chrome and empty its cache.
  4. Switch to the tab with the site's homepage and refresh.

Is this correct? Is this the most efficient way to develop a site with PW? Seems arduous at best.

Screen Shot 2017-11-02 at 8.05.54 AM.png

Link to comment
Share on other sites

@mike62

1) no need to remove ProCache
2) you should be logged into your admin when you are developing or trying to see uncached pages
3) make sure to add body class to cached pages so you can tell what is going on
4) install and use Tracy Debugger
5) make sure you have both wire_challenge and wires_challenge cookies in PC settings
6) if you for some reason do need to see the site when not logged in, add a get var, like ?nocache to the end of the url

by the way, what happened to your admin - it looks like the admin from a much earlier version of PW. You should check to see if your user has an admin theme selected...

By the way, i have never had to do any of the things you list, and work on live sites around 20 hrs a week.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...