Title: Adding gallery
Last modified: October 29, 2021

---

# Adding gallery

 *  Resolved [skytthe](https://wordpress.org/support/users/skytthe/)
 * (@skytthe)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/adding-gallery/)
 * When I add a gallery in a page using the Gutenberg editor I get these messages
   in the top of the box:
 *     ```
       Warning: Creating default object from empty value in /var/www/markusminde.dk/dev/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php on line 820
   
       Warning: Invalid argument supplied for foreach() in /var/www/markusminde.dk/dev/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php on line 568
   
       Warning: Creating default object from empty value in /var/www/markusminde.dk/dev/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php on line 820
   
       Warning: Invalid argument supplied for foreach() in /var/www/markusminde.dk/dev/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php on line 568
       ```
   
 * The gallery works fine on the page, but I dont know what the messages mean, and
   the should’nt be there either…
 * Best regards
    Knud

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

 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/adding-gallery/#post-15024289)
 * Hi [@skytthe](https://wordpress.org/support/users/skytthe/),
 * Thanks for your report. Our developers will look into fixing these warnings into
   the upcoming update ( they have created an issue ticket for tracking it ).
 * In the meantime, there’s a workaround that’ll help hiding the warnings – you 
   can edit `wp_config.php` file and replace:
 * `define('WP_DEBUG', true);`
 * with these lines
 *     ```
       ini_set('display_errors','Off');
       define('WP_DEBUG', false);
       define('WP_DEBUG_DISPLAY', false);
       ```
   
 * Sorry for the inconveniences created
    -  This reply was modified 4 years, 5 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
 *  Thread Starter [skytthe](https://wordpress.org/support/users/skytthe/)
 * (@skytthe)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/adding-gallery/#post-15025173)
 * Thanks for quick reply, and for workaround 🙂

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

The topic ‘Adding gallery’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [skytthe](https://wordpress.org/support/users/skytthe/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/adding-gallery/#post-15025173)
 * Status: resolved