diff --git a/src/content/1.7/modules/concepts/controllers/front-controllers.md b/src/content/1.7/modules/concepts/controllers/front-controllers.md index baa5716cf6..b41820e022 100644 --- a/src/content/1.7/modules/concepts/controllers/front-controllers.md +++ b/src/content/1.7/modules/concepts/controllers/front-controllers.md @@ -250,7 +250,9 @@ class ExampleModuleCronModuleFrontController extends ModuleFrontController } ``` -This controller can now be triggered by creating a PHP file that initiates the route to the controller, then includes the index.php at the root of PrestaShop in order to init the dispatcher and your controller: +This controller can now be triggered by creating a PHP file that initiates the route to the controller, then includes the index.php at the root of PrestaShop in order to init the dispatcher and your controller. + +This kind of script is also useful if a standalone PHP script interacting with PrestaShop has been migrated to a ModuleFrontController. The URLs to call would change by moving into a Controller, but the old one would be still accessible with this workaround. **modules/examplemodule/cron.php** diff --git a/src/content/1.7/modules/sell/techvalidation-checklist.md b/src/content/1.7/modules/sell/techvalidation-checklist.md index c7e6abb391..a35bf105e5 100644 --- a/src/content/1.7/modules/sell/techvalidation-checklist.md +++ b/src/content/1.7/modules/sell/techvalidation-checklist.md @@ -136,7 +136,11 @@ Having the module name as a prefix will reduce the risk of colision between clas All the AJAX and CRON files must be protected with a unique and secured token to avoid any security issues (outside attacks,...). Even the front controllers must be secured with a secured token when you use AJAX in it. -AJAX and CRON scripts must be placed in a controller ([More details]({{< ref "1.7/modules/concepts/controllers#php-scripts-not-going-through-the-prestashop-or-symfony-dispatcher" >}})). +AJAX and CRON scripts must be placed in a controller and not in a separate script to call on its own. +For more details: + +* [Documentation]({{< ref "1.7/modules/concepts/controllers/front-controllers" >}}#using-a-front-controller-as-a-cron-task) +* [Original issue leading to the use of ModuleFrontControllers](https://github.com/PrestaShop/PrestaShop/issues/14648) #### Code in hook is run only when needed