• Hi folks,

    When I noticed that NGG is not removing images from the server when I use Manage Galleries to delete a gallery on an active site, after performing the usual troubleshooting steps (disabling plugins, change to WP default theme, etc…) I decided to do a fresh clean install of WordPress on an empty test domain/account that I keep just for testing purposes and the same problem exists.

    PROBLEM – despite having Other Options > Delete Image Files set to Yes , NGG still leaves all images and folders on the server.

    This happens on a completely fresh clean WP 4.2 install using the default Twenty Fifteen theme, no custom themes installed, and only one Plugin (aside from Akismet) installed (underConstruction by Jeremy Massell).
    Disabling those two basic plugins makes no difference.

    Does anyone else have this problem of NextGen Gallery leaving images on the server even after deleting them through the NGG interface with Delete Image Files enabled?

    Here’s the info requested by your Photocrati support guidelines:

    – WordPress up to date? = Yes, fresh clean install 4.2

    – NextGEN up to date? = Yes, fresh clean install 2.0.79

    – What version of NextGEN Gallery did you upgrade from? = Not an upgrade, fresh install.

    – What theme are you running? = Twenty Fifteen

    – Which plugins do you have installed and activated? = Akismet and underConstruction (deactivating them makes no difference)

    – Does this error still occur if you switch your theme to a WordPress Twenty series theme and deactivate all plugins except NextGEN Gallery? = Yes

    My server:
    RHEL 5.11 64 bit / Apache 2.2.29 / mysql 5.5.42-cll / PHP 5.4.39 / mod_rewrite enabled / PHP Safe Mode OFF / cPanel 11.48.3 / plenty of RAM and CPU power, low load.


    I’ve checked the server logs:

    – /usr/local/apache/logs/error_log is totally clean, no errors.

    – cPanel error log is totally clean, no errors.

    – PHP error_log files in the hosting account show this error repeatedly:

    [25-Apr-2015 18:05:07 UTC] PHP Warning: getimagesize(1): failed to open stream: No such file or directory in /home/xxxxxxxxx/public_html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php on line 656

    (I replaced the actual account name with X’s above)

    That is the only clue / error I can find anywhere.

    I’d be grateful for any responses, thank you,
    Dave

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter anotherdave

    (@anotherdave)

    PS – even completely deactivating and uninstalling NGG still leave the gallery folder and sub-folders and images behind.

    Here’s something interesting and similar:
    https://www.ads-software.com/support/topic/server-unresponsive-for-10-15-minutes-after-uploading-images

    It seems that this version can do some damage. Sorry I even suggested using it. Now I have to make sure none of my customers upgrade this plugin.

    Thread Starter anotherdave

    (@anotherdave)

    Uninstalling the NGG plugin also leaves a TON of stuff behind in the database to be manually cleaned up. I can see how, in it’s current state, if someone uses it for a lot of images and then decides to switch away from it they’re going to accumulate a bunch of files in their hosting account and have a lot of cleanup to do in their database. I really don’t mean to knock this plugin but I’m just pretty surprised at just how much seems to be wrong with it behind the scenes. One could easily end up with thousands of junk rows and indexes in their DB tables as well as many files on their server that they might not realize are there (especially users who don’t FTP in to check folders and phpMyAdmin in to check the DB tables).

    Plugin Contributor photocrati

    (@photocrati)

    @anotherdave – We would be more than happy to have a look under the page at your site to see what may be going on. As it is, we do realize there is an issue when deleting images on some site but we have not found the underlying cause(s) as it does not happen on all sites.

    When deactivating and deleting NextGEN Gallery we do not currently clear the database image references as they are not recoverable and found historically users ultimately did not want to remove their entire gallery structure when they deleted the plugin.

    Please feel free to send us a Bug Report (https://nextgen-gallery.com/report-bug/) if you would like us to investigate further. We will need log in and FTP (and possible direct database access) for your WordPress installation, please include those credentials with your Bug Report.

    Thanks!

    – Cais.

    Thread Starter anotherdave

    (@anotherdave)

    Thank you for the response Cais.

    I appreciate the offer to investigate and I will take you up on it as soon as possible.

    Right now I’m a bit “stuck” doing some work for customers and have had to utilize an alternative plugin but I’ve saved this thread in my favorites and as soon as I get through the current jobs at hand I will provide you with full Administrator / FTP / cPanel / mySQL / phpMyAdmin access to my test site via your Bug Report link as you’ve instructed.

    Maybe that will lead to a revelation / solutions that we can come back and post here that could help other users as well.

    Will open the BR and provide you the info ASAP, likely within the next 7 days, and will update this thread when I submit it.

    Thank you!

    Thread Starter anotherdave

    (@anotherdave)

    Actually, since this is becoming more and more important I’ve made the time to do this today.

    I just did a completely fresh new WordPress install in a new folder call hdwp in the hosting account did nothing but the most basic settings and added a common construction plugin and the latest NGG plugin right from within Dashboard > Plugins.

    Then I:

    1. added a test page called Gallery Test Page to Dashboard > Pages.

    2. created a gallery inDashboard > Gallery > Add Gallery / Images called Mixed Images in NGG and uploaded 10 test images to it.

    3. added that gallery to the test page via the NGG button in the page editor.

    At this point, the PHP error_log file in the new WordPress folder already shows 10 instances of the following PHP warning. Assuming 1 instance for each image uploaded:

    PHP Warning: getimagesize(1): failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/hdwp/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php on line 656

    (no PHP error_log in the wp-admin folder at this point, just the WordPress public side folder /hdwp)

    So then I:

    1. Deleted the gallery from the test page.

    2. went to Dashboard > Gallery > Overview and confirmed that it showed the 10 images and 1 gallery still listed / in-tact.

    3. went to Dashboard > Gallery > Manage Galleries and selected the check box next to the gallery, chose Delete from the drop-down menu, clicked Apply.

    That removed the test gallery from Dashboard > Gallery > Manage Galleries , but:

    1. It did NOT remove the “10 Images” from Dashboard > Gallery > Overview

    2. It did NOT remove the mixed-images folder from wp-content/gallery

    3. It did NOT remove the image files, nor the backup image files, nor the thumbs.

    Note – At this point there are no errors in the server’s Apache error log nor in the cPanel error log, and no error_log file in the w-admin folder. The only errors that can currently be seen are the original 10 PHP Warnings (during the 10 image uploads) for package.module.nextgen_data.php in the PHP error_log file that the server generated in the main folder where this new clean test WordPress is installed.

    Cais,
    I’ll leave it alone now and head over to https://nextgen-gallery.com/report-bug/ to provide with full Administrator access to the WordPress install and full FTP / cPanel / mySQL / phpMyAdmin access to the hosting account in just a few minutes.

    Thread Starter anotherdave

    (@anotherdave)

    Cais – quick update – at your suggestion I submitted the detailed Bug Report to https://www.nextgen-gallery.com/report-bug/ and got your “Your message was sent successfully. Thanks.” message on the screen.

    However I did not include the Admin / FTP / cPanel info with the report since it didn’t appear that the form was particularly for that. I stated in the report that I will provide full access to everything / to you upon request.

    I’ll keep an eye on my email for any response and will report back here to update.

    Thank you!

    Hey Dave, if everyone went into such detail about what they were experiencing, and to such lengths to help the plugin authors understand the issue(s), there would be less problems using plugins.

    I normally try not to use plugins (as plugin author’s would have to admit) due to the risks involved (security and performance) unless it’s a solid well-known plugin (like NGG has been for my clients).

    However, most people are on shared hosts with a zillion gigs of space and bandwidth to spare (so they think). People don’t care about how much resources as wasted due to bad coding, or issues with other scripts. Smaller hosts tend to look out for their clients to make sure their client’s site is performing well rather than waiting for a complaint (ahem, host grater), and then blame it on not using a caching plugin to cover up their complete disregard for what they’re being paid for.

    I’ve checked the accounts on my server that use NGG, and fortunately they’re not killing the CPU and filling up the error logs, so I haven’t done anything more than kept an eye on logs.

    I will keep watching this thread for updates from NGG and yourself.

    Plugin Contributor photocrati

    (@photocrati)

    @jeffrohio – Please start your own topic so we can try to help you with your specific issue on your specific site.

    See https://codex.www.ads-software.com/Forum_Welcome#Where_To_Post

    Thanks!

    – Cais.

    Plugin Contributor photocrati

    (@photocrati)

    @anotherdave – You should have received a response from your Bug Report this morning … let’s keep the conversation there for the time being so we are not splintering the troubleshooting across multiple venues.

    Thanks!

    – Cais.

    Thread Starter anotherdave

    (@anotherdave)

    Thank you Cais!

    I do know of some friends and colleagues whom are watching this thread instead of creating new / redundant versions of it, so I’m just going to post this update here for their benefit.

    I received your Bug Report response along with the modified package.module.nextgen_data.php file to upload to ../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data

    I’ve tested everything thoroughly after uploading it.

      Here’s what it fixed for me in regard to only the issues I’ve encountered with NGG:

    1. The warning – “PHP Warning: getimagesize(1): failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/hdwp/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php on line 656” – is gone now when uploading images.

    2. When I go to Dashboard > Gallery > Manage Galleries and click on a gallery, then select all images within it, then use the drop-down Delete option, it does actually remove the images (but not the folders) from the server and also proportionally changes the number of Images listed at Dashboard > Gallery > Overview

    3. When I go to Dashboard > Gallery > Manage Galleries and select a gallery and then delete it, it does actually proportionally change the number of Galleries listed at Dashboard > Gallery > Overview (but does not remove the related folders from the server)

      Here’s what it does not fix:

    1. When I go to Dashboard > Gallery > Manage Galleries and select a gallery and then delete it, it does not remove image files from the server (as you mentioned you’re already aware of, and there is not yet a fix for)

    2. None of the delete functions remove the related gallery folders (such as the individual gallery folders and the sub-folders /thumbs and /dynamic) from the server.

      Here’s something strange / new that I noticed:

    1. NGG now creates a folder named “dynamic” in the main folder where WordPress installed, instead of just in the individual /wp-content/gallery/galleryname/ folders. (Not sure if it’s meant to do that now,

      but it seems very odd

    that any plugin like this would create a new folder right in the root of the WordPress install rather than just within the plugin’s related folders themselves in wp-content).

    Thanks again for your reply and the modified file and your help!

    I’ll keep an eye out for updated versions to see if the remaining issues are resolved and will update this thread for the benefit of my friends whom are following it.

    Plugin Contributor photocrati

    (@photocrati)

    @anotherdave – If others are having any issues with NextGEN Gallery they would be much better served by their own topic of their own Bug Report, but thanks for sharing your findings all the same.

    – Cais.

    You’re not alone. I have the exact same problem. If I delete a gallery, the images are not deleted even though I have the “delete images” option set to yes. The gallery is gone but images now remain “orphaned” since they are no longer associated with a gallery and there is no way to delete them.

    If you go to Gallery->Overview the number of images that were supposed to be deleted still show up in the total image count (and in the supposed to be deleted gallery folder.) But again, there is no way to get to them.

    WP 4.4.2
    NG 2.1.0
    NG Pro 2.1.4

    This happens both on my production cloud server (Linux) and on a PC staging server running WAMP.

    Plugin Contributor photocrati

    (@photocrati)

    @avpman – We are still working on this issue. Thanks!

    – Cais.

    I just want to confirm that I have the exact same issue. Thanks Dave for posting. I also have the “delete images” option set to yes.
    Unfortunately the only way I found out was when the allocated disk space filled up and email stopped working.
    I have to delete the obsolete galleries via FTP for now but I hope that doesn’t cause any issues with the plugin.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘NGG does not remove image files from server when delete gallery’ is closed to new replies.