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: Type error during the translation process into another language #2196

Open
monosize opened this issue Nov 30, 2024 · 2 comments · May be fixed by #2207
Open

BUG: Type error during the translation process into another language #2196

monosize opened this issue Nov 30, 2024 · 2 comments · May be fixed by #2207

Comments

@monosize
Copy link
Member

I have checked that the bug exists in the dev-development branch
Yes

I have checked that there are no already open issues or recently closed issues about this bug
yes

Describe the bug
When translating the content elements within a flux grid, the error ‘TypeError: Cannot access offset of type string on string’ occurs. The translation process then hangs.

To Reproduce
Steps to reproduce the behavior:
Translate a flux grid with elements

Expected behavior
The cause is DoctrineQueryProxy::executeQueryOnQueryBuilder instead of executeStatementOnQueryBuilder in

DoctrineQueryProxy::executeQueryOnQueryBuilder($queryBuilder);

image

@monosize monosize changed the title BUG: foobar fails when baz BUG: Type error during the translation process into another language Nov 30, 2024
@cweiske
Copy link
Contributor

cweiske commented Jan 15, 2025

I have this problem when copying&pasting a page in TYPO3 v11.5.41 on PHP 8.3.15 and flux 10.1.0.

Fuller stracktrace here:

(1/1) TypeError
Cannot access offset of type string on string
  in /var/www/typo3/public/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php line 1368
at TYPO3\CMS\Core\Database\Query\QueryBuilder->getQueriedTables()
  in /var/www/typo3/public/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php line 1399
at TYPO3\CMS\Core\Database\Query\QueryBuilder->addAdditionalWhereConditions()
  in /var/www/typo3/public/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php line 296
at TYPO3\CMS\Core\Database\Query\QueryBuilder->executeQuery()
  in /var/www/typo3/public/typo3conf/ext/flux/Classes/Utility/DoctrineQueryProxy.php line 23
at FluidTYPO3\Flux\Utility\DoctrineQueryProxy::executeQueryOnQueryBuilder()
  in /var/www/typo3/public/typo3conf/ext/flux/Classes/Integration/HookSubscribers/DataHandlerSubscriber.php line 166
at FluidTYPO3\Flux\Integration\HookSubscribers\DataHandlerSubscriber->processDatamap_afterDatabaseOperations()
  in /var/www/typo3/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 6556
at TYPO3\CMS\Core\DataHandling\DataHandler->processRemapStack()
  in /var/www/typo3/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1144
at TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap()
  in /var/www/typo3/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3358
at TYPO3\CMS\Core\DataHandling\DataHandler->copyRecord()
  in /var/www/typo3/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3563

@cweiske
Copy link
Contributor

cweiske commented Jan 15, 2025

The following blog post helps: https://blog.wappler.systems/typo3-error-cannot-access-offset-of-type-string-on-string-at-querybuilder-update-command/

Use executeStatement() instead of executeQuery()

Replacing DoctrineQueryProxy::executeQueryOnQueryBuilder with DoctrineQueryProxy::executeStatementOnQueryBuilder fixes the problem.

cweiske added a commit to mogic-le/flux that referenced this issue Jan 15, 2025
When copying a page in TYPO3 v11.5.41, PHP 8.3.15 and flux 10.1.0
an exception occurs:

> (1/1) TypeError
> Cannot access offset of type string on string
> in typo3/sysext/core/Classes/Database/Query/QueryBuilder.php line 1368

Thanks to the following blog post for the solution:
https://blog.wappler.systems/typo3-error-cannot-access-offset-of-type-string-on-string-at-querybuilder-update-command/

Resolves: FluidTYPO3#2196
@cweiske cweiske linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants