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

[Bug]: Find strategies require $identifier not to be null #263

Closed
rjankiew opened this issue Oct 17, 2022 · 7 comments
Closed

[Bug]: Find strategies require $identifier not to be null #263

rjankiew opened this issue Oct 17, 2022 · 7 comments
Assignees
Labels
Milestone

Comments

@rjankiew
Copy link

Expected behavior

When using any location strategy, if identifier is not specified in row (is empty, null), it should not cause importer to freeze. This is probably related to my previous issue: #182 (comment)

Actual behavior

Import freezes on a row without provided identifier value.

Steps to reproduce

Configure import using "attribute" location strategy. Use a file that has, in any row, an empty cell where attribute value used to search object should be. Run import.

@rjankiew rjankiew added the Bug label Oct 17, 2022
@mcop1 mcop1 assigned mcop1 and Corepex and unassigned mcop1 Nov 2, 2022
@mcop1 mcop1 added this to the 1.7.2 milestone Nov 4, 2022
@Corepex
Copy link
Contributor

Corepex commented Nov 8, 2022

@rjankiew thanks for reporting this issue.

Could you please provide us some more information on how we can reproduce this issue? (exact configuration steps etc) Furthermore it would be perfect if you could provide us a demo csv file to reproduce the issue.

thanks :)

@Corepex
Copy link
Contributor

Corepex commented Nov 15, 2022

@rjankiew, any updates according to my comment?

@mcop1 mcop1 modified the milestones: 1.7.2, 1.7.3 Nov 23, 2022
@Corepex
Copy link
Contributor

Corepex commented Nov 28, 2022

closed the ticket due to inactivity. feel free to reopen if there's something new.

@Corepex Corepex closed this as completed Nov 28, 2022
@seybsen
Copy link

seybsen commented Feb 17, 2023

Hi @Corepex,

I encountered the same issue as described above in pimcore/data-importer 1.7.2:

Reproduction:

Excel-File:
repro.xlsx

Target Pimcore Class:
image

Importer Config:
image
image
image
image

Stacktrace:

supervisord_1    |  0/1 [>---------------------------]   0% < 1 sec/< 1 sec 40.5 MiBFailed to process "17": Pimcore\Bundle\DataImporterBundle\Tool\DataObjectLoader::loadByAttribute(): Argument #3 ($identifier) must be of type string, null given, called in /var/www/html/vendor/pimcore/data-importer/src/Resolver/Load/AttributeStrategy.php on line 70
supervisord_1    | #0 /var/www/html/vendor/pimcore/data-importer/src/Resolver/Load/AttributeStrategy.php(70): Pimcore\Bundle\DataImporterBundle\Tool\DataObjectLoader->loadByAttribute('\\Pimcore\\Model\\...', 'someattribute', NULL, '', true, 1)
supervisord_1    | #1 /var/www/html/vendor/pimcore/data-importer/src/Resolver/Load/AbstractLoad.php(87): Pimcore\Bundle\DataImporterBundle\Resolver\Load\AttributeStrategy->loadElementByIdentifier(NULL)
supervisord_1    | #2 /var/www/html/vendor/pimcore/data-importer/src/Resolver/Resolver.php(159): Pimcore\Bundle\DataImporterBundle\Resolver\Load\AbstractLoad->loadElement(Array)
supervisord_1    | #3 /var/www/html/vendor/pimcore/data-importer/src/Resolver/Resolver.php(179): Pimcore\Bundle\DataImporterBundle\Resolver\Resolver->loadElement(Array)
supervisord_1    | #4 /var/www/html/vendor/pimcore/data-importer/src/Processing/ImportProcessingService.php(178): Pimcore\Bundle\DataImporterBundle\Resolver\Resolver->loadOrCreateAndPrepareElement(Array, true)
supervisord_1    | #5 /var/www/html/vendor/pimcore/data-importer/src/Processing/ImportProcessingService.php(142): Pimcore\Bundle\DataImporterBundle\Processing\ImportProcessingService->processElement('repro', Array, Object(Pimcore\Bundle\DataImporterBundle\Resolver\Resolver), Array)
supervisord_1    | #6 /var/www/html/vendor/pimcore/data-importer/src/Command/ParallelProcessQueueCommand.php(82): Pimcore\Bundle\DataImporterBundle\Processing\ImportProcessingService->processQueueItem(17)
supervisord_1    | #7 /var/www/html/vendor/webmozarts/console-parallelization/src/Parallelization.php(489): Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand->runSingleCommand('17', Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #8 /var/www/html/vendor/webmozarts/console-parallelization/src/Parallelization.php(348): Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand->runTolerantSingleCommand('17', Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #9 /var/www/html/vendor/webmozarts/console-parallelization/src/Parallelization.php(274): Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand->executeMasterProcess(Object(Webmozarts\Console\Parallelization\ParallelizationInput), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #10 /var/www/html/vendor/symfony/console/Command/Command.php(298): Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #11 /var/www/html/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #12 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #13 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Pimcore\Bundle\DataImporterBundle\Command\ParallelProcessQueueCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #14 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #15 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
supervisord_1    | #16 /var/www/html/bin/console(49): Symfony\Component\Console\Application->run()
supervisord_1    | #17 {main}

@mcop1
Copy link
Contributor

mcop1 commented Feb 17, 2023

Hello @seybsen ,
the problem is also mentioned here, right? Seems to be the same error:
#232

@seybsen
Copy link

seybsen commented Feb 17, 2023

Yes, @mcop1, you're right

@mcop1
Copy link
Contributor

mcop1 commented Feb 17, 2023

Great, I linked your comment to the open issue - we will have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants