Support » Plugin: Cactus Masonry Classic » Fatal error: Unknown: Cannot use output buffering in output buffering display ha

  • Resolved scratchy

    (@clickarmada)


    Yesterday worked fine but today I got this error:

    Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0

    I deactivated the plugins one by one until I found this plugin is causing the error. I guess is consuming the server resources, can you make it load less images at the same time?

    https://wordpress.org/plugins/masonry-post-gallery/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author cactus.cloud

    (@bortpress)

    Are you using W3 Total Cache or similar. Try clearing all of your caches. Also, if you are using W3 Total Cache, disabling or deleting the plugin may not stop the caching.

    This plugin loads images no differently than your browser would – it doesn’t preload anything. And it also loads images incrementally. So, if you have pages and pages of images, it will only load a little further than the user has scrolled.

    You can reduce the images per page but I doubt this will have any effect. How to do this is shown on the cactus masonry website (which I also reference to remember the parameters). And sorry, the website is down at the moment, I will try to bring it back up tonight.

    Thread Starter scratchy

    (@clickarmada)

    Thank you for the reply bortpress. I love the plugin as you can see in my rating 😉

    But unfortunately I can’t use it right now because of that error.

    I don’t use any cache plugin.

    For me the images start loading immediately after the page is loaded, before scrolling down.

    It works when I activate it on 1-2 sites but when I activate on all 5 sites they crash and I am on a dedicated server.

    I wish I had access to all the parameters maybe will find a way to load less images when scroll but your site is 404.

    Plugin Author cactus.cloud

    (@bortpress)

    Hey again,

    I have never seen this error, but I am interested to figure it out.

    The site should be back up now. [cactus-masonry page_size="1"] will limit the results to one. Try that. If it helps, then perhaps you could use smaller galleries with pagination? I have a pagination PHP script here, which you can replace your shortcode with. You will just need to add your parameters and set the variables at the top. You will also have to use a plugin to enable PHP execution on your pages.

    http://cactuscomputers.com.au/masonry/pagination.txt

    Tell me how you go. I will look further into this when I get a moment,

    Cheers

    Thread Starter scratchy

    (@clickarmada)

    Hi bortpress,

    I tried this parameter page_size=”1″ but I want infinite scroll so users will stay longer. But if I remove it in the shortcode place I get this error:

    Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 478272 bytes) in /home/user/public_html/wp-content/plugins/masonry-post-gallery/masonry-post-gallery.php on line 525

    I use the shortcode directly in post.php with echo do_shortcode. So I tested the pagination script and it works but I really need the infinite scroll.

    Maybe my problem is that it starts loading before scrolling down, immediately after the page loads appears Scroll Loading Box, like it would want to preload everything before. It doesn’t work like on your site, when scroll down only.

    Best regards

    Plugin Author cactus.cloud

    (@bortpress)

    Hey again,

    Updates
    I’ve just sent out an update – but it doesn’t address your issue in particular. I have updated some of the dependencies, so if there is a bug in that code it may have been addressed by its author. If not, read on.

    Image Size and Thumbnails
    So, how large are your images? Your buffer size is 40mb. Are you loading high file-sized images? If you are outputting that much per page, you may chew through more bandwidth (and more of your visitors time) then you need to. Or maybe your site has a very different layout to mine (which isn’t a bad idea) and it makes sense in your context.

    Still, maybe check your thumbnail sizes under WordPress’s media settings. These are the image sizes which the plugin uses. Also note which size you’re fetching with the quality parameter. The default is "thumbnail" – but how large that is depends on your WordPress settings.

    Preloading
    Now, the plugin does preload each image before it renders it to the screen – one by one. It has to do that, otherwise it would not know how big each image is and thus where to place it in the gallery. But still, it only preloads the image size specified by the quality parameter – not the full size image (unless you tell it to).

    You can load the thumbnail size in the gallery, but link to the full size image, with the
    link_location parameter. [cactus-masonry quality="thumbnail" link_location="full"] would preload and display small images (as defined by WordPress) in the gallery but link to the full sized images when each gallery item is clicked.

    Large Images and Infinite Scroll
    However, maybe your loading a list of tall and/or wide images – then you may have a problem with the default infinite scroll setting.

    If you have large images like that, then infinite scroll may be attempting to fetch too many images at a time. Infinite scroll loads the images in groups of 30 at a time. You can change this by setting the posts_per_page parameter. However, infinite scroll will keep on loading until enough images have been fetched to cover past the bottom of the page (and then a little bit).

    I hope this helps.

    Thread Starter scratchy

    (@clickarmada)

    Wow! Thank you for the long and detailed reply. I tried everything, I think it’s the time to give up.

    Indeed I use large images instead of thumbnails in all my themes. The last setting I tried was:
    [cactus-masonry width=”100%” posts_per_page=”1″] in a hope the images will load one by one, still the same error.

    However thank you very much, you are a nice guy and the plugin is awesome!

    Plugin Author cactus.cloud

    (@bortpress)

    Ugh, that’s such a shame. I hope it didn’t cost you too much time testing. Really, I’m stumped. That’s an odd error – and the only time I’ve even heard of such an error is when a cache has gone bad.

    Thanks for being so patient.

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Unknown: Cannot use output buffering in output buffering display ha’ is closed to new replies.