Troubleshooting Common NextGEN Gallery Errors: From JSON to PHP Warnings
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:
- Update Everything: Ensure WordPress, your theme, and all plugins (especially NextGEN Gallery) are updated to their latest versions.
- 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.
- 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
-
Widget code errorhttps://wordpress.org/support/topic/widget-code-error-3/
-
Warning popup, leaks admin infohttps://wordpress.org/support/topic/warning-popup-leaks-admin-info/
-
Fatal error on ”?nextgen-attach…” optionhttps://wordpress.org/support/topic/fatal-error-on-post-new-php-option/
-
Undefined property: stdClass::$titlehttps://wordpress.org/support/topic/undefined-property-stdclasstitle/
-
Unload listener errorhttps://wordpress.org/support/topic/unload-listener-error/
-
jquery, jquery-modal (missing)https://wordpress.org/support/topic/jquery-jquery-modal-missing/
-
Exception thrown `add_wizard` not defined for C_NextGEN_Wizard_Managerhttps://wordpress.org/support/topic/exception-thrown-add_wizard-not-defined-for-c_nextgen_wizard_manager/
-
Rank Math – Error thrown Call to a member function get_entities() on nullhttps://wordpress.org/support/topic/rank-math-error-thrown-call-to-a-member-function-get_entities-on-null/
-
Getting “Undefined array key” warnings regarding default-view.phphttps://wordpress.org/support/topic/getting-undefined-array-key-warnings-regarding-default-view-php/
-
Called get_entities() on null and possible fixhttps://wordpress.org/support/topic/called-get_entities-on-null-and-possible-fix/
-
Resolved not a NextGen Errorhttps://wordpress.org/support/topic/no-galleries-shown-anymore/
-
NextGEN Gallery displaying errorhttps://wordpress.org/support/topic/nextgen-gallery-displaying-error/
-
Conflict with Events Calendarhttps://wordpress.org/support/topic/conflict-with-events-calendar-4/
-
Uncaught TypeError: this.resetImgSrc is not a functionhttps://wordpress.org/support/topic/uncaught-typeerror-this-resetimgsrc-is-not-a-function/
-
Attempt to read property “ID” on nullhttps://wordpress.org/support/topic/attempt-to-read-property-id-on-null-18/
-
Widget code errorhttps://wordpress.org/support/topic/widget-code-error-2/
-
PHP Warning re: default-view.php templatehttps://wordpress.org/support/topic/php-warning-re-default-view-php-template/
-
exif_read_data function not foundhttps://wordpress.org/support/topic/exif_read_data-function-not-found/
-
Js reference errorhttps://wordpress.org/support/topic/js-reference-error-2/
-
Compatibility problemhttps://wordpress.org/support/topic/compatibility-problem-18/
-
PHP 8.1: Undefined array keyhttps://wordpress.org/support/topic/php-8-1-undefined-array-key/
-
Events (tribe-events) & Nextgen Updating failshttps://wordpress.org/support/topic/events-tribe-events-nextgen-updating-fails/
-
Conflict with Getwid – The response is not a valid JSON response.https://wordpress.org/support/topic/conflict-with-getwid-the-response-is-not-a-valid-json-response/
-
Help with null error / slow loadhttps://wordpress.org/support/topic/help-with-null-error-slow-load/
-
Undefined property errorhttps://wordpress.org/support/topic/undefined-property-error-13/
-
Error thrown Call to undefined function Avada()https://wordpress.org/support/topic/error-thrown-call-to-undefined-function-avada/
-
NGG 3.57 | Errors running on a local serverhttps://wordpress.org/support/topic/ngg-3-57-errors-running-on-a-local-server/
-
Updating failed. The response is not a valid JSON response.https://wordpress.org/support/topic/updating-failed-the-response-is-not-a-valid-json-response-70/
-
NextGEN gallery breaks page-sitemap.xmlhttps://wordpress.org/support/topic/nextgen-gallery-breaks-page-sitemap-xml/
-
Warning not able to dismiss in Admin sidehttps://wordpress.org/support/topic/warning-not-able-to-dismiss-in-admin-side/
-
NextGen compatibility error with Litespeed Serverhttps://wordpress.org/support/topic/nextgen-compatibility-error-with-litespeed-server/