Cms: In live preview {{ site:handle }} returns the wrong locale

Created on 2 Dec 2020  路  1Comment  路  Source: statamic/cms

Bug Description

I'm using {{ site:handle }} in my template and in Live Preview mode it returns the wrong locale. Probably the default?

How to Reproduce

  1. Use multisite
  2. Use {{ site:handle }} in your template
  3. Visit the frontend: you'll get back the correct handle.
  4. Visit the entry from live preview: you get the wrong handle.

Extra Detail

On the english CP page here:
Screenshot 2020-12-02 at 20 52 07

Watching {{ site | dd }} using Live preview:
Screenshot 2020-12-02 at 20 53 08

Environment

Statamic 3.0.32 Pro
Laravel 8.17.0
PHP 7.4.10
edalzell/forma 0.7.2
jonassiewertsen/statamic-livewire 2.2.0
silentz/mailchimp 2.4.1

Install method (choose one):

  • Starter kit
bug live preview multisite

Most helpful comment

I can confirm this issue. The Live Preview always returns the site handle of the default site rather than the one of the selected site.

>All comments

I can confirm this issue. The Live Preview always returns the site handle of the default site rather than the one of the selected site.

Was this page helpful?
0 / 5 - 0 ratings