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

Datagrid export for other datagrid sources then ORM. #1076

Open
hvanoch opened this issue Dec 14, 2021 · 1 comment
Open

Datagrid export for other datagrid sources then ORM. #1076

hvanoch opened this issue Dec 14, 2021 · 1 comment

Comments

@hvanoch
Copy link

hvanoch commented Dec 14, 2021

Summary
When trying to export a datagrid with a non "ORM" datasource an exception is thrown in the export processor.

Steps to reproduce
Create a datagrid with array datasource and set export: true in grid config

Actual Result

In DatagridExportIdFetcher.php line 90:
                                                                                                                                                     
  [Symfony\Component\Debug\Exception\UndefinedMethodException]                                                                                       
  Attempted to call an undefined method named "getQueryBuilder" of class "\Oro\Bundle\DataGridBundle\Datasource\ArrayDatasource\ArrayDatasource".  
                                                                                                                                                     

Exception trace:
  at /var/www/html/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/ImportExport/DatagridExportIdFetcher.php:90
 Oro\Bundle\DataGridBundle\ImportExport\DatagridExportIdFetcher->getGridRootEntity() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Handler/ExportHandler.php:164
 Oro\Bundle\DataGridBundle\Handler\ExportHandler->getEntityName() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Async/Export/PreExportMessageProcessor.php:130
 Oro\Bundle\DataGridBundle\Async\Export\PreExportMessageProcessor->getMessageBody() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/ImportExportBundle/Async/Export/PreExportMessageProcessorAbstract.php:92
 Oro\Bundle\ImportExportBundle\Async\Export\PreExportMessageProcessorAbstract->process() at /var/www/html/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/DelegateMessageProcessor.php:36
 Oro\Component\MessageQueue\Client\DelegateMessageProcessor->process() at /var/www/html/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:192
 Oro\Component\MessageQueue\Consumption\QueueConsumer->doConsume() at /var/www/html/vendor/oro/platform/src/Oro/Component/MessageQueue/Consumption/QueueConsumer.php:127
 Oro\Component\MessageQueue\Consumption\QueueConsumer->consume() at /var/www/html/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/ConsumeMessagesCommand.php:96
 Oro\Component\MessageQueue\Client\ConsumeMessagesCommand->consume() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/MessageQueueBundle/Command/ClientConsumeMessagesCommand.php:46
 Oro\Bundle\MessageQueueBundle\Command\ClientConsumeMessagesCommand->consume() at /var/www/html/vendor/oro/platform/src/Oro/Component/MessageQueue/Client/ConsumeMessagesCommand.php:90
 Oro\Component\MessageQueue\Client\ConsumeMessagesCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:97
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:83
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/html/bin/console:29

Expected Result
Export to also work with non orm datasource types

Details about your environment

  • OroPlatform version: 4.2
  • PHP version: 7.4
  • Database (MySQL, PostgreSQL) version 8.0
@anyt
Copy link
Contributor

anyt commented Dec 14, 2021

The array data source has a very limited list of features. Export is one of the features that is not implemented for it.

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

No branches or pull requests

2 participants