Style changes quick-view now need purging in the ACP?

For support and discussion related to templates and themes in phpBB 3.3.
Post Reply
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Style changes quick-view now need purging in the ACP?

Post by DV1 »

On previous versions I was able to go to the FTP, change the color or something else in styles, and then just refresh the screen to see the changes without being logged in to the forum or ACP for purge. The only time I had to do that was with the templates. On 3.3.4 (for a test-forum) the quick view of the changes only happens if I purge in the ACP.

I then read a topic - which I think referred to this - about Load settings and checking 'yes' on Recompile elements. I tried that but it does not work. Is there somewhere else on the ACP, permissions, whatever, where this quick view of style changes is effected as previously?

Thank You
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

If you would update hash value of the css file you edited in the stylesheet.css file you and your users don't have to clear cache. But clearing cache with ctrl+f5 should work but this requires everyone to do that to see the changes.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by DV1 »

@Mannix

I'd have to study up a bit on hash values but with the link you gave and following from there to this other link the commentary often notes the not-so-liked aspect of a new hash value every time a style change is made. Thus, my OP is about my simply making changes in previous versions without much ado. In fact, ever since I started using phpBB years ago I've laways been able to refresh styles and see the results quickly. Which makes for the question: Is there something in 3.3.4 that changed this dynamic?

In this same link DavidIQ states:
"The browser doesn't care if it's a hash or anything else. The point is to tell the browser that something changed and that the stylesheet needs to be reloaded."
Where then is the 'telling' to the browser effected? DavidIQ also stated elsewhere in the topic that a simple solution would be:
include each stylesheet individually in the header just like the others are so that whenever a cache purge happens the assets_version querystring parameter will be updated.

Then in the link you provided there is Hanakin from the Front End Dev Team who I guess got frustrated by the comments and said that for all it matters you can use 'chickenfart' as a hash value. Well, before I never had to use any type of descriptive flatulence to see style changes quickly. So, Mannix, you can see where I'm a bit confused right now.

Anyway, are any of the above suggestions effective? Is there something that I can change in the following to effect quick view instead of purge in the ACP?:

Code: Select all

/*  phpBB3 Style Sheet
    --------------------------------------------------------------
	Style name:			prosilver (the default phpBB 3.3.x style)
	Based on style:
	Original author:	Tom Beddard ( http://www.subblue.com/ )
	Modified by:		phpBB Limited ( https://www.phpbb.com/ )
    --------------------------------------------------------------
*/

@import url("normalize.css?hash=48eb3f89");
@import url("base.css?hash=3a7fafb1");
@import url("utilities.css?hash=1034bac8");
@import url("common.css?hash=70bd1301");
@import url("links.css?hash=da040ebb");
@import url("content.css?hash=2ca4ae91");
@import url("buttons.css?hash=15c14833");
@import url("cp.css?hash=5cc9ac0c");
@import url("forms.css?hash=18ee8211");
@import url("icons.css?hash=dbc0f3b9");
@import url("colours.css?hash=3b03ccfa");
@import url("responsive.css?hash=a1546011");
If I have to do the ACP purge from now on then that's something I will do. But I figure there must be an easier way to tell the browser changes have been made without subjecting it to poultry gas.


Thank You
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

No it is not mandatory to use hash values. I suggested using hash values just because it's already there but you can change it to whatever you want like some of the guys suggested in the topic you linked.

If you change the hash value to match with the file you edited you don't have to purge the cache at all, the browser will know that there was a change and will load the new file instead of the old cached one.

Do you know how to get hash value of a file?
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by DV1 »

@Mannix

What I have at the moment is the drop-down context menu of CRC-SHA when hovering over a file.Then it gives the options of CRC-32, CRC-64, SHA-1, SHA-256. Selecting one of those as for example, CRC-32, gives the following in a panel:

Code: Select all

Name: colours.css
Size: 26582 bytes (25 KiB)
CRC32: BE9EC869
As to how to change the hash of that file I do not know. And if I do find out from you or whomever how to change the value then I guess a good safety measure is make a back-uo of the file in case something goes wrong?

So for example, the current stylesheet.cc for the forum test-site (which is now 3.3.4) shows the following for coulours.css:

Code: Select all

@import url("colours.css?hash=3b03ccfa");
I guess the number is changed at, 'hash=xxxxxxxxx' ?
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

DV1 wrote: Mon May 10, 2021 1:50 pm
Good job!!!👍
Yes you need to change 3b03ccfa to BE9EC869 that is it.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by DV1 »

Mannix_ wrote: Mon May 10, 2021 1:55 pm Yes you need to change 3b03ccfa to BE9EC869 that is it.
The 'BE9EC869' is just a random number you came up with meaning I can change that to anything?

Question: As noted in my post there are CRC and SHA options. Does it matter which one is chosen?
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

DV1 wrote: Mon May 10, 2021 2:10 pm

The 'BE9EC869' is just a random number you came up with meaning I can change that to anything?
No that is a hash value you found out.
DV1 wrote: Mon May 10, 2021 2:10 pm Question: As noted in my post there are CRC and SHA options. Does it matter which one is chosen?
CRC32 is what the style use as a hash value.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by DV1 »

Let me rephrase that:

I can put in any number in the place of '3b03ccfa' ?

I'm not sure what you mean by "you found out"?

Do you mean using something like this Hash Calculator ?

I tried it with the string from another stylesheet.css file and it gave me: 81bd8208

In other words, the calculator gives me a more appropriate value to change to?
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

DV1 wrote: Mon May 10, 2021 2:40 pm I'm not sure what you mean by "you found out"?
This

Code: Select all

Name: colours.css
Size: 26582 bytes (25 KiB)
CRC32: BE9EC869
in an earlier post you found the hash value (CRC32) of the colours.css file. And all you have to do is to replace the existing one in stylesheet.css file to that one.

That calculator gives you the exact thing you are looking for, a hash of the file you are checking so you can change it in stylesheet.css file and forget about clearing cache. Browser will do all the work.

Stick to changing those hash values and forget about other things. This will give you expected results without any confusion later on.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by DV1 »

Thank you, Mannix

We're rolling with the smooth jazz sounds of easy browser changes. :)

At first it wasn't doing it so I went to Firefox options, cleared the cache, and then it worked.

Question: I counted over 50 algorithms in the calculator. Does phpBB use just a few or are there times where any one of those would be used. Doesn't pertain to the present issue but I thought I'd ask out of curiosity.

And by the by, since when I tried to update to 3.3.4 the stylesheet.css was the only error mentioned in the update panel did that have something to do with the hash value or is that a different issue altogether?

I don't know if you do it or another Mod so I guess this topic can be marked solved

Daniel
User avatar
Mannix_
Registered User
Posts: 1838
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by Mannix_ »

DV1 wrote: Mon May 10, 2021 7:40 pm Question: I counted over 50 algorithms in the calculator. Does phpBB use just a few or are there times where any one of those would be used. Doesn't pertain to the present issue but I thought I'd ask out of curiosity.
Those are different types of hash. You could use any of it but forget about it. It just the phpBB decided to use this one (CRC32) from all that are available.
DV1 wrote: Mon May 10, 2021 7:40 pm And by the by, since when I tried to update to 3.3.4 the stylesheet.css was the only error mentioned in the update panel did that have something to do with the hash value or is that a different issue altogether?
Maybe because that is the only thing that changes if there were any edits done to those css files.
DV1 wrote: Mon May 10, 2021 7:40 pm I don't know if you do it or another Mod so I guess this topic can be marked solved
There is no need for that. If there is a mod that would want to do it he will. Topic icons are not available here for normal users so only mod/team member can do it :)
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Style changes quick-view now need purging in the ACP?

Post by P_I »

FWIW, here are a couple of decent backgrounders on 'cache busting' as it relates to CSS files and browsers.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
Post Reply

Return to “[3.3.x] Styles Support & Discussion”