WordPress.org

Forums

NextGEN Gallery
[resolved] Uninstall/Reinstall NextGen Gallery --? (14 posts)

  1. kifiko
    Member
    Posted 1 year ago #

    Is it possible to uninstall/delete and then reinstall NGG without losing my existing galleries?

    Basically i think i have farted around too much and the plugin is not working correctly. It looks like all the galleries are in wp-content/gallery/. Is that correct?
    If I back up that directory, inactivate/delete NGG and then reinstall it and copy the directory back, will I be good to go?

    I really appreciate any advice you can offer me.

    Kathie

    https://wordpress.org/plugins/nextgen-gallery/

  2. tizz
    Member
    Posted 1 year ago #

    @kifiko what you want to do don't hurt but it's useless. Removing gallery folder as it is and then upload it as it is don't change nothing.
    Maybe it can be more productive upload a fresh folder of NextGEN overwriting it via FTP, although looking at your previous topic I have some doubts, but it's not harmful.
    If your issue is the same as in your previous topic, it would be better for you stand there to avoid loss of information or confusion.
    I read that you've already done the troubleshooting and this hasn't brought results, but sometimes this process isn't done correctly and with attention and can go negative.

  3. ph_remy
    Member
    Posted 1 year ago #

    Hello, Kathie,

    Backing up the galleries folder is not likely to help much. NextGen Gallery uses custom tables, custom post types and options to store information about galleries and images. When you uninstall you are very likely to lose all that information. So, the picture files for your galleries will still exist, but what "makes" the galleries (linking picture together in a gallery, settings for your galleries,...) will have disappeared.

    Also of interest, see this post which very specifically says you will lose all date when uninstalling NextGen Gallery (if using version 2.0).

  4. kifiko
    Member
    Posted 1 year ago #

    Thanks for your helpful reply, ph_remy. I will definitely not be trying the uninstall/reinstall method!

    I have tried all suggestions I could find, including inactivating all plugins and reverting to 2012 theme with no luck.

    If anyone has found a solution to the problem with being able to add to or display existing galleries, please let me know!

    Kathie

  5. leksticks
    Member
    Posted 1 year ago #

    I did exactly the same thing you did not too long ago. I messed about and all my plugins didn't work. I uninstalled and reinstalled Nextgen just fine, I still had all my galleries intact.

  6. ph_remy
    Member
    Posted 1 year ago #

    Hi, Kathie,

    Having spent the last couple of days debugging NextGen, I believe the problem to be located in the source file, in wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_installer.php.

    One question: when you go to the "Gallery Settings" page, on the dashboard, do you also see a blank page? If so, what the problem "might" be is that the "display types" posts have been wiped out for whatever reason. If that is the problem, then NextGen must be told to re-create these lost posts.

    In the "update" method of the above file, one of the parameters is $reset, which, by default, is set to FALSE. You need to make the method run with $rest set to TRUE. Unfortunately, I have not seen anywhere in the code where you can trigger the method with that TRUE value.

    What you can do, if you have "edit" access to the source files on your web host is to make a manual change in the "update" method.

    What I would suggest is the following:
    - first and foremost, backup your site (!)
    - then copy the original wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_installer.php file "somewhere" safe (a directory outside of your document root would do)
    - in the wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_installer.php file, locate the line of code (should be line number 122 or there about) that says: $last_module_list = self::_get_last_module_list($reset);
    - Just before that line, include a line that says $reset = TRUE;
    - Then deactivate and reactivate NextGen Gallery
    - Reinstate the original version of the wp-content/plugins/nextgen-gallery/non_pope/class.photocrati_installer.php file from where you copied it.

    In theory, this should trigger the NextGen installer to recreate the Display Types posts (which is the info that is shown on both the Attach to Post dialog as well as on the Settings page).

    Hope this does help.

  7. ph_remy
    Member
    Posted 1 year ago #

    Actually, if you have access to the database, do a select on the "posts" table:

    select * from db_prefixposts where post_type = 'display_type';

    where you replace db_prefix with the prefix you used when you installed wordpress (default is "wp_", so, if you did not change it, your posts table will be called wp_posts).

    This should return at least 7 rows (NexGen ships with 7 Display Types out of the box). If it does not, then your issue is definitely that the Display Type posts have been wiped out, and they need to be recreated.

  8. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @ph_remy - Thank you very much for you help here, it's much appreciated.

    I can also confirm @leksticks remarks about uninstalling and re-installing NextGEN Gallery (I just tested, again, on a random test site) should not create any issues in and of itself although I would always recommend having a full verified backup when troubleshooting to that magnitude ... just in case.

    Thanks!

    - Cais.

  9. ph_remy
    Member
    Posted 1 year ago #

    @Cais - Is this post obsolete, then?

    Also, in this case it may help that it does not happen, but isn't one of the wordpress plugin development rules that the uninstall script should actually remove all data related to the plugin (including custom tables like ngg_album, ngg_gallery, ngg_pictures, options, as well as posts with custom post types)?

  10. kifiko
    Member
    Posted 1 year ago #

    Ah, ph_remy. My wordpress_posts has exactly 7 rows with post_type = 'display_type'.

    I was so hopeful that your fix would be my answer. Thank you so much for taking the time to provide such a detailed answer. Hopefully it will help someone else in the future.

    And now - off to uninstall/reinstall ...?!

    Does anyone else have anything further to contribute?

    gratefully,
    Kathie

  11. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    @ph_remy - The topic you are referring to was a "sticky" topic for quite some time but yes, it no longer applies and was the reason I chose to un-stick it a couple of weeks ago.

    As to the expectation of everything being removed with the final "Delete all" action, we stopped that due to the over-whelming issues of people losing all of their images and felt in most cases that it would be best (if temporary) to not remove that data as many of these same users were re-installing NextGEN Gallery and not understanding why all of their images were gone.

    - Cais.

  12. tizz
    Member
    Posted 1 year ago #

    @ph_remy You're right, but I haven't yet meet a plugin that, deleted via dashboard, takes away all of his stuff. In fact, very few are equipped with an uninstall.php.

  13. kifiko
    Member
    Posted 1 year ago #

    Wow. I have zero idea how, but my problem has resolved itself. Kinda nice to be able to move on to other issues, but baffling all the same!

    Thanks a huge bit to all who weighed in on this topic.

    Kathie

  14. ph_remy
    Member
    Posted 1 year ago #

    @Kathie - Well, was worth a try.

    Could be corrupt data in these display type posts, or could be the "global options" missing, or multisite (if you are using multisite). The code seems to suggest that the multisite activation is a bit of a hack: there is a comment in the code to the effect that

    This is a specific hack/work-around/fix and can probably be removed sometime after 2.0.20's release. NextGen 2x was not multisite compatible until 2.0.18
    .

    In any case, best of luck with the uninstall/reinstall (with a backup first...).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic