You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating/editing an entry, I need to know the currently active site to compute a value in a custom fieldtype.
I found the selected site's handle to be stored in this.$store.state.publish.base.site. The value, however, is only set when editing an existing entry. It is undefined when creating a new entry.
Maybe there's another way to get the currently selected site, that I didn't figure out yet?
How to Reproduce
Create a new entry and check Vuex store at state.publish.base.site. The value will be undefined.
Save the entry and check the value again. It will be the currently selected site.
Extra Detail
Creating a new entry:
Editing an existing entry:
Environment
Statamic version: 3.0.0-beta.43
PHP version: 7.4.6
Install method: Fresh install from statamic/statamic
The text was updated successfully, but these errors were encountered:
Bug Description
When creating/editing an entry, I need to know the currently active site to compute a value in a custom fieldtype.
I found the selected site's handle to be stored in
this.$store.state.publish.base.site
. The value, however, is only set when editing an existing entry. It isundefined
when creating a new entry.Maybe there's another way to get the currently selected site, that I didn't figure out yet?
How to Reproduce
state.publish.base.site
. The value will beundefined
.Extra Detail
Creating a new entry:
Editing an existing entry:
Environment
Statamic version: 3.0.0-beta.43
PHP version: 7.4.6
Install method: Fresh install from
statamic/statamic
The text was updated successfully, but these errors were encountered: