• Resolved klasyc

    (@klasyc)


    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:

    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:

    
    // 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

    (@imagely)

    Hi @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

    (@klasyc)

    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

    (@imagely)

    Thanks @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.