Error when using shortcode in Elementals

Silverstripe Version: 4.5

I have created a shortcode and added it to Page.php. It works fine normally but when I add the shortcode to a content block in an Elemental I get an error message in the admin area. Note the shortcode displays on the frontend fine.

The shortcode renders using a template which is the basis for the error.

$current = Controller::curr();
return $current->customise($arrayData)->renderWith('Includes/PricingInformation');

The error I get in the admin is

[User Warning] None of the following templates could be found: Includes/PricingInformation in themes "Array ( [0] => silverstripe/admin:cms-forms [1] => $default ) "

I did notice this worked fine when I first entered the shortcode but when I came back to edit the elemental object this error appeared.

Any advice would be greatly appreciated.

I solved this by adding the template to my /app/templates/Includes folder.

It was weird because I couldn’t figure out why the admin was calling for it as Preview wasn’t even visible. But the Element object had a Summary() function that was drawing from the rendered Content.