MyBB Community Forums

Full Version: Custom-theme-per-subforum broke in 1.4.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I use several different themes per subforum. These are forced on the users. It worked fine with 1.4.4.

After an upgrade to 1.4.5 (which worked flawlessly), two of three subforums show the default style. Only one still shows the theme it's supposed to.

I compared the forum settings and the template settings. Apart from the differences in CSS, these themes are identical. I even had a look at the database and compared each and everything -> identical.

While the subforums actually save which theme to show, the default theme is loaded in source. It's only weird that it doesn't happen with one subforum.

You can have a look at my forum. Powerslave, Enuma Elish and Anudu subforums are supposed to show their owns styles. Only Anudu does.

Have a look at how the forums are saved. Everything fine here.

[Image: mybbstyleerror.th.png]
Why has this thread been moved to "General Support"? I don't need support, I need a bugfix! Sad
Strange - I don't see anybody else reporting this problem though.

Have you tried reassigning the themes to the forums? It might not have been updated in the cache to use these forums. Ensure that the templates have been updated to 1.4.5 too...
I totally forgot about that feature :o
(2009-04-23, 08:28 AM)MattRogowski Wrote: [ -> ]I totally forgot about that feature :o

I didn't even know it existed.
I used it heavily when I had a 1.2 forum, totally forgot about it with 1.4 Toungue
(2009-04-23, 08:27 AM)Tomm M Wrote: [ -> ]Have you tried reassigning the themes to the forums? It might not have been updated in the cache to use these forums. Ensure that the templates have been updated to 1.4.5 too...

Yes, I tried assigning different styles to different forums, but it didn't happen. That was the reason I looked into the database (see the image above).

I can apply the Anudu theme to the other forums, which works fine. If I apply the other themes to the Anudu forum, it goes default.
Additionally, if I change my default theme as a user, it doesn't work either. But again only for the Powerslave and the Enuma Elish theme. Anudu works fine.

This means, that there's something broken with the specific themes, I guess.

But all are made just in the same manner. There should be absolutely no difference in them. And it worked fine in 1.4.4.

[Image: mybbthemesderived.th.jpg]

Can you give me a hint where to look in the database?

This subforum should load theme #4. But a look in the HTML source says, that it loads theme#3, which is the default.
Gave it another thought spin: as you see, the different themes appear in terms of the specific logo on top. So that's working fine. What's not working is, that the correct CSS is loaded. That in spite of the fact that the logo and the CSS belong together (at least concerning the Admin Panel).

So I'm quite sure that this is a bug and no wrong configuration on my part. Ideas? Suggestions?
In my despair, I added a real ugly hack to global.php at line 244, while commenting #236:
$themehack = $style['style'];
if (($themehack == "") or ($themehack == "0")) {$themehack = "3";}
$stylesheets .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$mybb->settings['bburl']}/cache/themes/theme$themehack/global.css\" />\n";

Hurts, but works for the time being. The really weird part is, that the threads all work like expected, except in the Powerslave subforum, where they're still default, even with that ugly lines above.

Now, that's weird and I'm absolutely not able to find a better solution... Angry
Next thing I tried was to export a non working theme and re-import it. It worked fine, except that the cache-folder for the css file has the wrong permissions:

drwxr-xr-x 2 anudu grpusr 4096 2008-08-25 15:28 theme1
drwxr-xr-x 2 anudu grpusr 4096 2008-08-25 15:28 theme2
drwxr-xr-x 2 anudu grpusr 4096 2008-08-25 15:28 theme3
drwxr-xr-x 2 anudu grpusr 4096 2008-08-25 15:28 theme4
drwxr-xr-x 2 anudu grpusr 4096 2008-08-25 15:28 theme5
drwxr-xr-x 2 anudu grpusr 4096 2009-04-23 23:34 theme7
drwx------ 2 anudu grpusr 4096 2009-04-24 11:06 theme8

Note the file permissions 700 on theme8. Apart from that, everything else is working now. I still suggest that you handle it as a bug. Where's the reason to create a folder which no one can read?
If it's being given wrong CHMOD settings, ask your host, seems to work fine for everybody esle, i.e. giving it correct CHMODs.
(2009-04-24, 09:16 AM)MattRogowski Wrote: [ -> ]If it's being given wrong CHMOD settings, ask your host, seems to work fine for everybody esle, i.e. giving it correct CHMODs.

I am my own host and I don't think that I changed something, since I created those themes with another version. But where should I look? php.ini?

Apart from that, the main problem still remains. This is just a work around.
(2009-04-24, 09:15 AM)Anudu Wrote: [ -> ]I still suggest that you handle it as a bug. Where's the reason to create a folder which no one can read?

Feel free to correct me if I'm wrong, but MyBB doesn't set any permissions for folders. If it did, then it would always work - you've seemed to import other themes OK...

If it didn't work, they would be more bug reports on this...
Pages: 1 2