Thread Like Summary
Gizmo
Total Likes: 1
Original Post (Thread Starter)
by Ruben
Ruben
Just upgraded to 7.7.5

What I am finding is
1. Some old styles have one row in the database and cp but multiple css files in the folder.
2 .Some styles have multiple rows in the database and cp corresponding to multiple files in the folder.( only one of the duplicate style names are active)

This is a old site that has had many upgrades over the years.
In item 2 , I can't delete either duplicate style in the control panel.

So making assumptions I see the files have what appears to be a datestamp in the suffix of the css file name that is the same in the styles table.

So would it be safe to delete files based on that datestamp suffix in the file names for all files that do not have a corresponding row in the table?

Also would it be safe for item 2 to delete the row in the database and css file that I pick for the duplicate style I can't delete from the CP?

Would I need to delete both styles for item 2 and import them again?

When done should I run the re builders or what.?
Liked Replies
by isaac
isaac
The orphaned files in your directory could be ones that you have restored from a backup at some point. ones that have long since been deleted by the software, but then restored by a human back/restore outside of ubbt software's control and awareness. the files in the directory are the result of a database entry. not the other way around.

since you are manually accessing files and directory entries already, a simple fix is as follows:

1. go through your styles within the style editor and delete (using the trashcan on the right column) each one that you no longer want.
2. now open each style that you do want, and open it as if you were to edit it. then click "update or add style" button from within the editor. do this for each of those styles.
3. now go in to your /styles directory and delete all of the style files that do not have a recent date on them. the recent dated ones are the ones you've just had the UBBT recreate for you. every css file with an old date is unused by the current UBBT installation.
take care NOT to deleted admin.css, common.css, index.html, wrappers.php and the images directory.

those 3 steps will cleanup the styles directory for you.


EDIT:
Recently one of the JavaScript command flags that is used during the deletion of styles has been depreciated from html5 spec.

location.reload(true) has become deprecated because it is not in the spec:
https://www.w3.org/TR/html50/browsers.html#dom-location-reload

When attempting to perform step #1 in a modern browser, you may be affected by this depreciation. This affects all version of UBB.threads through to version 7.7.5. There is a simple fix for this depreciated code that you can perform now. It will also be updated and fixed in newer releases of UBB.threads.

The fix is as follows:
FIND IN templates/default/admin/styles.tmpl
AROUND LINE 12
Code
		document.location.reload(true);

REPLACE WITH
Code
		window.location.href = window.location.href;
1 member likes this
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Ruben, 1 invisible), 998 guests, and 205 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)