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

No Person terms are created - Drupal 8.9.14-dev #244

Closed
dara2 opened this issue Mar 12, 2021 · 4 comments
Closed

No Person terms are created - Drupal 8.9.14-dev #244

dara2 opened this issue Mar 12, 2021 · 4 comments

Comments

@dara2
Copy link

dara2 commented Mar 12, 2021

When I run --check, it doesn't flag any errors, and says the new Person terms in my CSV will be created. Then, when I do the import I get errors in the log like 09-Mar-21 09:44:16 - WARNING - Term 'Sorg, Marcella' not created, HTTP response code was 422., the term is not created, and any node that references it is also not created in Drupal. Previously this was occurring for some Person terms, but not all.
I am able to create other terms, just not Person terms.
If I manually create the Person term and then reference it by name in the CSV, the associated node is created without any issue.
An excerpt of the WB log is attached.
I imported the same CSV at your demo VM and the Person terms were created just fine.
Looking in the Drupal watchdog log, it seems like it is expecting values in the "Person Preferred Name" field that used to be required when creating Person terms but is no longer part of the form (I think it had been in the Names module?).
Error in Drupal log:
Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException: Unprocessable Entity: validation failed. field_person_preferred_name: This value should not be null. in Drupal\rest\Plugin\rest\resource\EntityResource->validate() (line 55 of /var/www/drupal/web/core/modules/rest/src/Plugin/rest/resource/EntityResourceValidationTrait.php).

Our developer, Hertzel, suggested opening a ticket with you. I know you'd said you were looking into terms not being created so perhaps there is a related ticket that I didn't see - but I wanted to call out what I was seeing in the Drupal log, in case that helps.

PersonTermIssue.log

@mjordan
Copy link
Owner

mjordan commented Mar 12, 2021

Thanks, this is very helpful. field_person_preferred_name is the problem. I think Islandora shipped with that field up until Islandora/documentation#1561, when we removed it (and the Name module, which may have required that field). Can you confirm that your Islandora has the Name module installed and enabled? If it doesn't, then can you confirm that the Person vocabulary on your Drupal has a required field_person_preferred_name?

In either case, currently Workbench can't create terms that have required fields other than the core term name field. Issue #111 will address that, but it's a major chunk of work and will require that we figure out how to express the additional fields in CSV. That issue specifically mentions the Person field (#111 (comment)).

If you can look into the questions about field_person_preferred_name above, at least we'll be closer to identifying what's going on.

@dara2
Copy link
Author

dara2 commented Mar 12, 2021

Hi Mark--
I don't see the Name module when I look at the list of modules in the Drupal UI, but when I look in Git, it seems like maybe it is still there.
When I look in the Person form, there is no visible "Person Preferred Name" field like there used to be. But, I see that Person Preferred Name is still available as a field, just disabled (at /admin/structure/taxonomy/manage/person/overview/form-display).
I'm circling back with our developer to confirm that the Name module is no longer there.

@mjordan
Copy link
Owner

mjordan commented Mar 12, 2021

Sounds like the module was disabled but not uninstalled. That might be (not sure) required to remove the field.

@dara2
Copy link
Author

dara2 commented Jun 16, 2021

Hi @mjordan - I think this is all set now (this specific error I was running into).

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