Skip to content

Esoteric Issue with "Modern" Add-on Execution #4866

@eric-lamb62

Description

@eric-lamb62

Description of the problem

This really only comes up with Add-ons that use the "new" structure in a very specific scenario: an Action that implements the Template Parser. For example, a custom Add-on that sends an email from a Channel Form submission or an email from a CartThrob Order. Both use Actions as the primary entry point, which then locks all Add-on requests to be executed as Action objects and won't find the Tag objects.

This affects every Add-on that uses the new structure for Template Tags which customers/developers would use within an Action request.

From an Action request that calls the Template library with a string that calls a Template Tag

Image

Note that RandomTag is a Template Tag but the router is attempting to route as an Action.

This is independent of any versions of the infrastructure.

How To Reproduce
Steps to reproduce the behavior:

  1. Create a new Template Tag using the built-in Command (or manually if bored) for an Add-on
  2. Setup a Channel Form template
  3. Write an Extension to send an email (using the Template Parser) from the above submission
  4. Cry

Or, you can just use the attached test Add-on I wrote to prove the concept. Upon installation, it'll install an Action for you to execute to view the error.

tmpl_action.zip

Error Messages



ExpressionEngine\Service\Addon\Exceptions\ControllerException Caught
Invalid Module request! Are you sure /Mithra/TmplAction/Actions/RandomTag is setup properly?
Path/to/EE/ExpressionEngine/system/ee/ExpressionEngine/Service/Addon/Module.php:72

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions