- Issue created by @yospyn
- First commit to issue fork.
- Merge request !41Issue #3347244 by jonraedeke, timwood, KurtTrowbridge, alexb7217: Select... β (Open) created by andileco
- πΊπΈUnited States andileco
@yospyn, please try this MR. Make sure to clear your cache (including browser cache so the updated JS file loads). For me, this works on a Bootstrap Barrio-based subtheme and continues to work with Claro. Please let me know if the same goes for you.
The failed code quality tests shown in the MR pipelines are from the existing codebase and are not related to my patch.
- Merge request !42Issue #3347244 by jonraedeke, timwood, KurtTrowbridge, alexb7217: Select... β (Open) created by andileco
- πΊπΈUnited States andileco
andileco β changed the visibility of the branch 3543115-select-parents-automatically to hidden.
- πΊπΈUnited States andileco
For some reason, GitLab wanted to apply my patch to the 8.x branch versus the 2.x branch. The MR that's showing now is the one to use.
- πΊπΈUnited States yospyn
@andileco 42.patch worked for me, "Select parents automatically" function works now in both Claro and BS5. Thank you!
- π³π¬Nigeria chike Nigeria
I do not understand this issue.
To set "Select parents automatically" one has to be an admin as it has to be set on the form display widget and which will require an admin working with the admin theme unless the users were given the role to administer the content type. If they were given the role to administer the content type I wouldn't understand why they will use a front end Bootstrap 5 theme to work on the admin backend instead of all the wonderful options available for an admin theme.
I am using Barrio Bootstrap 5 theme for the front end and Gin as admin theme and I do not see this issue. The only behaviour I see which should be more like a feature request, is that for one to set "Select parents automatically" on the form display, the cardinality of the field has to be unlimited. If not unlimited, one cannot set "Select parents automatically" on the field. In our case we are using a location field which we want users to set their state and city and not more than one city and its state. We want 'Leaves only' setting meaning users will only select city and the state will be auto selected. If we set the field to unlimited to be able to set "Select parents automatically", then users can abuse the field by setting multiple cities and state and if we limit field to accept 2 values we will not be able to set "Select parents automatically". This should qualify as a separate 'feature request' issue.
How I got around this was: I set cardinality to unlimited then set "Leaves only" and "Select parents automatically", then I went back to change cardinality to 2. This way I sneaked in "Select parents automatically" with a limited cardinality.
- πΊπΈUnited States andileco
Hi @chike! For our use-case, we do have some user roles who create and edit certain types of nodes, and it's a less disruptive user experience if they are not switched between an admin and front-end theme. I believe this patch will work with Claro, Gin, and Bootstrap, as it uses a more generic selector. So, it might be worth it for the maintainers to incorporate.
- π³π¬Nigeria chike Nigeria
Hi @andileco I think I understand better now. The issue you are having (unlike in my case) is not in setting widget to "Select parents automatically" but in actually creating the nodes.