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
Currently, relational fields' element selector modals always display a site selector in multi-site Craft installs (unless the field is configured to only relate elements from a specific site). In most cases, this results in behaviour that is very confusing to end users/content editors.
The site selector in element selector modals implies to content editors that it's possible to create cross-site relations (e.g. to create a link to an entry in a different site). However, because the craft_relations table doesn't keep track of the target elements' site, the only scenario where this actually works as expected, is when
a) the target element is in a non-propagating source and
b) the necessary element query params (i.e. site, unique and preferSites) have been added to the frontend code.
In all other scenarios, the behaviour when selecting elements from a different site is very confusing – the frontend will either display the related elements from the current site (for propagating sources) or no elements (for non-propagating sources). The CP will either display the related elements from the site they were selected from (for non-propagating sources) or – after saving the source element – from the source element's site (for propagating sections).
Since the use case for the site selector is so specific and marginal, and having the site selector available is so confusing in all other cases, I suggest that the site selector should be hidden by default, with the option to have it available added to relational fields' settings.
Steps to reproduce
Additional info
Craft version: 3.4.11
PHP version:
Database driver & version:
Plugins & versions:
The text was updated successfully, but these errors were encountered:
mmikkel
changed the title
[FR] Relation field setting for hiding/showing the site selector dropdown in element selector modals
[FR] Relational field setting for hiding/showing the site selector dropdown in element selector modals
Mar 31, 2020
Just added a new “Show the site menu” setting to relational fields, under Advanced. (Will only show up when the “Relate elements from a specific site?” setting is disabled.)
I agree that generally the site menu will just lead to confusion, so this new setting is disabled for new fields going forward, but enabled by default for existing fields.
Description
Currently, relational fields' element selector modals always display a site selector in multi-site Craft installs (unless the field is configured to only relate elements from a specific site). In most cases, this results in behaviour that is very confusing to end users/content editors.
The site selector in element selector modals implies to content editors that it's possible to create cross-site relations (e.g. to create a link to an entry in a different site). However, because the
craft_relations
table doesn't keep track of the target elements' site, the only scenario where this actually works as expected, is whena) the target element is in a non-propagating source and
b) the necessary element query params (i.e.
site
,unique
andpreferSites
) have been added to the frontend code.In all other scenarios, the behaviour when selecting elements from a different site is very confusing – the frontend will either display the related elements from the current site (for propagating sources) or no elements (for non-propagating sources). The CP will either display the related elements from the site they were selected from (for non-propagating sources) or – after saving the source element – from the source element's site (for propagating sections).
Since the use case for the site selector is so specific and marginal, and having the site selector available is so confusing in all other cases, I suggest that the site selector should be hidden by default, with the option to have it available added to relational fields' settings.
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: