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

Workbench fails silently when encountering an entity reference view field #840

Open
rosiel opened this issue Oct 29, 2024 · 0 comments
Open

Comments

@rosiel
Copy link
Contributor

rosiel commented Oct 29, 2024

I have a taxonomy reference field and workbench was failing to create new terms. It turns out the problem was that it was using an enity reference view, but I had forgotten that I had set that up, and Workbench provided no indication that anything was amiss. The problem I'm writing this to point out is more about workflow (--check and errors) and documentation.

With an update(replace) task and a spreadsheet like

node_id,field_scholar
1,123|rlefaive

and allow_adding_terms: true, I expected node 1 to get two values in its field_scholar: whatever taxonomy term 123 is, and rlefaive. Instead, it only got term 123. Worse, it didn't alert me.

When rlefaive is the only term in the column, it does cause an error. The error in the Drupal logs is that it is "not of the correct primitive type". I'd prefer a noisier failure, or at least a "hey this field is an entity reference view field" coming from Workbench.

I am also confused by this section of the docs:

However, if allow_adding_terms is set to true, terms that are not in the referenced vocabulary will be added to the vocabulary if your CSV data contains a vocabulary ID/namespace in the form vocabid:newterm. The terms will be added regardless of whether they are within the referenced View. Therefore, for this type of Drupal field, you should not include vocabulary IDs/namespaces in your CSV data for that field.

If I'm trying to do what I explained above, should my field value be 123|scholar:rlefaive or something else?

Anyway, I'm fixing this for now by making my field a Default reference field instead of using a View.

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

1 participant