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

HUD modal only showing single source and not pre-selecting on first trigger #3227

Closed
davist11 opened this issue Aug 22, 2018 · 4 comments
Closed

Comments

@davist11
Copy link
Contributor

davist11 commented Aug 22, 2018

Description

We have an Entries field that is related to multiple sections (across multiple sites), and also managed on a per site basis. When I click to add an entry the first time, I see the following:

screen shot 2018-08-22 at 9 49 45 am

The left sidebar seems unnecessary, and the section isn't pre-selected. If I click the section in the left sidebar, leave that entry, and then come back to it later in the session, clicking add entry now pre-selects the section:

screen shot 2018-08-22 at 9 47 58 am

Steps to reproduce

  1. Create 2 different sites
  2. Create 1 section in each of those sites
  3. Create an entries field and select the 2 sections created
  4. Make the field managed on a per site basis
  5. Visit an entry with the field on it and click add an entry

Additional info

  • Craft version: Craft Pro 3.0.19
  • PHP version: 7.0.30
  • Database driver & version: MySQL 5.7.23
  • Plugins & versions:
Algolia 1.0.1
Amazon S3 1.0.8
Asset Rev 6.0.1
AsyncQueue 1.3.3
Audit 2.0.1
Automatic Site Switch 1.0.1
Calendar 2.0.5
Category Utilities 1.0.0
Certificates 1.0.0
Converge 1.0.0
Craft Commerce dev-develop
Enupal Snapshot 1.0.4
Environment Label 3.1.4
Feed Me 3.0.0-beta.17
Field Manager 2.0.2
Flat Categories 2.0.0
Forms 2.2.2
Freeform Pro 2.2.2
Geo Cookie 1.2.1
Hamilton Utility 1.0.0
Importer 1.0.0
Inlin 2.0.0
Inventory 1.0.0
OrderExporter 1.0.0
Redactor 2.1.5
Sidebar Toggle 2.0.0
SimpleSentry 1.0.0
Super Table 2.0.7
Taxes 1.0.0
Twig Perversion 2.0.4
@brandonkelly
Copy link
Member

Are the sections that aren’t visible enabled for the current site?

@davist11
Copy link
Contributor Author

No, they are only enabled in their individual sites. For example, we have 5 sites:

  1. Automated Liquid Handling
  2. Automated Sample Management
  3. Laboratory
  4. Process Analytics
  5. OEM

And 5 sections:

  1. Automated Liquid Handling Case Studies
  2. Automated Sample Management Case Studies
  3. Laboratory Case Studies
  4. Process Analytics Case Studies
  5. OEM Case Studies

Those sections are only enabled in their respective sites.

And then, we have a Case Studies (entries) field with the following settings:

  • Managed on a per site basis
  • Sources:
    1. Automated Liquid Handling Case Studies
    2. Automated Sample Management Case Studies
    3. Laboratory Case Studies
    4. Process Analytics Case Studies
    5. OEM Case Studies

@brandonkelly
Copy link
Member

Hm, ok. In that case it seems like it is mostly behaving as expected.

  • The sidebar is visible because the field is configured with multiple sources.
  • The sidebar only shows one section because the other 4 get filtered out due to not being relevant for the current site.

I don’t think that just because only a single source ends up being visible, that the field should actually remove the sidebar (like it would on a field that is only configured for a single source) – because Craft doesn’t know that the author is expecting a single source. For all it knows, the field’s name & instruction text are written assuming that multiple sources would be visible, and it won’t be clear which source is selected if the sidebar isn’t shown.

So the only awkward thing here is that the one source doesn’t get selected automatically.

@davist11
Copy link
Contributor Author

👍 that makes sense. If the single source could be pre-selected, I think it would help reduce the confusion that we've seen some clients have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants