Topic: Problem with adding a new forum

Hi.
If I would add a new forum in administration-menu, I get this message: "Bad request. The link you followed is incorrect or outdated."
I hope, someone can help me?!

2

Re: Problem with adding a new forum

make sure that your base url is set correctly.

Re: Problem with adding a new forum

The base url is correct and without trailing slash. All other options and features of the script work good, only to add a new forum make problems.

4 (edited by Smartys 2005-10-20 15:09)

Re: Problem with adding a new forum

Did you install any mods?
Because the code looks like this

// Add a "default" forum
if (isset($_POST['add_forum']))
{
    confirm_referrer('admin_forums.php');

    $add_to_cat = intval($_POST['add_to_cat']);
    if ($add_to_cat < 1)
        message($lang_common['Bad request']);

    $db->query('INSERT INTO '.$db->prefix.'forums (cat_id) VALUES('.$add_to_cat.')') or error('Unable to create forum', __FILE__, __LINE__, $db->error());

    // Regenerate the quickjump cache
    require_once PUN_ROOT.'include/cache.php';
    generate_quickjump_cache();

    redirect('admin_forums.php', 'Forum added. Redirecting …');
}

So, unless you've messed with something in the code or in the HTTP request, I don't know how that's happening

5 (edited by Boarder 2005-10-20 18:50)

Re: Problem with adding a new forum

This is a copy of the code in the admin_forums.php:

// Add a "default" forum
if (isset($_POST['add_forum']))
{
    confirm_referrer('admin_forums.php');

    $add_to_cat = intval($_POST['add_to_cat']);
    if ($add_to_cat < 1)
        message($lang_common['Bad request']);

    $db->query('INSERT INTO '.$db->prefix.'forums (cat_id) VALUES('.$add_to_cat.')') or error('Unable to create forum', __FILE__, __LINE__, $db->error());

    // Regenerate the quickjump cache
    require_once PUN_ROOT.'include/cache.php';
    generate_quickjump_cache();

    redirect('admin_forums.php', 'Forum added. Redirecting …');
}


Versions:
PunBB-Forum 1.2.9
PHP 5.0.4
MySQL 4.1.10a-nt

Re: Problem with adding a new forum

Well, then my only guess is that you're somehow adding a forum without specifying a category

Re: Problem with adding a new forum

Enable DEBUG mode and try again.

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