News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Duplicate entry '0-255-theme_url'

Started by Tony Reid, September 25, 2004, 04:41:14 PM

Previous topic - Next topic

Tony Reid

Im using RC1 - and tonight I deleted a couple of themes that I no longer needed - Classic YaBBSE(theme id 2) and another based on classic called female (with theme id 3)

But upon installing a new theme from a directory on ther server - I get the following error :(

QuoteDuplicate entry '0-255-theme_url' for key 1
File: /home/fertilit/public_html/forum/Sources/Themes.php
Line: 845

The theme I am currently using is theme number 255 - Im not sure why its 255 though  :-\ perhaps that doesnt matter :(

Any thoughts on this would be appreciated.

Thanks

Tony Reid

[Unknown]

You can only have 255 themes........ how did you get it so high?

-[Unknown]

Tony Reid

I have no idea ...

Whats the safest way of changing it back? I have about 8901 rows in my themes table and only two themes - the default one and my new one :(

I upgraded from YaBBSE - so have only deleted my converted theme and the classic one.

Tony Reid

[Unknown]

Well, something like this should be fine:

UPDATE smf_themes
SET ID_THEME = 3
WHERE ID_THEME = 255;

UPDATE smf_members
SET ID_THEME = 3
WHERE ID_THEME = 255;

-[Unknown]

Tony Reid

Thanks... I thought about that but wasnt sure if it would affect anyone browsing the forum ?

Is it reasonably ok to do while live?

Thanks again :)
Tony Reid

[Unknown]

Quote from: Tony on September 25, 2004, 05:03:44 PM
Thanks... I thought about that but wasnt sure if it would affect anyone browsing the forum ?

Is it reasonably ok to do while live?

Thanks again :)

Should be fine ;).

-[Unknown]

Tony Reid

I just tried it and got this...


Notice: Undefined index: 255 in /home/fertilit/public_html/forum/Sources/Themes.php on line 661
Notice: Undefined index: num_users in /home/fertilit/public_html/forum/Sources/Themes.php on line 661
Notice: Undefined index: theme_dir in /home/fertilit/public_html/forum/Sources/Themes.php on line 669
Notice: Undefined index: theme_dir in /home/fertilit/public_html/forum/Sources/Themes.php on line 671
Notice: Undefined index: images_url in /home/fertilit/public_html/forum/Sources/Themes.php on line 675


So I reverted it back to 255 and its ok for the moment
Tony Reid

[Unknown]

Oh, you'll have yo update your default theme too, sorry.

UPDATE smf_settings
SET value = 3
WHERE variable = 'theme_guests'

-[Unknown]

Tony Reid

That worked great - thanks for your help :)

Interestingly - when I installed the theme I wanted a couple of seconds ago - its been given the ID of 255.

I installed it via "From a directory on the server:" option.

I will change its id now - but thought you should know.

Thanks again.
Tony
Tony Reid

[Unknown]

Hmm... it shouldn't be using auto_increment.  Are you sure those are the only ids?

SELECT DISTINCT ID_THEME
FROM smf_themes;

-[Unknown]

Tony Reid

Hmmm... it seems I have lots of them

Showing rows 0 - 227 (228 total, Query took 0.0426 secs)


1 & 3 - my current themes
255 my newly added theme

23 - 255 are all additional :(

Perhaps something to do with this issue?
http://www.simplemachines.org/community/index.php?topic=15251.0
Tony Reid

[Unknown]

DELETE FROM smf_themes
WHERE ID_THEME > 3;

-[Unknown]

Tony Reid

Thanks for your help with this :)

Its all fine now.

Tony,
Tony Reid

Advertisement: