Closed amici-infotech closed 1 year ago
If I am not mistaken, removing the originaly line was not necessary for adding the other line. It may even cause problems for reports that are executed via the queue. Maybe both lines should be included.
I was unable to reproduce this error with version 2.0.1 and Craft 4.4.5 using a macro in the template. Can you provide more details about your installation and how you are generating reports?
It looks like you have a template folder that is simply called "_". I wonder if that could be a factor.
I am on Craft v4.4.7.1 with Plugin v2.0.1.
here is my code.
{#
Report Title : All Subscribers
Report Description : List of all subscribers.
Report Template : _/reports/all-subscribers
#}
{% include "_/reports/new-subscribers/index" with {
gap: null,
report: report
} %}
Where _
is my folder name where I store all the layouts, reports, includes etc. I need to use include because i need the same repeating code for new subscribers in last week, last month, in 6 month, all time subscribers
If I am not mistaken, removing the originaly line was not necessary for adding the other line. It may even cause problems for reports that are executed via the queue. Maybe both lines should be included.
If we change it to set TEMPLATE_MODE_SITE
, we wont really need to store the path. PATH of frontend template will be manage by craft itself.
I get this error when I try to use macros in the report templates. It looks like this:
It says template not found but macros is there. After debug the code, i found this a culprit.
In
services/Reports.php
if I change line 69 from:to
then it all works great.