- Issue created by @saurabh-2k17
- 🇮🇳India saurabh-2k17
I have marked the issue as critical because I see there are two older issues with the similar problem.
https://www.drupal.org/project/taxonomy_import/issues/3238608 →
https://www.drupal.org/project/taxonomy_import/issues/3225261 → - First commit to issue fork.
- 🇺🇸United States TolstoyDotCom L.A.
I reworked ImportForm.php to separate loading the CSV or XML from the term operations. There are probably phpcs and documentation issues and it would be best to put the term-related methods in a service. There are also services that should be injected. I also only lightly tested it, so please test it out.
- last update
over 1 year ago 1 pass - @tolstoydotcom opened merge request.
-
TolstoyDotCom →
committed ba50cca7 on 2.0.x
Issue #3369131: Field Description is unknown. in Drupal\Core\Entity\...
-
TolstoyDotCom →
committed ba50cca7 on 2.0.x
- Status changed to Needs review
over 1 year ago 8:54pm 16 August 2023 - 🇺🇸United States TolstoyDotCom L.A.
I merged the changes into the 2.0.x-dev branch, please test.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
This appears to undo the ability to add custom fields, which was added in ✨ Allow custom field Fixed . The code is moved into
::setAdditionalFields()
, which isn't called anywhere. - 🇺🇸United States TolstoyDotCom L.A.
I thought I already did the part about the CSV and XML readers returning the same array, but I'll look into that more.
Since I made my changes without having used the module with custom fields, what would help is sample CSV and/or XML data (just one term is needed) together with instructions on which field to add, etc.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
You are correct. I was looking at the code for version 2.0.12. The commit already done for this issue creates the separate methods.
Attached is a sample import file using a custom field.
- 🇺🇸United States SocialNicheGuru
Could it also check for modules like http://drupal.org/project/taxonomy_machine_name so that the machine name can be added to the taxonomy term import.
- 🇺🇸United States SocialNicheGuru
I am using a csv file with the following and it failed:
Name, Parent, Descriptionwhen i used lowercase it worked:
name, parent, description - 🇵🇭Philippines Zed9
The fix seems to working, not encountering any issue during import. However this might be another issue if I interchange parent and description columns on csv, description and parent are imported.