Back to Community

Troubleshooting Common NextGEN Gallery Errors: From JSON to PHP Warnings

31 threads Sep 9, 2025

Content

Users of the 'Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery' plugin occasionally encounter errors that can disrupt their website's functionality or admin experience. This guide compiles the most frequent issues and their known solutions, based on community reports and troubleshooting.

1. "The response is not a valid JSON response." or "Updating failed."

Problem: This error often occurs when trying to save pages or posts in the Gutenberg editor while NextGEN Gallery is active. It's frequently linked to conflicts with other plugins, such as The Events Calendar or Getwid.

Solution: A widely reported workaround is to disable NextGEN's shortcode manager by adding the following line to your site's wp-config.php file, just above the line that says /* That's all, stop editing! Happy publishing. */.

/** disable shorcode manager */
define('NGG_DISABLE_SHORTCODE_MANAGER', TRUE);

If this doesn't resolve the issue, a full conflict test is recommended. Deactivate all other plugins except NextGEN Gallery and your page builder (e.g., SiteOrigin, Getwid). If the error disappears, reactivate your plugins one by one to identify the conflicting one.

2. PHP Warnings and Notices (e.g., "Attempt to read property 'ID' on null")

Problem: With stricter error reporting in PHP 8.x, users may see warnings like "Attempt to read property 'ID' on null" or "Undefined array key." These are often non-critical notices originating from deep within WordPress core or theme functions, but they are triggered by NextGEN's code.

Solution: The 'Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery' team is aware of many deprecation warnings and is working on fixes for future updates. For a live site, the immediate solution is to disable the display of these errors by ensuring your wp-config.php file contains the following settings:

ini_set('display_errors','Off');
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Important: Only do this on a production site. Leaving debug enabled on a live site is a security risk and looks unprofessional to visitors.

3. "Call to a member function get_entities() on null" (Rank Math Sitemap Error)

Problem: This fatal error breaks sitemap generation for the Rank Math SEO plugin when NextGEN Gallery is active.

Solution: This is a known bug that the development team has documented for a fix in an upcoming release. There is no simple, recommended workaround for users. If sitemap functionality is critical, you may need to temporarily deactivate NextGEN Gallery when generating sitemaps or wait for the patched update.

4. JavaScript Errors in Admin (e.g., "photocrati_ajax is not defined")

Problem: Scripts from NextGEN Gallery are loading on admin pages where they aren't needed, causing console errors that may interfere with other administrative functions.

Solution: This is typically a minor bug. First, ensure you are running the latest version of the plugin, as updates often contain fixes for such issues. If the error persists and is causing functional problems, a reinstall is a good step. Delete the plugin from your Plugins page and install a fresh copy. Your galleries and settings are stored in the database and will not be affected.

5. Conflicts with Specific Themes or Plugins (e.g., The Events Calendar)

Problem: Notices and warnings related to stdClass::$content appear, often when using The Events Calendar plugin. In some cases, functionality like updating events may break.

Solution: These conflicts are well-known to the developers. For notices, the same WP_DEBUG disablement method mentioned above applies. For functional breaks (like not being able to save events), the only current workaround is to temporarily deactivate NextGEN Gallery when performing actions in the conflicting plugin's area until an official compatibility fix is released.

General Troubleshooting Steps

If you encounter an error not listed here, always start with these steps:

  1. Update Everything: Ensure WordPress, your theme, and all plugins (especially NextGEN Gallery) are updated to their latest versions.
  2. Conflict Test: Deactivate all plugins except NextGEN Gallery. Switch to a default WordPress theme like Twenty Twenty-Four. If the problem goes away, reactivate your theme and plugins one by one to find the conflict.
  3. Reinstall: Delete the NextGEN Gallery plugin and install it anew. This often resolves odd issues caused by incomplete updates or file corruption.

Remember, while many of these workarounds are effective, they are often temporary fixes for bugs that the 'Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery' team is actively working to resolve in future updates.

Related Support Threads Support