Title: PHP Warning re: default-view.php template
Last modified: December 12, 2024

---

# PHP Warning re: default-view.php template

 *  Resolved [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/)
 * I’m getting these errors in our WordPress server error logs:
 * `PHP message: PHP Warning: Undefined array key "height" in /var/www/humortimes/
   wp-content/plugins/nextgen-gallery/templates/Thumbnails/default-view.php on line
   67; 
   PHP message: PHP Warning: Undefined array key "width" in /var/www/humortimes/
   wp-content/plugins/nextgen-gallery/templates/Thumbnails/default-view.php on line
   66;
 * What can be done about this? Thanks.

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

 *  [Barsha Paudel](https://wordpress.org/support/users/barsha05/)
 * (@barsha05)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/#post-18202136)
 * Hi [@jamminjames](https://wordpress.org/support/users/jamminjames/),
 * Thanks for reaching out,
 * To get rid of the error appearing, I recommend re-installing the NextGEN Gallery
   on your setup.
 * To reinstall the plugin, please download a fresh copy of the latest NextGEN Gallery
   and, then replace the one from your site’s **Dashboard > Plugins > Add new plugin
   > Upload plugin > Choose File** (with the files’ override when being asked). 
   Replace the file with the new one you just uploaded.
 * Install and activate the plugin.
 * Re-installing NextGEN Gallery wouldn’t affect your existing galleries.
 * Let me know the updates and I will get back to you.
 * Thanks!
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/#post-18217996)
 * Thanks. I reinstalled, and I don’t see that error anymore, but now the Nextgen
   gallery on a page doesn’t seem to be seeing new images uploaded to the gallery
   folder, nor does it change when I delete images on the backend. I have deleted
   all caches.
 * When I tried scanning the directory (via the button provided in “Gallery Settings”
   while in the gallery), I got a critical error: “There has been a critical error
   on this website.”
 * The logs say:
 * `2024/12/27 15:34:51 [error] 531474#531474: *496445 FastCGI sent in stderr: "
   PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type
   string on string in /var/www/humortimes/wp-content/plugins/nextgen-gallery/src/
   DataStorage/Manager.php:2297
   Stack trace: 0 /var/www/humortimes/wp-content/plugins/
   nextgen-gallery/src/Legacy/admin/functions.php(120): Imagely\NGG\DataStorage\
   Manager->generate_image_size() 1 /var/www/humortimes/wp-content/plugins/nextgen-
   gallery/src/Legacy/admin/functions.php(313): nggAdmin::resize_image() 2 /var/
   www/humortimes/wp-content/plugins/nextgen-gallery/src/Legacy/admin/functions.
   php(540): nggAdmin::add_Images() 3 /var/www/humortimes/wp-content/plugins/nextgen-
   gallery/src/Legacy/admin/manage.php(902): nggAdmin::import_gallery() 4 /var/www/
   humortimes/wp-content/plugins/nextgen-gallery/src/Legacy/admin/manage.php(62):
   nggManageGallery->post_processor_images() 5 /var/www/humortimes/wp-content/plugins/
   nextgen-gallery/src/Legacy/admin/admin.php(217): nggManageGallery->__construct()
   6 /var/www/humortimes/wp-includes/class-wp-hook" while reading response header
   from upstream, client: 162.158.167.78, server: www.humortimes.com, request: "
   POST /wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=18&paged
   =1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host:"
   www.humortimes.com", referrer: "https://www.humortimes.com/wp-admin/admin.php?
   page=nggallery-manage-gallery&mode=edit&gid=18&paged=1"
    -  This reply was modified 1 year, 5 months ago by [jamminjames](https://wordpress.org/support/users/jamminjames/).
 *  [Barsha Paudel](https://wordpress.org/support/users/barsha05/)
 * (@barsha05)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/#post-18220235)
 * Hi [@jamminjames](https://wordpress.org/support/users/jamminjames/),
 * Sorry to hear about the trouble,
 * I suspect one of the plugins you’re using might be causing the problem, so please
   try deactivating all the plugins except the NextGEN Gallery one by one and check
   if the problem resolves.
 * If the problem resolves, please activate the plugin one by one to check the one
   causing the issue on your end.
 * Let me know how it went and I will get back to you accordingly.
 * Thanks!
 *  [Carlos Carmona](https://wordpress.org/support/users/cecarmona/)
 * (@cecarmona)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/#post-18420322)
 * Hi [@jamminjames](https://wordpress.org/support/users/jamminjames/) ,
   We haven’t
   heard back from you in a few days, so I’m going to go ahead and close this thread
   for now. But if you’d like us to assist further, please feel welcome to continue
   the conversation.Thanks!

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

The topic ‘PHP Warning re: default-view.php template’ 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/)

## Tags

 * [height](https://wordpress.org/support/topic-tag/height/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * 4 replies
 * 3 participants
 * Last reply from: [Carlos Carmona](https://wordpress.org/support/users/cecarmona/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-re-default-view-php-template/#post-18420322)
 * Status: resolved