Menu

#144 Incorrect update of list of rooms during edit entry

Minor
closed
MRBS (195)
5
2012-07-20
2007-02-22
NorthTommy
No

To reproduce bug:

  • Add/edit entry:
  • let's assume you have a area a1 with 4 rooms and a area a2 with only 1 room
  • when a1 is selected 4 rooms are able to select
  • change to a2 now
  • expected: all rooms are removed and room of a2 is displayed
  • current result: only first 2 rooms are removed from list and third room is replaced by the room of a2

Problem:

When set option to null in JS the aoption removed imediately and option[1] becomes option[0]. Counting 0..length-1 is incorrect here:

Solution:
Count from last element to first element instead of first to last in lines approx. 390.
Replace corresponding lines in edit_entry.php by:

roomOptionNum = roomsObj.length;
for (i=(roomOptionNum-1); i >= 0 ; i--)
{
roomsObj.options[i] = null
}

Discussion

  • John Beranek

    John Beranek - 2007-02-24

    Logged In: YES
    user_id=71843
    Originator: NO

    Thanks for this bug report, I'll look at it when I have some more time.

    John.

     
  • John Beranek

    John Beranek - 2007-09-07

    Logged In: YES
    user_id=71843
    Originator: NO

    Thanks, that fix works and I've checked it into CVS.

    John.

     
  • John Beranek

    John Beranek - 2008-03-19

    Logged In: YES
    user_id=71843
    Originator: NO

    Fixed in MRBS 1.2.6.1

    John.