Can a craft plugin continue after a controller call?

Can a craft plugin continue after a controller call?

Craft has system Controller actions for core actions, but plugins may also have Controllers that define their own custom actions. The request doesn’t necessarily end after a controller call. The controller may allow it to keep going. Is it an element request?

How to invoke a controller action in craft?

To invoke a controller action, send a POST request to Craft, with an action param set to the desired action path, either in the request body or query string. Saves an entry. This can be used to save a new or existing entry, determined by the sourceId param.

How to create custom URL for craft controller?

Create your own endpoint for requests with a custom URL rule that resolves to your controller action. For example, in config/routes.php: By default, Craft makes an actions/ route available for appending any valid action path. This can be customized with the actionTrigger config setting.

How does Redirect response work in craft CMS?

Redirect response per the hashed redirect param, or the activateAccountSuccessPath config setting if email verification is not required. None; the request will be routed per the URI. A user variable will be passed to the resulting template.

Why do I get a 404 error for my controller?

It is not the solution for this particular post, but hopefully adding this will save someone some time trying to find the issue when they are searching for why they might be getting a 404 error for their controller. Basically, I had spelt “Controller” wrong at the end of my class name. Simple as that!

Where do I find the config settings in craft?

Craft supports several configuration settings that give you control over its behavior. To set a new config setting, open config/general.php and define it in one of the environment config arrays, depending on which environment (s) you want the setting to apply to.

What does craft do when it encounters an error?

When Craft encounters an error for a front end request, it will take your errorTemplatePrefix into account and check the root of your templates/ directory, in order, for the following: A template matching the error’s status code, like 404.twig.