Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: BUG: catmgr.php - gallery with more than 245 categories  (Read 3691 times)

0 Members and 1 Guest are viewing this topic.

Mystic Diamond

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
BUG: catmgr.php - gallery with more than 245 categories
« on: August 27, 2006, 06:44:00 pm »

There seems to be a bug with catmgr.php. I have tested this page all day long and realized that when there is more than 245 categories, then it crashes the page, with no appropriate error message.

245 categories is all right, but if you add 1 more, then the browser loads an error page. I have tested this with the Categories Manager and the backend database.

Is there any way that this bug can be fixed? Is there a limit to the number of categories that the software can support.

http://www.mysticpoints.net/gallery
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: BUG: catmgr.php - gallery with more than 245 categories
« Reply #1 on: August 27, 2006, 07:41:21 pm »

read this thread... Nibbler posted a version of the catmgr that supports pagination

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: BUG: catmgr.php - gallery with more than 245 categories
« Reply #2 on: August 27, 2006, 11:10:08 pm »

Logged

Mystic Diamond

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: BUG: catmgr.php - gallery with more than 245 categories
« Reply #4 on: August 28, 2006, 07:51:34 am »

Thanks!
Logged

Mystic Diamond

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: BUG: catmgr.php - gallery with more than 245 categories
« Reply #5 on: August 28, 2006, 07:59:50 am »

There is a bug in the catmgr.php code, but I fixed it (in case anyone else is using that code)

The page variable doesn't display the appropriate records because of the statement only multiplies the CATS_PER_PAGE if 0 occurs

OLD:
   $start = isset($_GET['page']) ? $_GET['page']-1 : 0 * CATS_PER_PAGE;

NEW:
   $start = isset($_GET['page']) ? $_GET['page']-1 : 0;
             $start *= CATS_PER_PAGE;
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.