Bootstrap theme keeps resetting on update

Wappler Version : 3.9.6
Operating System : Mac Big Sur (M1)
Server Model: PHP
Database Type: MySQL
Hosting Type: AWS Docker

When a Wappler update is installed, the published theme CSS resets to the default Bootstrap theme. I have to click the ‘Quickly Regenerate Design Theme’ button to re-apply the theme colours I have chosen before publishing. Unless I do so, they are correct in theme manager but it seems the published CSS is reset to defaults. This can easily cause incorrect styles to be applied to production targets!

I’ve found similar issues with this and they’ve been there since the theme manager was introduced. I’ve noticed that if I return to a site I’ve not edited in a while, as soon as I open a page in Wappler, the theme reverts back to default. I have to go into the theme manager and click the rocket icon and upload the theme to fix it. It’s become a habit but would love it to be fixed.

If this is a separate issue then please move this to a new thread. However, I suspect it’s the same thing.

[Edit] It’s when I save for the first time after going back to a project I’ve not worked on for a little while, not when I open it, that the theme reverts back to the original.

1 Like

I’ve also encountered this issue multiple times. I save any kind of file in the project and the theme goes back to default and overwrites the styles on the site.

1 Like

This also happens to me.

1 Like

Yep. Theme manager resets after update

1 Like

Same to me. Reported previously as a bug, too.

1 Like

Overwriting custom themes has happened to me several times - before and after Theme Manager was introduced. However, it hasn’t happened to me for quite a while and I had decided it was no longer a problem. I wonder exactly what triggers it, but hasn’t triggered it in my case.

Is it on every update or particuarly if there is a Bootstrap version change? I always upgrade Wappler rather than do a complete reinstall. I use most Windows most of the time. I’ve never understood quite what the buttons at the top of Theme Manager do - perhaps I’ve avoided clicking a button which causes a problem.

1 Like

I’m afraid this is still an issue. Every time I save a file after updating Wappler the Bootstrap theme reverts back to default and I have to go back into the theme editor and click the rocket icon to get my changes back.

Yeah, it’s a little annoyance I learned to just live with. No idea what changes as I see no difference in the actual files.

Same here. But I have some projects where my changes automatically update on the live server as I save (the target is the live site) and it’s caught me out a few times where the site suddenly goes back to the default theme and it’s not good. Plus it updates the local theme files when I click the rocket icon which then means another git commit just to put what must be the same files into github again.

Have expreienced this as well.
But thanks to Git, I can just discard the new changes, and the design goes back to as it was.

@sitestreet You should change the environment for target in your project to production to avoid auto-upload. Change it to dev, when you are actively working and actually want to auto-upload. For rest of the times, I would suggest prod option.

Yep, that works for me sometimes but not always.

I do that on some projects but others are deliberately set up to auto-upload. I love the flexibility where we have the choice of dev, staging or production and the behaviour of those. Where auto-uploading is what I want, the jumping to default bootstrap styling is quite frustrating.

1 Like

Hmm normally the original bootstrap theme is only copied if it is newer than the generated theme. A file date comparison is done.

Is that the case?

But agree that we should improve this by always using the custom theme if once generated.

1 Like

Aah, that makes sense. If the original theme has a newer datestamp because of the Wappler update then that would be causing it.

If you can let the custom theme override it if it’s set then that would sort it.

Most likely.

Wouldn’t generating from the theme manager again use the newer BS5 file and apply the custom theme as well?

This is still an issue with the latest version I’m afraid.

1 Like

It would be good if this bug were fixed. It’s potentially somewhat catastrophic. I make my Bootstrap CSS files read-only, which is a sort of solution but not very convenient.

You can just use git :slight_smile: until this is improved.

I don’t use git properly - I just use it as an extra backup. I know I should. In any case, it shouldn’t be so easy to inadvertently destroy a website (visually at least).