← Back to team overview

mahara-contributors team mailing list archive

[Bug 2002924] [NEW] Problem with divide by zero when setting pagination limit

 

Public bug reported:

For certain blocks there is the ability to set the 'count' (pagination
limit) and if one sets it to a non integer value it causes the error:

 [DivisionByZeroError]: Modulo by zero

We need to set a rule for the field so that it can only be an integer, eg
  'rules'        => array('integer' => true, 'minvalue' => 1, 'maxvalue' => 100),

To test:

1) Create a plan
2) create some tasks
3) Edit a page and add plan block to page

view page - all is fine

4) Edit the plan block and set 'count' to 'none'

On save - things hang
On page reload - see error

Can't edit page to fix problem so will mark this bug as high

** Affects: mahara
     Importance: High
         Status: Confirmed

** Changed in: mahara
       Status: New => Confirmed

** Changed in: mahara
    Milestone: None => 23.04.0

** Changed in: mahara
   Importance: Undecided => High

** Description changed:

  For certain blocks there is the ability to set the 'count' (pagination
  limit) and if one sets it to a non integer value it causes the error:
  
-  [DivisionByZeroError]: Modulo by zero
+  [DivisionByZeroError]: Modulo by zero
  
  We need to set a rule for the field so that it can only be an integer, eg
-   'rules'        => array('integer' => true, 'minvalue' => 1, 'maxvalue' => 100),
+   'rules'        => array('integer' => true, 'minvalue' => 1, 'maxvalue' => 100),
  
  To test:
  
  1) Create a plan
  2) create some tasks
  3) Edit a page and add plan block to page
  
  view page - all is fine
  
  4) Edit the plan block and set 'count' to 'none'
  
  On save - things hang
  On page reload - see error
+ 
+ Can't edit page to fix problem so will mark this bug as high

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/2002924

Title:
  Problem with divide by zero when setting pagination limit

Status in Mahara:
  Confirmed

Bug description:
  For certain blocks there is the ability to set the 'count' (pagination
  limit) and if one sets it to a non integer value it causes the error:

   [DivisionByZeroError]: Modulo by zero

  We need to set a rule for the field so that it can only be an integer, eg
    'rules'        => array('integer' => true, 'minvalue' => 1, 'maxvalue' => 100),

  To test:

  1) Create a plan
  2) create some tasks
  3) Edit a page and add plan block to page

  view page - all is fine

  4) Edit the plan block and set 'count' to 'none'

  On save - things hang
  On page reload - see error

  Can't edit page to fix problem so will mark this bug as high

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/2002924/+subscriptions



Follow ups