Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-picker throwing error when using Reports quick edit menu #218

Open
1 task
BenParizek opened this issue Apr 23, 2023 · 1 comment
Open
1 task

Time-picker throwing error when using Reports quick edit menu #218

BenParizek opened this issue Apr 23, 2023 · 1 comment

Comments

@BenParizek
Copy link
Member

Description

Time-picker throwing error when using quick edit menu

How to reproduce

I'm getting a similar issue - when I run a report and then click on the 'cog' icon at the top right of the screen to show my custom settings date field, if I alter the field value and then click the 'Run Report' button again I get the following error:

TypeError: Argument 1 passed to craft\web\View::renderTemplate() must be of the type string, null given, called in /app/craft/vendor/barrelstrength/sprout-base-reports/src/datasources/CustomTwigTemplate.php on line 215 and defined in /app/craft/vendor/craftcms/cms/src/web/View.php:388
Stack trace:
#0 /app/craft/vendor/barrelstrength/sprout-base-reports/src/datasources/CustomTwigTemplate.php(215): craft\web\View->renderTemplate(NULL, Array)
barrelstrength/sprout-reports#1 /app/craft/vendor/barrelstrength/sprout-base-reports/src/datasources/CustomTwigTemplate.php(52): barrelstrength\sproutbasereports\datasources\CustomTwigTemplate->processFrontEndResultsTemplate(Object(barrelstrength\sproutbasereports\elements\Report), Array)
barrelstrength/sprout-reports#2 /app/craft/vendor/barrelstrength/sprout-base-reports/src/controllers/ReportsController.php(149): barrelstrength\sproutbasereports\datasources\CustomTwigTemplate->getDefaultLabels(Object(barrelstrength\sproutbasereports\elements\Report))
barrelstrength/sprout-reports#3 [internal function]: barrelstrength\sproutbasereports\controllers\ReportsController->actionResultsIndexTemplate(Object(barrelstrength\sproutbasereports\elements\Report), 238665)
barrelstrength/sprout-reports#4 /app/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
barrelstrength/sprout-reports#5 /app/craft/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
barrelstrength/sprout-reports#6 /app/craft/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('results-index-t...', Array)
barrelstrength/sprout#10 /app/craft/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction('sprout-base-rep...', Array)
barrelstrength/sprout-reports#8 /app/craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('sprout-base-rep...', Array)
barrelstrength/sprout-reports#9 /app/craft/vendor/craftcms/cms/src/web/Application.php(278): yii\web\Application->handleRequest(Object(craft\web\Request))
barrelstrength/sprout-reports#10 /app/craft/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
barrelstrength/sprout-reports#11 /app/craft/web/index.php(21): yii\base\Application->run()
barrelstrength/sprout-reports#12 {main}

When I go back to edit the report, the template paths for both the results and settings twig files are now empty.

Sprout Version

1.5.14

Craft Version

3.7.34

Database Type Version

?

@BenParizek
Copy link
Member Author

@paulgoodfield I've created a new ticket for the issue you raised. I lost track of it on the closed ticket where your comment was originally made and we're now centralizing support into this main Sprout repo.

If this remains an issue, can you share an example of custom settings date field and any JS you have in your template. The latest recommended syntax for that field was in this example file here:
https://github.com/barrelstrength/sprout-reports/blob/015c640f7968d7e6d9ef9a2c4441ab80b800c32f/src/examples/tutorialreport/settings.twig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant