Problem/Motivation
When importing a reference in the EndNote X3 XML format, contributors that already exist are created again. It seems the contributor deduplication setting has no effect.
Steps to reproduce
Import a reference in the EndNote X3 XML format with contributors that already exist.
Presumed root cause
As hypothesized in the comments below, the change to getDrupalDenormalizer in #3428258: Automated Drupal 11 compatibility fixes for bibcite broke the contributor deduplication using bibtex import:
- $author = $this->serializer->denormalize(['name' => [['value' => $contributor['name']]]], Contributor::class, $format, $context);
+ $author = $this->getDrupalDenormalizer(['name' => [['value' => $contributor['name']]]], Contributor::class, $format, $context);
Comments
Comment #2
gkaas commentedComment #3
corn696Hi i encountered the issue too, using bibtex import. Tested on a D10 Site
Seems the change to getDrupalDenormalizer in Automated Drupal 11 compatibility fixes for bibcite breaks the contributor deduplication using bibtex import.
Comment #4
corn696Comment #5
mark_fullmerComment #7
mark_fullmerThanks for reporting this. The root cause has to do with a change in Symfony from version 6 to 7, where Normalizers expect a
getSupportedTypes()method to be present which specifies what things the given normalizer is eligible to normalize. It defaults to *, so what was happening was that the ReferenceNormalizer was being considered eligible for denormalization when Bibcite was trying to denormalize Contributor entities. The merge request resolves this issue; I need to double-check that this doesn't introduce backwards compatibility issues for earlier versions of Drupal...Comment #8
mark_fullmer