Title: Bug fix: ob_end_flush();
Last modified: July 18, 2022

---

# Bug fix: ob_end_flush();

 *  Resolved [Andy Feliciotti](https://wordpress.org/support/users/someguy9/)
 * (@someguy9)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/)
 * I think after the line “$result[‘html’] = ob_get_clean();” adding a “ob_end_flush();”
   in class-wp-job-manager-ajax.php is recommended. I was having an issue with my
   ajax returning blank and this seemed to fix it.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15837037)
 * Hi there,
 * Could you please let us know what issue you were exactly facing with WP Job Manager,
   and editing `class-wp-job-manager-ajax.php` helped with that?
 * We can test it on our side and take action accordingly.
 *  Thread Starter [Andy Feliciotti](https://wordpress.org/support/users/someguy9/)
 * (@someguy9)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15838697)
 * The ajax request wouldn’t return anything, seemed like the variable [‘html’] 
   would crash the page if it was too long. If I added that after the ob area it
   fixed the issue though.
 *  [Mohamed Mehdi Benchalal](https://wordpress.org/support/users/muffinpeace/)
 * (@muffinpeace)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15848043)
 * Hi [@someguy9](https://wordpress.org/support/users/someguy9/)
 * Thanks for providing more details about that; I have raised this with the development
   team.
 * Best,
 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15860935)
 * Hello [@someguy9](https://wordpress.org/support/users/someguy9/),
 * Thanks for bearing with us while we were checking this with our developers. Upon
   further investigation, our tech team wonders if there is any possible local limitation
   at your end causing what you reported (perhaps a memory limit?)
 * It’d be helpful if you could share the HTML example you mentioned you flushed
   there to estimate its size and figure out whether there might be limits in configuration.
 * I also have opened a GH issue for the sake of documentation; you’re welcome to
   follow along there and add any information that can be useful for us:
 * [https://github.com/Automattic/WP-Job-Manager/issues/2302](https://github.com/Automattic/WP-Job-Manager/issues/2302)
 * Thanks!
 *  Thread Starter [Andy Feliciotti](https://wordpress.org/support/users/someguy9/)
 * (@someguy9)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15861518)
 * I am using a basic spinupwp install. The issue only happens when there are like
   30+ listings to be returned (I manually played w/ the array size). That being
   said I used query monitor and the memory limit wasn’t near being reached/tried
   increasing it. Just seems like it’s unable to keep context when the buffer is
   large or something so it returns nothing.
 *  [Mohamed Mehdi Benchalal](https://wordpress.org/support/users/muffinpeace/)
 * (@muffinpeace)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15868592)
 * Hi [@someguy9](https://wordpress.org/support/users/someguy9/)
 * Thanks for clarifying! I’ve added that to the Github issue that my colleague 
   Stef started, and I’d highly suggest following things there so you don’t miss
   anything:
 * [https://github.com/Automattic/WP-Job-Manager/issues/2302](https://github.com/Automattic/WP-Job-Manager/issues/2302)
 * Best,

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Bug fix: ob_end_flush();’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Mohamed Mehdi Benchalal](https://wordpress.org/support/users/muffinpeace/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/bug-fix-ob_end_flush/#post-15868592)
 * Status: resolved