Title: Bug when changing themes
Last modified: August 31, 2016

---

# Bug when changing themes

 *  Resolved [Pierre_02](https://wordpress.org/support/users/pierre_02/)
 * (@pierre_02)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/bug-when-changing-themes/)
 * Hi Scott 🙂 !
 * you’ll curse me :)… I’ve found a bug in Simply Static.
    Apparently, to optimize
   the generation process, you keep a “log” of the last parseed file in the table“
   wp_simply_static_pages”. The problem is that if a user change its theme you’re
   gone send the old themes files (and all their dependencies) AND the new ones :).
   So the destination directory will grow again and again and the genaration process
   will takes more and more time.
 * Could you have a look, please ?
 * TIA,
 * Amicably,
 * Pierre.
 * [https://wordpress.org/plugins/simply-static/](https://wordpress.org/plugins/simply-static/)

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

 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/bug-when-changing-themes/#post-7287663)
 * It’s true. If Simply Static has found any pages or files previously it will keep
   trying to fetch them on subsequent attempts. This is mainly to support future
   functionality, where Simply Static can compare the content on the current page
   vs. the last time and figure out if it needs to do any further processing.
 * Maybe I need to add some kind of checkbox when initiating the process where it’ll
   start from scratch and ignore what it’d done previously. I’ll think on it.
 * In any case, one way around this is to remove the theme from your WordPress installation.
   If Simply Static can’t find the files, it won’t include them in the static archive
   🙂
 *  Thread Starter [Pierre_02](https://wordpress.org/support/users/pierre_02/)
 * (@pierre_02)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/bug-when-changing-themes/#post-7287701)
 * Ok, i’ve worked recently on themes in my functions and there’s a really easy 
   way to get the actual used theme by : `get_stylesheet();`. This will give you
   the “slug name” (short name) of the theme.
 * So, if it’s the first time the user click on “Generate” you store the value of`
   get_stylesheet();` in the array of settings of `simply_static` in wp_options 
   table and every other time, you do a `get_stylesheet();`, compare it with the
   one you’ve stored before and if it has changed you applied the required process
   😉 ?
    BTW, no need for users to remove theme(s) from WP and a cleaner method 
   to apply change 🙂 !
 * TIA,
 * Pierre.

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

The topic ‘Bug when changing themes’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pierre_02](https://wordpress.org/support/users/pierre_02/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/bug-when-changing-themes/#post-7287701)
 * Status: resolved