ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: IchBin on March 19, 2013, 12:54:04 pm

Title: Theme install limit
Post by: IchBin on March 19, 2013, 12:54:04 pm
Just thought you'd all like to know, the one and only Crip (theme maker) hit the install limit for themes today. lol  He has installed so many themes that SMF puked on him when he tried to install his 256th theme. Apparently theme_id in the smf_themes table is only a tinyint(4) :D. Maybe we could bump that up to a smallint. Rare case I know, but hey we cater to all right? ;)
Title: Re: Theme install limit
Post by: Spuds on March 19, 2013, 01:14:27 pm
lol ... thats pretty funny really ... easy change.  

We should probably keep a db change list item on Git so we get them all ... this one and the one Ema reported for that site with 750k items in the modlog :P ... that one just needs another index, could be some others as well. 
Title: Re: Theme install limit
Post by: Arantor on March 19, 2013, 04:30:38 pm
That makes a grand total of two sites that ever needed it - Crip and smfthemes.org.

The only thing is, it's only one more byte in the themes table, but that's one more byte for every row - and it's potentially a lot of rows, seeing how that's user preferences, theme options, custom field values - and it all adds up.
Title: Re: Theme install limit
Post by: The Craw on March 20, 2013, 08:16:03 pm
I'm just glad I'm not the one who has to update 255 themes.
Title: Re: Theme install limit
Post by: Antechinus on March 22, 2013, 12:09:55 am
I've only got to 38*, and that's after years of being a bit nutty about themes.

*Meaning the site is up to id=38.
Title: Re: Theme install limit
Post by: Trekkie101 on March 24, 2013, 02:53:39 pm
Quote from: Arantor – That makes a grand total of two sites that ever needed it - Crip and smfthemes.org.

The only thing is, it's only one more byte in the themes table, but that's one more byte for every row - and it's potentially a lot of rows, seeing how that's user preferences, theme options, custom field values - and it all adds up.
Does it take more than just a quick alter to the column to make it smallint?

If not, I'd agree with you, little point in succumbing to the mad men :P
Quote from: Spuds – lol ... thats pretty funny really ... easy change.  

We should probably keep a db change list item on Git so we get them all ... this one and the one Ema reported for that site with 750k items in the modlog :P ... that one just needs another index, could be some others as well.  
The modlog would probably fill a bit quicker with more than 255 themes too :P
Title: Re: Theme install limit
Post by: Arantor on March 24, 2013, 04:26:34 pm
QuoteDoes it take more than just a quick alter to the column to make it smallint?

I don't think so, but there may be some other logic attached that I don't remember.

But the fact is you're still adding an extra byte for every user's preference for every theme, plus whatever that does to the indexes... it all helps to keep it tight if possible.
Title: Re: Theme install limit
Post by: Antechinus on March 24, 2013, 04:36:06 pm
My 2c: nobody apart from a nutter running a theme demo site will ever hit this limit, therefore it can be dealt with by anyone who needs to deal with it. It doesn't really need to be sorted by default.
Title: Re: Theme install limit
Post by: Arantor on March 24, 2013, 06:08:01 pm
Quote from: Antechinus – My 2c: nobody apart from a nutter running a theme demo site will ever hit this limit, therefore it can be dealt with by anyone who needs to deal with it. It doesn't really need to be sorted by default.

THIS. :)
Title: Re: Theme install limit
Post by: emanuele on September 05, 2013, 09:22:50 am
 mmm...what about make the column not autoincrement?
The drawback would be that a theme may ends up into another theme's id if not dealt with carefully, that in general may be annoying, but not so terrible (i.e. in the worst case a wrong setting, but no security issues).

It would be a bit of a pain, though, and in general I don't know how much worth the hassle...
Exterminated?
Title: Re: Theme install limit
Post by: Flavio93Zena on May 14, 2016, 10:15:23 pm
How did you end up fixing this, if at all? :)
Title: Re: Theme install limit
Post by: emanuele on May 15, 2016, 03:56:01 am
Calling it a design choice?
Title: Re: Theme install limit
Post by: Flavio93Zena on May 15, 2016, 09:54:12 am
Hmm, move to exterminated then, personally, I agree 256 themes are enough xD