-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add term support for entity_reference_view_endpoints #646
Conversation
Any sense of when we could get this merged, @mjordan? I'd like to get our staff off my fork so they can get the newest updates. |
@seth-shaw-asu thanks for resurrecting this, I'm sorry to let it drop. I'll review ASAP. |
Got this all configured and it works (only
This is valid YAML but it other workbench config settings like this (e.g. CSV field templates) use a different format:
Any reason you chose to use the |
For the config, it made getting the endpoint quicker. Right now I can access the URI by simply doing As for |
I'm concerned that the difference in formatting of the config block is going to cause confustion, but I guess some clear docs will mitigate against that. |
@mjordan , I updated the code to use the |
As usual, this is awesome and relieves a major UX glitch in Workbench. Thanks! |
Using terms that are not in the linked vocabulary, with In
In
One thing that might be problematic is that unless there is a way to programatically check which vocabulary/vocabularies are used in the View, we may need to require the vocab ID in the config. Otherwise, a user could include the wrong namespace in the CSV value and Drupal would not create the node. I'm OK with merging as is so people can at least use term names or URIs in their CSV and get the rest working later. Any objections? I can then update the docs. |
I would appreciate it. Yes, it doesn't work exactly like the ordinary linked vocabs, but I think you can agree that once a site decides to use "Filter by an entity reference View" they need to account for the realities of that option. |
I totally agree, they are a royal PITA. I'll merge this evening and document. Thanks again for working on this. |
Link to Github issue or other discussion
#642
What does this PR do?
Uses the configured endpoints for term lookups.
What changes were made?
How to test / verify this PR?
Set up entity_reference_view_endpoints in your config file, e.g.
See #452 (comment)
Perform a create or update action with fields with and without the term vocabulary that do and don't exist and see the appropriate log messages appear.
E.g.
Interested Parties
@mjordan
Checklist
pycodestyle --show-source --show-pep8 --ignore=E402,W504 --max-line-length=200 yourfile.py
?setup.py
?