Support » Plugin: Slide Anything - Responsive Content / HTML Slider and Carousel » Warning: DOMDocument::loadHTML(): Empty string supplied as input

  • A very good (probably, the best) slider plugin for WP! But after I clicked “Enable ‘Lazy Load’ Images”, an error occurred on the page with slider:

    Warning: DOMDocument::loadHTML(): Empty string supplied as input in /home/u/user/site.com/public_html/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 1023

    Warning: DOMDocument::loadHTML(): Empty string supplied as input in /home/u/user/site.com/public_html/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 1023

    Warning: DOMDocument::loadHTML(): Empty string supplied as input in /home/u/user/site.com/public_html/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 1023

    Warning: DOMDocument::loadHTML(): Empty string supplied as input in /home/u/user/site.com/public_html/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 1023

    (the slider have 4 images, to there are 4 errors). Also, no errors on the Chrome console.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author simonpedge

    (@simonpedge)

    Hi, I’m struggling to replicate this issue on my test site.

    I have a page that I used to test the ‘Lazy Load’ functionality:
    https://edgewebpages.com/test-page/
    (this slider has the ‘Enable Lazy Load Images’ option selected)

    I enabled ‘Debug Display’ in my ‘wp-config.php’ file:

    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', true);

    I got no errors displayed.

    I then thought that maybe this error might occur with slides that contained no images, so I added a slide containing only text. Still no errors.

    The line you are getting errors on is the PHP function ‘loadHTML’:
    $dom->loadHTML(mb_convert_encoding($slide_content, 'HTML-ENTITIES', 'UTF-8'));
    which loads a provided string into a previously defined DOM object.

    Maybe this PHP function doesn’t work properly on certain versions of PHP. I have PHP version 5.6 running on my hosting – what version of PHP is your host running?

    Hi, thank you for fast & detailed reply!
    My website runs on PHP 5.6 too + https (SSL).

    After reading your reply I enabled “Other Settings ==> DOMContentLoaded event:”, but the error still appears.

    Every slide is an image (as a slide background), and no content in the slides` visual editor.

    The page with slider is in the first post (under construction)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.