Closed loqus closed 4 months ago
Can you share the “Blitz Plugin Settings” part of the diagnostics report, so I can see what settings you have?
Well good news, after uninstalling and re-installing the plugin, the errors above are gone. But now a new one pops up:
I cannot load the generate report page. I cleared the runtime directory. But clicking on the generate diagnostics report gives me a (TypeError(code: 0): get_class(): Argument #1 ($object) must be of type object, string given at /var/www/vhosts/xxx/xxx/storage/runtime/compiled_templates/cd/cdbcdf1d50c468a38bece6c6b7579c04.php:88 (which is the blitz/_utilities/diagnostics/_includes/report template)
Row 88: echo twig_escape_filter($this->env, get_class($context["module"]), "html", null, true);
PS i have the same error on another Craft CMS (different site) running on Craft Pro 4.9.2, Blitz 4.18.0, PHP 8.1.28
That’s good to hear!
Can you please share the entire stack trace of the error so I can track it down? The error appears to be referencing a custom module.
Any update on this, @loqus?
This is what I got now
Twig\Error\RuntimeError: Impossible to access an attribute ("id") on a string variable ("modules\Module"). in /var/www/vhosts/example.com/httpdocs/vendor/putyourlightson/craft-blitz/src/templates/_utilities/diagnostics/_includes/report.twig:19 Stack trace:
It’s unclear why modules\Module
is a string and not a module. Can you please show me the modules
section in your config/app.php
file?
Might it be the 'my-module' => \modules\Module::class, default module in there? It's never changed since using Craft since v2 OMG, yes it is.
It looks like the module not being bootstrapped was causing the issue. Fixed in https://github.com/putyourlightson/craft-blitz/commit/64af11ee7701bab3d2435323f4577bb91d53737d to only show bootstrapped modules, for the next release. Thanks for helping me figure this out!
@bencroker running in the same initial error when updating to Craft 5 and Blitz 5.4 ⚡️ Uninstalling and re-installing fixed the error for me, too.
Thanks @sarahschuetz, https://github.com/putyourlightson/craft-blitz/commit/b2b21384f01eb98c6cd79129a749de06c67d880d should fix that in future.
Bug Report
After updating to Craft 5 Pro and updating Blitz to ^5.3 I got a non-functioning dashboard and non functioning blitz plugin page. It seems to be related to the 2 properties that got removed in v5.0.0
Setting unknown property: putyourlightson\blitz\drivers\storage\FileStorage::createGzipFiles Setting unknown property: putyourlightson\blitz\drivers\storage\FileStorage::createBrotliFile
After manually adding the properties from v4 back into the FileStorage everything was functioning again. I don't have these values active in the blitz.php config and I am unsure where they are called from.
Diagnostics Report
PHP version | 8.2.19 Craft edition & version | Craft Pro 5.1.5 Blitz | 5.3.1