Support » Plugin: Lightbox with PhotoSwipe » Warnings, please fix

  • Warnings from your plugin are filling my server space in 1 day. Please fix code.

    PHP Warning exif_read_data(): Unable to open file 
        [internal] exif_read_data
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:454 LightboxPhotoSwipe::outputCallback
        [internal] preg_replace_callback
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:528 LightboxPhotoSwipe::output
        [internal] ob_end_flush
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/smart-slider-3/nextend/wordpress/assetInjector.php:124 N2WordpressAssetInjector::closeOutputBuffers
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:310 WP_Hook::do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/plugin.php:465 do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/load.php:954 shutdown_action_hook
        [internal] [main]
    PHP Warning getimagesize(/var/www/example.com/releases/20191024141642/www/https://static.example.org/s2.example.org/docs/certificate_vincent.jpg): failed to open stream: No such file or directory 
        [internal] getimagesize
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:451 LightboxPhotoSwipe::outputCallback
        [internal] preg_replace_callback
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:528 LightboxPhotoSwipe::output
        [internal] ob_end_flush
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/smart-slider-3/nextend/wordpress/assetInjector.php:124 N2WordpressAssetInjector::closeOutputBuffers
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:310 WP_Hook::do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/plugin.php:465 do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/load.php:954 shutdown_action_hook
        [internal] [main]
    PHP Warning filemtime(): stat failed for /var/www/example.com/releases/20191024141642/www/https://static.example.org/s2.example.org/docs/certificate_vincent.jpg 
        [internal] filemtime
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:428 LightboxPhotoSwipe::outputCallback
        [internal] preg_replace_callback
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:528 LightboxPhotoSwipe::output
        [internal] ob_end_flush
        /var/www/example.com/releases/20191024141642/www/wp-content/plugins/smart-slider-3/nextend/wordpress/assetInjector.php:124 N2WordpressAssetInjector::closeOutputBuffers
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters
        /var/www/example.com/releases/20191024141642/www/wp-includes/class-wp-hook.php:310 WP_Hook::do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/plugin.php:465 do_action
        /var/www/example.com/releases/20191024141642/www/wp-includes/load.php:954 shutdown_action_hook
        [internal] [main]
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    I just found a problem which is fixed with the next update.

    However – that filemtime() creates warnings is unexpected, as it is called as @filemtime(), so warnings should never occur, even if the file does not exist.

    • This reply was modified 1 year, 11 months ago by Arno Welzel.
    • This reply was modified 1 year, 11 months ago by Arno Welzel.
    Plugin Author Arno Welzel

    (@awelzel)

    I just published version 2.10 which should fix the warnings and also handle external images which are not served by the website correct again.

    If the problem is solved for you, let me know – thank you.

    Thread Starter Dima Stefantsov

    (@dima-stefantsov)

    However – that filemtime() creates warnings is unexpected, as it is called as @filemtime(), so warnings should never occur, even if the file does not exist.

    https://www.php.net/manual/en/language.operators.errorcontrol.php
    I have set a custom error handler, this behaviour is expected. @ doesn’t break execution, have low priority, but still fires a handler.

    Thank you, Arno! Will try it today.

    Thread Starter Dima Stefantsov

    (@dima-stefantsov)

    It looks much better for now. Thank you!

    Got a single
    WordPress database error Duplicate entry 'b1ec5715a6a0ed34c9d491afa064a032-0' for key 'PRIMARY' for query INSERT INTO wp_lightbox_photoswipe_img (imgkey, created, width, height, exif_camera, exif_focal, exif_fstop, exif_shutter, exif_iso) VALUES ("b1ec5715a6a0ed34c9d491afa064a032-0", "2019-10-28 08:49:32", "2500", "3366", "", "", "", "", "") made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, N2WordpressAssetInjector::closeOutputBuffers, ob_end_flush, LightboxPhotoSwipe->output, preg_replace_callback, LightboxPhotoSwipe->outputCallback
    error so far. I’ll keep you informed 🙂

    Thread Starter Dima Stefantsov

    (@dima-stefantsov)

    Still getting a lot of

    PHP Warning filemtime(): stat failed for https://static.example.org/s2.example.org/docs/certificate_vincent.jpg 
        [internal] filemtime
        /var/www/example.com/releases/20191028124610/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:441 LightboxPhotoSwipe::outputCallback
        [internal] preg_replace_callback
        /var/www/example.com/releases/20191028124610/www/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php:543 LightboxPhotoSwipe::output
        [internal] ob_end_flush
        /var/www/example.com/releases/20191028124610/www/wp-content/plugins/smart-slider-3/nextend/wordpress/assetInjector.php:124 N2WordpressAssetInjector::closeOutputBuffers
        /var/www/example.com/releases/20191028124610/www/wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters
        /var/www/example.com/releases/20191028124610/www/wp-includes/class-wp-hook.php:310 WP_Hook::do_action
        /var/www/example.com/releases/20191028124610/www/wp-includes/plugin.php:465 do_action
        /var/www/example.com/releases/20191028124610/www/wp-includes/load.php:954 shutdown_action_hook
        [internal] [main]
    Plugin Author Arno Welzel

    (@awelzel)

    It seems your setup is a bit unusual. I don’t know how to fix this without having access to the live website where this happens.

    For example I have to idea at all why you have an image which is resolved to the URL

    https://static.example.org/s2.example.org/docs/certificate_vincent.jpg

    Where do “static.example.org” and “s2.example.org” come from?

    Edit: Can you tell me

    1) The real URL of the affected images – ideally the HTML code of with link to the image URL

    2) The base URL of the website

    • This reply was modified 1 year, 10 months ago by Arno Welzel.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Warnings, please fix’ is closed to new replies.