NextGen Gallery Manipulating Output Buffer Causing Conflicts
-
I have run into a problem that is being caused by NextGen Gallery manipulating the output buffer on pages where there is absolutely NO NextGen Gallery output being displayed.
I have a Gravity Forms form that I created embedded on a page with nothing else (nothing in the sidebar or in the footer because I’m still in development). There is definitely NOTHING related to NextGen Gallery being displayed on the page.
This form is paginated, and loads the pages via ajax. The second page of the form includes a date picker on one of the fields.
With NextGen Gallery active … when I go to page 2 of the form, the date picker does not work.
With NextGen Gallery deactivated … when I go to page 2 of the form, the date picker does not work.
I know that this is an issue with NextGen Gallery because I deactivated every other plugin on the site and switched back to the default Twenty Fifteen theme, and I can reproduce this issue.
I tracked the problem down to the NextGen Gallery “Resource Manager”. It is messing with the output buffer to move the javascript and stylesheets around (at least I think that’s what it’s doing).
When the ajax call is being performed for the Gravity Forms form, the response gets all messed up because NextGen Gallery is mucking around with the output buffer.
Why is NextGen Gallery doing this on EVERY page of the site, even when there isn’t anything NextGen-related displayed on the page? Can this be modified to enqueue things normally, and only when NextGen Gallery content is included on the page?
In the meantime, if anyone else is encountering similar issues … after spending the last 4 hours troubleshooting this issue, I found that I was able to fix things by putting the following code in the wp-config.php file …
/* Tell NextGen Gallery to leave the output buffer alone!!! */ define('NGG_DISABLE_RESOURCE_MANAGER', true);
- The topic ‘NextGen Gallery Manipulating Output Buffer Causing Conflicts’ is closed to new replies.