Description of the problem
I have created a new template tag by create a new Addon using the eecli and then setting up new template tag using the make:template-tag.
The template tag will output its content fine in the websites templates. However when editing entries in the control panel, the preview pane presents this error:
ExpressionEngine\Service\Addon\Exceptions\ControllerException Caught
Invalid Module request! Are you sure \addonDeveloper\TemplateTag\Actions\Output is setup properly?
ee/ExpressionEngine/Service/Addon/Module.php:72
What testing I have tried
I have created a vanilla addon simply called template tag. I have setup a template tag within that addon with an output method.
This is the content of the Tags/Output.php file
<?php
namespace AcuteDeveloper\TemplateTag\Tags;
use ExpressionEngine\Service\Addon\Controllers\Tag\AbstractRoute;
class Output extends AbstractRoute
{
// Example tag: {exp:templatetag:output}
public function process()
{
return "My tag";
}
}
In the frontend templates, it outputs fine. In the control panel previews, the error above is presented.
My setup
- EE 7.2.6
- Using structure templates
- Testing on my local laravel valet environment
I have a _base.html file that is extended by templates in a layout folder.
layouts
- _base.html
- _homepage.html
How To Reproduce
- Ensure you have templates that you can preview in the entries preview pane
- Create a new Addon with
make:addon.
- Create a new template tag with
make:template-tag.
- Add your new template tab to your template
- Preview the template in a new entry
- Error presented
Possible Solution
For now Im trying the older pi.addon_name.php plugin file style.
Description of the problem
I have created a new template tag by create a new Addon using the eecli and then setting up new template tag using the
make:template-tag.The template tag will output its content fine in the websites templates. However when editing entries in the control panel, the preview pane presents this error:
What testing I have tried
I have created a vanilla addon simply called
template tag. I have setup a template tag within that addon with anoutputmethod.This is the content of the Tags/Output.php file
In the frontend templates, it outputs fine. In the control panel previews, the error above is presented.
My setup
I have a
_base.htmlfile that is extended by templates in a layout folder.How To Reproduce
make:addon.make:template-tag.Possible Solution
For now Im trying the older pi.addon_name.php plugin file style.