FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Setting custom theme as default theme locks everyone out of the forum
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Setting custom theme as default theme locks everyone out of the forum [message #159930] Fri, 10 July 2009 10:15 Go to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
Fresh install of FUDforum 2.8.1 on Linux, Apache 2.2.11, MySQL 5.0.81 and PHP 5.2.9.

I can lock everyone out of my forum -- including myself -- unintentionally, ie, without using the global settings. I just set the default theme to a custom theme instead of the (named) default theme and we're all stuck.

Steps to reproduce:

1. Log in as admin and navigate to your forum's Admin Control Panel-> Theme Manager.
2. Create a new template set based on Path_info. Name it custom.
3. Create a new theme using the custom template set. Language and location English. Mark the default and enabled check boxes.
Name this new theme and click "Create."
4. Rebuild all themes.
5. Return to the forum and navigate around. Check that everything is working as it should. It appears to be, even after the cache is cleared.
6. Let's check what all other users except the Admin user see. Open a different browser and go to the forum index.php page. The user can't log in, can't visit the forums or members list, can't register or do anything else because a click on any link refreshes the current index.php page instead of showing the user what he expects.

The other user is locked out of the forum.

If the other user had been logged in as a member, he'd be locked out too, because clicks on any link only refreshes the index.php page instead of navigating to the intended page.

(DON'T DO THIS! but if the admin user logs out, he's locked out of the forum too. Every click on a link only refreshes the index.php page. And because some of you will lock yourselves out in testing this even after I told you not to, to save your forum use the browser's back button to return to the admin control panel. You'll be prompted for the admin user and password, but you'll get back in.)

So this is verified as broken.

To fix this:

7. In the logged in admin window, navigate to your forum's Admin Control Panel-> Theme Manager.
8. Edit the default theme by setting it as default with the check box and click on the update button.
9. Rebuild all themes.
10. All users can now navigate around the forum as normal.

[Updated on: Fri, 10 July 2009 10:15]

Report message to a moderator

icon6.gif  Re: Setting custom theme as default theme locks everyone out of the forum [message #159931 is a reply to message #159930] Fri, 10 July 2009 12:15 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Sounds like you are having almost as much fun as I am....

No wonder Iila uses the default only!


"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Setting custom theme as default theme locks everyone out of the forum [message #159940 is a reply to message #159930] Fri, 10 July 2009 21:13 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Apply this patch, repeat the process and you should be fine - http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11954

PS: This "Create New Template Set" function creates full heavy-duty templates. I personally prefer sparse or minimalistic templates which only contain the required files and sections. They are so much easier to maintain and upgrade.
Re: Setting custom theme as default theme locks everyone out of the forum [message #159941 is a reply to message #159940] Fri, 10 July 2009 22:23 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj
Apply this patch, repeat the process and you should be fine - http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11954


Thanks! That was fast. I'll try that this evening.

naudefj

PS: This "Create New Template Set" function creates full heavy-duty templates. I personally prefer sparse or minimalistic templates which only contain the required files and sections. They are so much easier to maintain and upgrade.

Unfortunately, it's extremely time consuming unless we're on a Web server with root privs to change the owner on files and directories. The entire forum is installed as nobody with almost all permissions set between 0600 and 0711, so I can't even see the files with my FTP program or in CPanel. Nor can I create new directories in nobody's directories to hold the custom theme templates.

But I can use the forum's file manager to chmod individual directories and files so I can read them in my FTP program. Hundreds and hundreds of files...
Re: Setting custom theme as default theme locks everyone out of the forum [message #159943 is a reply to message #159941] Sat, 11 July 2009 06:53 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You can do it in one step by unlocking your forum's files. See http://cvs.prohost.org/index.php/Lock/Unlock_Forum_Files
Re: Setting custom theme as default theme locks everyone out of the forum [message #159950 is a reply to message #159943] Sun, 12 July 2009 09:29 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote on Fri, 10 July 2009 23:53
You can do it in one step by unlocking your forum's files. See http://cvs.prohost.org/index.php/Lock/Unlock_Forum_Files

Thanks. I totally forgot about reading about that when I was studying the documentation 2 months ago. (Can you tell I've only played with the Windows version up until this install on a Linux server?)

I tried your patch. It worked initially -- until the cache was cleared. Then the user was stuck on the index.php page until the admin user went back to the default theme.

Just to make sure I applied the patch correctly, I added the lines with the + in the far left column and deleted the line with the - in the far left column.

I don't know if this is significant, but in case it is: my compiler.inc file was version 1.98 (from the FUDforum 2.8.1 install) when I applied the patch to make it version 1.100. I don't know what version 1.99 is. Any way to find it easily so I can apply it, too?

I tried this every which way I could think of: unlocking the files before creating the new template based on the Path_info template, creating the new theme with that template and setting that theme as the default theme; starting over by uninstalling, reinstalling and applying the patch, then creating the new template based on the Path_info template and the new theme using that template and making that the default (current) theme. Always locks the other users out of the forum until the admin user reverts back to the default theme.

BTW, uninstalling doesn't drop the FUD28_ tables and it doesn't delete the GLOBALS.php link in the forum/adm directory, so that directory can't be deleted during the uninstallation because it isn't empty.

Thanks for your help, but the problem doesn't seem to be resolved yet.
Re: Setting custom theme as default theme locks everyone out of the forum [message #159952 is a reply to message #159950] Sun, 12 July 2009 13:26 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Strange. The initial problem was that the .path_info file wasn't copied to the new directory (glob() ignores hidden files). Can you please confirm that the patch is still in and that you have a .path_info in the new theme's directory?
Re: Setting custom theme as default theme locks everyone out of the forum [message #159958 is a reply to message #159952] Mon, 13 July 2009 00:46 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
Can you please confirm that the patch is still in and that you have a .path_info in the new theme's directory?

The patch is still in place and the .path_info file was copied to all new themes' directories that I created based on the Path_Info template.

All of the .path_info files are empty. My previous Windows installation shows an empty .path_info file so I think this is as it should be.
Re: Setting custom theme as default theme locks everyone out of the forum [message #159959 is a reply to message #159958] Mon, 13 July 2009 04:38 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Sounds good. Please also confirm that PATH_INFO support is enabled in the Global Settings Manager.
Re: Setting custom theme as default theme locks everyone out of the forum [message #159960 is a reply to message #159959] Mon, 13 July 2009 05:17 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
Sounds good. Please also confirm that PATH_INFO support is enabled in the Global Settings Manager.

That was it! When I reinstalled the forum, I wanted to make as few changes as possible to minimize any interference from other settings. I didn't make that change in the Global Settings Manager, and of course my path_info-based templates didn't work.

Thank you!
Re: Setting custom theme as default theme locks everyone out of the forum [message #159961 is a reply to message #159960] Mon, 13 July 2009 05:24 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
That's excellent news.

PS: I see the reminder message is only triggered when the theme's name is 'path_info'. I'll expand it so it gets triggered for any path info theme.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Topic Merge will reset view count to zero
Next Topic: Plugins becoming disabled when changing any general settings
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 11 22:04:45 GMT 2024

Total time taken to generate the page: 0.07087 seconds