Galler Sort Bug
-
Greetings.
The Sort Gallery page (/wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=24&paged=1) throws a:
“PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1926485 bytes) in /xxx/wp-includes/wp-db.php on line 880”
…and the page breaks at the (X)nth image. PHP dies and the page doesn’t finish to load, so everything fails to work (no JS available).
This happens when i have a big gallery (250 images or more). I can fix it by editing the code on /wp-content/plugins\nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage-sort.php
Notice the commented “echo” call, replaced by a different echo, just for the image_slug field. This solves the PHP Fatal error / memory problem.
<div class='jqui-sortable'> <?php if($picturelist) { foreach($picturelist as $picture) { ?> <div class="imageBox" id="pid-<?php echo $picture->pid ?>"> <div class="imageBox_theImage" style="background-image:url('<?php echo nextgen_esc_url( $picture->thumbURL ); ?>')"></div> <div class="imageBox_label"><span><?php echo $picture->image_slug; //echo esc_html( stripslashes($picture->alttext) ); ?></span></div> </div> <?php } } ?> </div>
This bug has been annoying me for quite some versions ago. And would be great if you could fix it, because every time i upgrade Nextgen Gallery, the sort page become useless.
Can anyone else reproduce this problem?
I’m using WordPress Multisite 3.8.1 and the latest Nextgen Gallery (2.0.59), but, like I said, this bug as been present since I can remember.
Thank you in advance for caring.
- The topic ‘Galler Sort Bug’ is closed to new replies.