Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Relational field setting for hiding/showing the site selector dropdown in element selector modals #5864

Closed
mmikkel opened this issue Mar 31, 2020 · 1 comment
Labels
authoring ✍️ features related to author experience enhancement improvements to existing features
Milestone

Comments

@mmikkel
Copy link
Contributor

mmikkel commented Mar 31, 2020

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 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:
@mmikkel 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
@brandonkelly brandonkelly added authoring ✍️ features related to author experience content modeling 📓 features related to content modeling enhancement improvements to existing features labels Mar 31, 2020
@brandonkelly brandonkelly added this to the 3.5 milestone Mar 31, 2020
@brandonkelly brandonkelly removed the content modeling 📓 features related to content modeling label Jul 13, 2020
brandonkelly added a commit that referenced this issue Jul 20, 2020
@brandonkelly
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authoring ✍️ features related to author experience enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

2 participants