Topic: Forum Description

Greetings,

At first I didn't want a forum description so I removed all the text and saved the changes.  Then later I typed in a new description, saved the changes, but the description (and text area) remain empty.

This is on a brand new installation running 1.2.6.  Any ideas?

- Chris

Re: Forum Description

try deleting the .php files in the cache folder

Re: Forum Description

Didn't work -(

4 (edited by CodeXP 2005-07-11 17:09)

Re: Forum Description

I can duplicate the problem on 2 different 1.2.6 installations, one on Linux & another on Windows.

Until this is fixed, you can add the description back using the following in phpmyadmin (or any similar script):

UPDATE config SET conf_value = 'your forum description' WHERE conf_name = 'o_board_desc';

Remember to delete your cache afterwards.

Re: Forum Description

Thank you.

6 (edited by Smartys 2005-07-13 23:19)

Re: Forum Description

It's a problem with admin_options.php

The fix:

FIND

        // Only update values that have changed
        if (isset($pun_config['o_'.$key]) && $pun_config['o_'.$key] != $input)

REPLACE WITH

        // Only update values that have changed
        if (array_key_exists('o_'.$key.'', $pun_config) && $pun_config['o_'.$key] != $input)

The problem is when values are NULL, isset is false, whereas array_key_exist is true

Edited to fix my being an idiot smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: Forum Description

You're absolutely right. Thanks Smartys smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: Forum Description

Is this fix included in current 1.2.6 download or I have to patch it manualy ?

9

Re: Forum Description

No, it isn't. You have to make manual replacement smile

Re: Forum Description

Smartys wrote:

It's a problem with admin_options.php

The fix:

FIND

        // Only update values that have changed
        if (isset($pun_config['o_'.$key]) && $pun_config['o_'.$key] != $input)

REPLACE WITH

        // Only update values that have changed
        if (array_key_exists('o_'.$key.'', $pun_config) && $pun_config['o_'.$key] != $input)

The problem is when values are NULL, isset is false, whereas array_key_exist is true

Hi,

I have zero-experience with PHP (coming from the Perl land smile )
but why the seconde pair of quotes above? Can't you just

        // Only update values that have changed
        if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input)

Regards
Alex

http://preferans.de/ - russian card game

Re: Forum Description

No reason, I just like it better that way smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: Forum Description

The changed file is not in "punbb-1.2.10-changed_files.zip" sad

Re: Forum Description

This was a fix for 1.2.6 (which I believe was put into 1.2.7)
What are you talking about?

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: Forum Description

Ups, I thought in the changed files are the files differing from the last mayor release?!
So if I want to update over more than one minor versions i have to use the complete update? OOOooops... but works fine at the moment. I will update the forum with the next release.

15 (edited by Smartys 2005-11-18 11:26)

Re: Forum Description

Yes
Or multiple changed files
Or this:
http://punbb.org/download/hdiff/hdiff-1 … .2.10.html
Or this:
http://punbb.org/download/patch/punbb-1 … 2.10.patch

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize