Title: Gallery settings: ReferenceError: postboxes is not defined
Last modified: March 14, 2023

---

# Gallery settings: ReferenceError: postboxes is not defined

 *  Resolved [klasyc](https://wordpress.org/support/users/klasyc/)
 * (@klasyc)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/gallery-settings-referenceerror-postboxes-is-not-defined/)
 * Hello guys,
 * I discovered a strange bug which affects only slow-running web browsers:
 * When I open a photo gallery to edit its name, title image etc., I simply cannot
   expand “Gallery settings” box. The browser console reports the following error:
 *     ```wp-block-code
       ReferenceError: postboxes is not defined
       ```
   
 * After some investigation, I found the problematic code is defined in wp-content/
   plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage-
   images.php file:
 *     ```wp-block-code
       // Some third party plugins alter when postboxes are enqueued, so give this line a second to wait for it to be available
       setTimeout(function() {
           postboxes.add_postbox_toggles('ngg-manage-gallery');
       }, 1000);
       ```
   
 * Apparently, the code above is waiting for a hard-coded time period to load some
   piece of the page. But if the gallery has too many items and the browser is slow
   enough, the waiting period is simply too short and the postboxes element is not
   defined yet. The simplest fix is just to extend the timeout period, but it would
   be nice to implement this function better 🙂
 * Klasyc

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/gallery-settings-referenceerror-postboxes-is-not-defined/#post-16564876)
 * Hi [@klasyc](https://wordpress.org/support/users/klasyc/),
 * Thanks for reaching out. Just out of the curiosity, could you please let us know
   what device, browser and internet connection speed were you using while bumping
   into this issue?
 *  Thread Starter [klasyc](https://wordpress.org/support/users/klasyc/)
 * (@klasyc)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/gallery-settings-referenceerror-postboxes-is-not-defined/#post-16565644)
 * Hi,
 * it’s computer of my friend, approximately 10 years old Dell with SSD drive and
   Windows 10. The browser is the latest Chrome, we tried to update it first.
 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/gallery-settings-referenceerror-postboxes-is-not-defined/#post-16568452)
 * Thanks [@klasyc](https://wordpress.org/support/users/klasyc/).
 * I think this explains it. Such reports are extremely rare to be honest but in
   any case, we’ve registered it for our developers’ review.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Gallery settings: ReferenceError: postboxes is not defined’ is closed
to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Imagely](https://wordpress.org/support/users/imagely/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/gallery-settings-referenceerror-postboxes-is-not-defined/#post-16568452)
 * Status: resolved