Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2003
Posts: 6,453
Likes: 68
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,453
Likes: 68
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.?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 6,453
Likes: 68
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,453
Likes: 68
I can't see my first post I edited it.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2004
Posts: 1,900
Likes: 137
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,900
Likes: 137
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;

Last edited by isaac; 01/20/2022 11:48 PM. Reason: html5 spec depreciation

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Work In Progress: soon
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Dec 2003
Posts: 6,453
Likes: 68
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,453
Likes: 68
I agree some how they were inserted manually Just trying to clean up the discrepancy.

This seems less complex from my first thought.

So other that opening and saving each one to get a new time stamp for identification is there anything after to do for housekeeping?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2004
Posts: 1,900
Likes: 137
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,900
Likes: 137
Originally Posted by Ruben
So other that opening and saving each one to get a new time stamp for identification is there anything after to do for housekeeping?

do as I typed it for you to do. that is the path for the results you requested.

my directions create a new time stamp, and also update the files with all of the current version items that may not be in your older versions.

Last edited by isaac; 01/19/2022 5:24 PM.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Work In Progress: soon
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,453
Likes: 68
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,453
Likes: 68
Okay I did one .
still the delete option not working but was able to id the entry via datestamp and database dive and delete the row.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 6,453
Likes: 68
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,453
Likes: 68
This works fine I have one left to do.

But here is a example

CP shows ubb77-dark twice and there are two css files.
In the control panel one is active and the second one is not but I can't just select and delete either one .


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2004
Posts: 1,900
Likes: 137
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,900
Likes: 137
I have edited my first reply regarding the recent html5 spec depreciation which affects being able to click on trashcan icon to delete styles.
https://www.ubbcentral.com/forums/u...delete-orphaned-styles-v7-7-5#Post265119


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Work In Progress: soon
isaac @ id242.com // my forum @ CelicaHobby.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
RSS not working
by jsteinborn - 04/18/2022 2:46 PM
Largest UBB.threads forum
by Aaron101 - 04/06/2022 8:38 AM
News Block
by Aaron101 - 04/05/2022 6:48 PM
Who's Online Now
1 members (Morgan), 41 guests, and 63 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5