L'aperçu du thème ne fonctionne pas si le thème n'a pas été modifié et enregistré

Je ne sais pas si c’est ainsi que cela devrait fonctionner (mais cela semble étrange) ou si cela ne fonctionne tout simplement pas correctement.

Si j’ai un thème non activé qui ne fait pas partie d’autres thèmes actifs, le bouton Aperçu ne fonctionne pas, ou plutôt, il fonctionne mais ouvre le site comme d’habitude, sans me permettre de voir l’aperçu de cette feuille de style.


J’ai également essayé avec des feuilles de style utilisées comme composants d’autres thèmes (actifs), mais le résultat est le même.

Ensuite, si je vais sur la feuille de style et que je clique sur « Aperçu » sans rien modifier, comme décrit précédemment, le site se charge normalement, sans afficher uniquement l’aperçu.

Pour des raisons pratiques, le bouton Aperçu ne sert à rien pour le moment.

L’aperçu ne fonctionne que si je modifie quelque chose, que je clique sur Enregistrer, puis sur le bouton Aperçu.

Ensuite, je voudrais savoir : comment partagez-vous l’aperçu avec d’autres personnes ?
Je me retrouve souvent dans la situation où je dois montrer un travail en cours pour décider avec mon équipe de la suite à donner.
J’ai d’abord partagé le lien de l’aperçu avec eux, mais maintenant que le lien de l’aperçu n’est plus disponible, je dois faire beaucoup de captures d’écran, et souvent elles ne suffisent pas à expliquer les modifications apportées, car elles ne peuvent pas les voir en « action ».

3 « J'aime »

I believe @sam plans to do more work in this area soon but it may be a month or two out.

1 « J'aime »

Wonderful :star_struck:

EDIT: (sorry for the two-time response, I was in the middle of a cat VS dog war…)

Do you mean that in addition to the existing functions he might consider adding extra functionality?

The big 2 pieces of functionality missing are

  1. Discovery of themes
  2. User selectable theme components

(2) is on my definite roadmap, (1) needs fleshing out.

3 « J'aime »

Thanks for posting about this issue.

I installed and customised a theme last night and it was going well. When I hit PREVIEW it displayed the theme as I expected. But, this morning when I tried to preview it again, suddenly the unchanged CSS wasn’t being previewed at all. I couldn’t understand why it stopped working.

After reading your post above, I tried adding a blank space anywhere in the theme’s CSS, then clicked SAVE. And BOOM, suddenly the preview button works again, just like you said above.

This is a bug. And as you mentioned, it makes it harder to show the theme to others, without explaining the need to do a pointless save first.

I just ran into this as well. It makes it hard to test and build a theme behind the scenes. This should probably be fixed since it is not working as expected by the user.

It would also be nice to be able to make themes available to either Mods or Admins in addition to users. Let’s say we are working on a special Holiday Theme and do not want to show it or make it available right away.

I am having trouble reproducing this, is the problem theme on your site? I tried to repro the issue in dev and was unable to get this cache poisoning problem.

Right now if I go to a specific theme that is not selectable by users (ex /admin/customize/themes/47) and click on “Preview” the preview does not change the theme. If I then go in change anything (ex Color Scheme or theme name etc…) then it will Preview properly.

Just testing it again right now and it is happening to me.

6 « J'aime »

OH my, what a giant bug,

Fixed per:

https://github.com/discourse/discourse/commit/6f076963f2c1cc419f8be8af901e6b7c111f99d2

Will get it deployed to you @Sean_R shortly.

10 « J'aime »

This topic was automatically closed after 2 days. New replies are no longer allowed.