• Resolved sime0n

    (@sime0n)


    I turned on WP_DEBUG and got a Doc Repo ob_clean() error:
    Notice: ob_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete in /home/user/example.com/wp-content/plugins/document-repository/document-repository.php on line 297

    I searched and found this: https://stackoverflow.com/questions/3521612/php-force-an-image-download-from-above-directory-root

    I added ob_start(); to line 297, just before ob_clean() in document-repository.php and all’s well, no error.

    I posted previously about duplicate entries. As it happened, I got a request to make the doc repo admin searchable, so searched, found, and installed the MetaSearchTo plugin, and used Yoast’s SEO plugin to assign a focus keyword (the slug) to each doc, worked well, until it didn’t. The MetaSearchTo plugin zonked out with the latest WP update, creating the aforementioned duplicate entires. I replaced MetaSearchTo with Relevanssi, works fine. However, it’s enough of a work around I figured I’d mention it as a feature request here in case you felt it worth integrating, fwiw.

    This has more to do with WooCommerce I think, I’m in discussion with their devs currently, but when WooCommerce is active, it blocks doc repo downloads in IE with a XDomainRequest error. Stop Spammer Registrations does the same thing, though that’s more understandable, and easier to deactivate without replacing whole sections of the site. I wanted to post about it here so you know it’s happening, and in case you’ve run into this and know of a fix. I’ll update this thread once WooCommerce is through testing.

    https://www.ads-software.com/extend/plugins/document-repository/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    Are you using the development version?

    The current released version is not compatible with WP 3.5.

    Thread Starter sime0n

    (@sime0n)

    I am, and actually think I may have just figured out how to prevent the XDomainRequest error in IE while WooCommerce is running. Adding: header( ‘Cache-Control: must-revalidate’ ); to document-repository.php prevents the XDomainRequest error for me. So in all I’ve changed the code to look like this:

    ob_start();
    ob_clean();
    header( 'Content-Description: File Transfer' );
    header( 'Content-Type: ' . $mime_type );
    header( "Content-Disposition: attachment; filename={$filename}" );
    header( 'Content-Transfer-Encoding: binary' );
    header( 'Cache-Control: must-revalidate' );
    Plugin Author Ron Rennick

    (@wpmuguru)

    That completely blew the download on me in Chrome (as in the tab dies).

    Thread Starter sime0n

    (@sime0n)

    I eventually discovered the ie8 xdomainrequest error was caused by supercache trying to serve a static page rather than handoff the url to the pdf. All good now. I really appreciate the plugin. Thanks!

    Plugin Author Ron Rennick

    (@wpmuguru)

    Thanks for letting me know ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ob_start(); – admin doc search – XDomainRequest’ is closed to new replies.