Import list of items

Hi,

I try to import a list to a vocabulary, but I have this error:

(2021-07-09 13:55:57) Cannot add or update a child row: a foreign key constraint fails (`collectiveaccess3`.`ca_list_items`, CONSTRAINT `fk_ca_list_items_list_id` FOREIGN KEY (`list_id`) REFERENCES `ca_lists` (`list_id`))

What I have to do to solve it?

Thanks a lot,

Elena

Comments

  • In your mapping you have source 1 and 2 mapping to a single field: ca_list_items.preferred_labels.name_singular. Based on your test data it looks like the second one should be plural.

  • It's true. I have changed it, but I continue with the errors.

    Warning:non-numeric value encountered in /var/www/html/providence3/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php on line 140


    Warning: A non-numeric value encountered in /var/www/html/providence3/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php on line 141


    Warning: A non-numeric value encountered in /var/www/html/providence3/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php on line 139


    2021-07-12 08:17:49) Cannot add or update a child row: a foreign key constraint fails (`collectiveaccess3`.`ca_list_items`, CONSTRAINT `fk_ca_list_items_list_id` FOREIGN KEY (`list_id`) REFERENCES `ca_lists` (`list_id`))

    Thanks a lot,

    Elena

  • Make sure the list you're referencing actually exists in your configuration.

  • Yes, the list exists.

    Thanks a lot,

  • That error implies whatever you're mapping to does not.

Sign In or Register to comment.