Non capisco se sia così che dovrebbe funzionare (ma sembra strano) o se semplicemente non funzioni bene.
Se ho un tema non abilitato e che non è un componente di altri temi attivi, il pulsante “Anteprima” non funziona, o meglio, funziona ma apre il sito come sempre, senza permettermi di vedere l’anteprima di quel foglio di stile.
Ho provato anche con fogli di stile utilizzati come componenti di altri temi (attivi), ma il risultato è lo stesso.
Poi, se vado al foglio di stile e faccio clic su «Anteprima» senza modificare nulla, esattamente come descritto prima, il sito viene caricato normalmente, senza mostrare solo l’anteprima.
Per scopi pratici, il pulsante «Anteprima» non serve a nulla al momento.
L’anteprima funziona solo se modifico qualcosa, faccio clic su Salva e poi sul pulsante «Anteprima».
Quindi volevo sapere: come condividete l’anteprima con altre persone?
Mi trovo spesso nella situazione di dover mostrare un lavoro in corso per decidere con il mio team come procedere.
Inizialmente ho condiviso il link dell’anteprima con loro, ma ora che il link dell’anteprima non è più disponibile devo fare molti screenshot e spesso non sono sufficienti per spiegare le modifiche apportate, perché non possono vederle «in azione».
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.