テーマを編集して保存していない場合、テーマプレビューが機能しません

それが仕様なのか(しかし奇妙に思えます)、あるいは単に正しく動作していないのか、理解できません。

有効化されていないテーマがあり、かつ他の有効なテーマのコンポーネントでもない場合、プレビューボタンは機能しません。あるいは、機能はするものの、いつも通りサイトが開かれてしまい、そのスタイルシートのプレビューを表示してくれません。


他の(有効な)テーマのコンポーネントとして使用されているスタイルシートでも試してみましたが、結果は同じでした。

その後、スタイルシートに移動し、何も編集せずに「プレビュー」をクリックすると(前述の通り)、サイトは通常通り読み込まれ、プレビューのみが表示されることはありません。


実用的には、現状ではプレビューボタンは何の役にも立っていません。

プレビューが機能するのは、何か変更を加えて保存し、その後にプレビューボタンをクリックした場合のみです。

そこで質問ですが、プレビューを他の人と共有するにはどうすればよいのでしょうか?
私はしばしば、チームと今後の進め方を決定するために、進行中の作業を見せなければならない状況に直面します。
最初はプレビューリンクを共有していたのですが、現在ではプレビューリンクが利用できなくなったため、多くのスクリーンショットを撮らなければならず、しかもそれだけでは変更点を説明しきれないことがよくあります。なぜなら、相手がそれらを「実際に動作している状態」で見ることができないからです。

「いいね!」 3

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

「いいね!」 1

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

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

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

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