Home Forums Newsletter Plugin Support stop deleting my theme

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #161531
    Jenny Scott
    Participant

    Annoyingly, it seems that every time the plugin (specifically the automated) is updated, my theme is deleted. I have backups of course, but it means my newsletter doesn’t get sent and I have to manually upload and reset the theme for the newsletter to go out.

    How can this be prevented in the future?

    #161584
    Stefano
    Keymaster

    Hi, it’s not the plugin deleting your theme is wordpress deleting a plugin folder before updating it. Custom theme should be placed in a different folder, see the themes documentation in this site.

    Thank you, Stefano.

    #161707
    Jenny Scott
    Participant

    Hi,

    I read the documentation and don’t quite understand what I’m doing wrong. I put my theme in a new directory here:

    \wp-content\plugins\newsletter-automated\themes\mytheme\

    And it’s this that gets deleted. Should this go in the main theme folder or somewhere else?

    #162626
    darlie Kwok
    Participant

    I’m facing the same problem. My custom theme for automatic email is deleted every time when I update the plugin. Is there a way to avoid this? Where should I put my theme?

    #163388
    Michael Busch
    Participant

    Hi Jenny

    This is the crucial part from the themes documentation:

    Just to explain what this is, I’ll use an example based on the ‘Newsletters’ Module. When Newsletter looks for themes for ‘Newsletters’ Module, it first searches themes inside the natural theme folder, wp-content/plugins/newsletter/emails/themes. Then it scans a second folder at wp-content/extensions/newsletter/emails/themes. The folder wp-content/extensions/newsletter is a parallel version of the original plugin folder, and Newsletter treats both folders as if they were only one folder, by merging the contents of both folders together.

    Basically you need to create a folder wp-content/extensions/newsletter/emails/themes and put your theme there…

    The reason, as Stefano mentioned, is that WordPress Updates work like this: The complete Plugin folder is deleted and replaced with the content of the updated plugin. This is general WordPress behaviour and not specific to the newsletter plugin. Any plugin that saves data in a subfolder of the plugin folder will face the same problem.

    Mike

    #163442
    Jenny Scott
    Participant

    I think I might be missing something here – I still don’t get it. If I put my theme ANYWHERE in the plugin folder, when that plugin is updated the theme will be deleted whenever WP updates that plugin.

    Surely it would be best if the theme could be placed in the /child-theme/ folder somewhere so that it’s never deleted by WP?

    #163455
    Michael Busch
    Participant

    Hi Jenny

    Yes you are missing something here: wp-content/extensions/newsletter/ is a folder that is NOT in the plugin’s folder… The plugin is placed below /wp-content/plugins and not extensions…
    So any theme that is saved under extensions will not be deleted when the plugin is updated…

    Mike

    #163899
    Jenny Scott
    Participant

    Hi – thanks for that Michael. I guess I the /extensions/ directory threw me. (It’s been one of those weeks!)

    It appears to be working fine now 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.