Project

General

Profile

Actions

Bug #94586

open

Default database instead of external database called when starting scheduler task via CLI

Added by Alexander Rotzsch almost 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2021-07-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi there,

I have an environment with 2 configured external databases. All is fine, fetching data from these databases work as expected. Additionally there's EXT:external_import installed where in one of the custom steps I fetch data from an external database via Doctrine-Queries. The associated scheduler task fetches the data and it works if I manually run the task via backend scheduler.

Now the problem: This doesn't work if the task automatically starts via CLI/cronjob. Then the external database is not called but the default one, which of course can't work. In that case the following log message is stored in tx_externalimport_domain_model_log:

SELECT command denied to user 'username'@'localhost' for table 'pages' [0]

The current workaround is to bypass doctrine and directly connect to the database via pdo methods -> this works (with the same database configuration parameters). I already approved that it's not an external_import issue: https://github.com/cobwebch/external_import/issues/197

-----
TYPO3 10.4.17
external_import 5.1.1

No data to display

Actions

Also available in: Atom PDF