Bug #233

Add Ban Page Error: Cannot Add a Ban

Added by Alteran Ancient 133 days ago. Updated 131 days ago.

Status:Resolved Start:08/25/2008
Priority:Immediate Due date:
Assigned to:Brad Smith % Done:

100%

Category:Web Panel
Target version:1.3.1

Description

It is currently not possible to add a ban or accept a ban submission request, since the "Add Ban" button fails to work.

The details of the error are as follows:

Line: 458
Char: 2
Error: 'value' is null or not an object
Code: 0
URL: http://www.<mywebsite>.com/bans/index.php?p=admin&c=bans

In addition, bans submitted by non-admins have an incorrect submission date of "1st January 1970"

Associated revisions

Revision 133
Added by Brad Smith 131 days ago

  • Fixed #234 - Removed some of the notice errors in debug mode
  • Fixed #233 - AJAX/Script setting reasons
  • Fixed #234 & #233 - Date missing from ban submission details
  • Fixed erroneous template entries for reason.msg
  • Fixed AddBan with KickIt enabled errors while in Developer or Debug mode
  • Added ALTER TABLE ADD [IF NOT EXISTS] to items in updater/data/112.php

History

Updated by Alteran Ancient 133 days ago

The problem seems to be with admin.bans.php, and I managed to code a work-around, but it's very hacky!

Updated by Recon _ 132 days ago

Maybe you could post your code and tell us what version you are using.

Updated by Alteran Ancient 132 days ago

I was running version 1.3, and I only started having trouble since upgrading, but I was having several other issues while running 1.3 One of the other team admins and I worked out what had changed and managed to code a fix for the "Add Ban" button, but it was a little hacky. Eventually, we decided to back-up our database and roll-back to version 1.2, which we knew worked.

I can tell you what we did to fix it, though:

In /pages/admin.bans.php:

Head to the javascript section, starting around line 262.
The bad code is contained within the function "ProcessBan()"

To fix the issue, we commented-out lines 285-288.

var reason = $('listReason')[$('listReason').selectedIndex].value;

    if (reason == "other")
        reason = $('txtReason').value;
At line 345:
reason,
We replaced it with:
 $('reason').value, 

However, as I mentioned, issues were also popping-up in various other places, including theme selection, where themes would display "Array", and would not be selectable.

Updated by Brad Smith 131 days ago

  • Status changed from New to Closed
  • Assigned to set to Brad Smith
  • % Done changed from 0 to 100

Fixed javascript errors and ban submissions in release r133

Updated by Brad Smith 131 days ago

  • Status changed from Closed to Resolved

Also available in: Atom PDF