• Resolved yamaken1126

    (@yamaken1126)


    Hi!

    If you install and update Simple LIghtbox v2.9.0 or later, you will get the following fatal error and WordPress will go down.

    The environment is AWS (Lightsail), PHP7.4 or later (8 was also the same), WP version 6.0.2, and Japanese language.

    The following is the error log.

    *This WP was created for verification purposes. We will remove it as soon as possible after the resolution.
    **For error messages, line breaks have been inserted for readability.

    Fatal error:
    Uncaught UnexpectedValueException: DirectoryIterator::__construct(/bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.options.php):
    Failed to open directory:
    Not a directory in /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.utilities.php:1372
    Stack trace:
    #0 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.utilities.php(1372): DirectoryIterator->__construct()
    #1 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(239): SLB_Utilities->get_plugin_base_file()
    #2 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.options.php(54): SLB_Base->_hooks()
    #3 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(157): SLB_Options->_hooks()
    #4 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.field_collection.php(73): SLB_Base->_init()
    #5 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(121): SLB_Field_Collection->_init()
    #6 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.field_base.php(157): SLB_Base->__construct()
    #7 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.field_collection.php(66): SLB_Field_Base->__construct()
    #8 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.options.php(49): SLB_Field_Collection->__construct()
    #9 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(199): SLB_Options->__construct()
    #10 /bitnami/wordpress/wp-content/plugins/simple-lightbox/controller.php(542): SLB_Base->_set_options()
    #11 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(148): SLB_Lightbox->_options()
    #12 /bitnami/wordpress/wp-content/plugins/simple-lightbox/controller.php(166): SLB_Base->_init()
    #13 /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.base.php(121): SLB_Lightbox->_init()
    #14 /bitnami/wordpress/wp-content/plugins/simple-lightbox/controller.php(154): SLB_Base->__construct()
    #15 /bitnami/wordpress/wp-content/plugins/simple-lightbox/load.php(37): SLB_Lightbox->__construct()
    #16 /bitnami/wordpress/wp-content/plugins/simple-lightbox/main.php(43): require_once(‘…’)
    #17 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(307): slb_init()
    #18 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #19 /opt/bitnami/wordpress/wp-includes/plugin.php(476): WP_Hook->do_action()
    #20 /opt/bitnami/wordpress/wp-settings.php(598): do_action()
    #21 /bitnami/wordpress/wp-config.php(191): require_once(‘…’)
    #22 /opt/bitnami/wordpress/wp-load.php(50): require_once(‘…’)
    #23 /opt/bitnami/wordpress/wp-admin/admin.php(34): require_once(‘…’)
    #24 /opt/bitnami/wordpress/wp-admin/index.php(10): require_once(‘…’)
    #25 {main} thrown in /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.utilities.php on line 1372

    It seems that the code related to directory search has changed since v2.9.0, which seems to have led to the error about not being able to search the directory.

    Please investigate the cause of the error and let us know what to do about it, or fix it in the next update.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, some details about your particular setup would be helpful in evaluating your issue fully:

    1. Is WordPress’ installation directory a symlink to another directory?
    2. What are the values of the following WP constants for the site:
    • WP_CONTENT_DIR
    • WP_PLUGIN_DIR

    Thank you.

    Thread Starter yamaken1126

    (@yamaken1126)

    Symbolic links to other directories are not specifically set up.
    WP_CONTENT_DIR and WP_PLUGIN_DIR are not customized in wp-config.php In other words, they are left as default.

    WP_CONTENT_DIR : /home/bitnami/stack/wordpress/wp-content
    WP_PLUGIN_DIR : /home/bitnami/stack/wordpress/wp-content/plugins

    The original error dialog I saw stated “DirectoryIterator::__construct(/bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.options.php ):”, so I thought there was a configuration discrepancy in Simple Lightbox or in our WordPress itself.
    Is there something I need to set in wp-config.php?

    Plugin Author Archetyped

    (@archetyped)

    Hi, no special configuration is necessary to use SLB.

    However, there appears to be a mismatch between the WP_Plugin_DIR and the path to the file in the error message:

    /home/bitnami/stack/wordpress/wp-content/plugins
    /bitnami/wordpress/wp-content/plugins/simple-lightbox/includes/class.options.php
    

    The path up to /plugins should be the same for both, but they are not. This can create issues with any plugin that references WordPress’ standard constants (WP_CONTENT_DIR, WP_PLUGIN_DIR, etc.).

    The mismatched paths may be related to your site’s specific configuration. Please provide details on how your site is set up so that your issue can be reproduced.

    Thanks.

    Thread Starter yamaken1126

    (@yamaken1126)

    Hi,

    I just analyzed the file structure in Lightsail again and found the following three directories related to WordPress.

    /bitnami/wordpress/
    /opt/bitnami/wordpress/
    /home/bitnami/stack/wordpress/

    And in all of them there was /wp-content/ and its subdirectories, and in every /plugin/ directory there was /simple-lightbox/ and its set of files.
    Are all three directories related to the currently running WordPress? And in which directory can I fix it by playing with the files related to simple-lightbox?

    Thanks.

    Plugin Author Archetyped

    (@archetyped)

    Those are the symbolic links referred to earlier, and the cause for path mismatches.

    SLB v2.9.2 contains optimizations for handling symbolic links and should resolve your issue.

    Thread Starter yamaken1126

    (@yamaken1126)

    Thank you for your response. I will wait until the next update.

    Plugin Author Archetyped

    (@archetyped)

    No need to wait, 2.9.2 is already released ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Installing or updating causes fatal errors’ is closed to new replies.