From 863b78388d374179cb623c5636e93c266233b374 Mon Sep 17 00:00:00 2001 From: Zoltan Szasz Date: Fri, 26 Apr 2024 15:02:58 +0200 Subject: [PATCH] Add documentation: creating a document via a command (#682) --------- Co-authored-by: Prokyonn --- .../document-manager/using_the_document_manager.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/components/document-manager/using_the_document_manager.rst b/reference/components/document-manager/using_the_document_manager.rst index 03be5f39..88c4850d 100644 --- a/reference/components/document-manager/using_the_document_manager.rst +++ b/reference/components/document-manager/using_the_document_manager.rst @@ -62,6 +62,14 @@ on which subscribers you have registered. See the :doc:`subscribers` chapter for more information. +.. note:: + + Be aware that documents can only be created in the admin context, not in the website context. For CLI commands, this means you must use ``bin/adminconsole`` to execute the command. Alternatively, you can execute a command that dispatches messages via the Symfony Messenger. In this case, the consumer that consumes the dispatched message must also run in the admin context. + + .. code-block:: bash + + bin/adminconsole your:command + The Path Builder ----------------