Skip to content

Commit

Permalink
[FEATURE] Link cli command DataHandler error to solution
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Jan 19, 2024
1 parent 07d0edf commit e8b12c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/ApiOverview/CommandControllers/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ Create a custom command
See the :ref:`Tutorial: Create a console command <console-command-tutorial>`
for details on how to create commands.

DataHandler usage
=================
Using the :ref:`DataHandler <tce-database-basics>` in a CLI command requires
backend authentication.
See :ref:`dataHandler-cli-command` for more information.

Read more
==========

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ array you want to pass to the class and call a few methods.


.. index:: pair: DataHandler; Symfony
.. _dataHandler-cli-command
Using the DataHandler in a Symfony command
==========================================
Expand All @@ -38,6 +39,11 @@ method, you should make sure that this user is initialized like this:
\TYPO3\CMS\Core\Core\Bootstrap::initializeBackendAuthentication();
If you forget to add the backend user authentication, an error similar to this
will occur:

[1.2.1]: Attempt to modify table "pages" without permission


.. index:: pair: DataHandler; PHP
.. _dataHandler-examples:
Expand Down

0 comments on commit e8b12c7

Please sign in to comment.