Updating: How to go about older theme files?

Started by Julius_2000, November 30, 2022, 12:35:38 PM

Previous topic - Next topic

Julius_2000

Hi all,

Now with the new 2.1.3 update I noticed that a good portion of my theme php files still have the SMF 2.1.0 version label in them which I never really payed attention to. This made me wonder whether those files would have to be updated as well since they probably haven't received all the adjustments provided by prior updates?

During the process of updating, the wizard asks you to apply the update to other existing themes/ versions to take effect for those too. But the update for 2.1.2 was made before I started editing our new theme(s). I also added older 2.1.0 Default template phps into my theme because I apparently copied them from an older folder.

So my question is, do I need to update them and how can I do that? There is no option to run the update for themes again once the update is completed. Do I need to uninstall and re-install all the previous updates one by one before I install 2.1.3?
The reason I ask is that during the installation of 2.1.3 I got a failed test for instance for replacing the version number from 2.1.0 to 2.1.3 because it was looking for version 2.1.2 to be replaced.
You cannot view this attachment.

Sir Osis of Liver

"Test failed (Ignore Errors)" message is for non-critical errors, usually version number at top of file that's formatted differently from core file.  If that's the only error you're seeing, upgrade should have been applied correctly to theme files.  Nothing to worry about.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

1- the custom themes should ONLY include the template files needed to make them different. They should not include any default templates which are un-altered. (e.g. I have a theme that only has index and boardindex. everything else is CSS changes only.

2- If you implement a theme AFTER a mod (or update) then that theme will be missing any edits needed by that mod (or update)

3- if you apply a mod (or update) and select "apply to custom themes", then the system will attempt to apply edits to the specific template files included in those themes.

Version numbers don't really matter, except for your own personal tracking of possible debugging. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

OP is patching to 2.1.3, installed mods wouldn't be affected if version numbers are only errors.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

If the OP added themes after a mod or update, they would be affected.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Diego Andrés

Quote from: Kindred on November 30, 2022, 01:12:40 PMIf the OP added themes after a mod or update, they would be affected.

Or even after the patch and the theme isn't up to date with the patch.
Also just to clarify on what Kindred says, it's correct but if the mods are using hooks then just care for those that aren't.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Julius_2000

#6
Thank you all for your replies!

Quote from: Sir Osis of Liver on November 30, 2022, 12:43:24 PM"Test failed (Ignore Errors)" message is for non-critical errors, usually version number at top of file that's formatted differently from core file.  If that's the only error you're seeing, upgrade should have been applied correctly to theme files.  Nothing to worry about.
I have a couple of others, like for #likes li & #likes .avatar which tried to apply changes but couldn't because I had made edits to these IDs/classes (fortunately, the intented changes where almost exactly ones that I already had done myself during modding my theme).

Quote from: Kindred on November 30, 2022, 12:47:02 PM1- the custom themes should ONLY include the template files needed to make them different. They should not include any default templates which are un-altered. (e.g. I have a theme that only has index and boardindex. everything else is CSS changes only.
Yes, I only copied templates that I needed to edit but wanted the original files left untouched so any of those edits would only affect my theme(s) and not the Default one.

Quote from: Kindred on November 30, 2022, 12:47:02 PM2- If you implement a theme AFTER a mod (or update) then that theme will be missing any edits needed by that mod (or update)

3- if you apply a mod (or update) and select "apply to custom themes", then the system will attempt to apply edits to the specific template files included in those themes.

So, is this the answer to "do I need to uninstall and re-install the updates" then? When I started editing our new theme, I believe the 2.1.2 update was already there. Btw I believe almost all mods use hooks.

Quote from: Kindred on November 30, 2022, 12:47:02 PMVersion numbers don't really matter, except for your own personal tracking of possible debugging. :)
Well, apparently so because I was able to trick the software by just overwriting the number and the "error" disappeared" :). But like you said, it would nice, though, to know whether one's theme is up to date or not for your stated reason.

But in general, what is the best practice if you want to use a new theme when an update is already installed? Let's say I download a theme and install it and it has some older template files in it. Do I always have to re-run the update process to make sure those files are up to date, too?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: