Manager Error Log - lots of smarty errors

Hi all,

I’m seeing some unexpected behaviour in a MODX installation. Does anyone know what these warnings relate to in the Manager Error Log?

Many thanks in advance,


What is your PHP version? What’s the version of your MODX installation?

Sorry - I should have included that:

PHP 8.0 MODX 2.8.3

All extras are up to date.

I seem to remember seeing similar before. Could this be to do with a deprecated TV input type?

I’m pretty sure the warnings are because of PHP 8.

I created a new installation (without installing any extras) and when I update PHP to version 8.0.9, I get the same warnings in the error log.

PHP warning: Undefined array key "showCheckbox"
PHP warning: Attempt to read property "value" on null

You should probably create an issue on Github.

Thanks @chrisandy and thanks as ever @halftrainedharry - I’ll do that.

From the filename it’s possible to infer it comes from a file TV; that one is not deprecated :wink:

PHP8 (and as extension 7.4) have become a bit more strict about accessing array keys that aren’t set, so that requires some minor changes in old code and templates. We’ve seen and fixed similar issues in other places in the past.

It shouldn’t affect the actual functioning of the TV but that may change in the future as PHP, so thank you for reporting the issue.

1 Like

Cheers @markh :+1: glad it helped.

Are you sure? All files in core/cache/mgr/smarty seem to contain .file. in their name. Also, I could reproduce the warnings with a TV of type “Text”.

Oh, they do? In that case I judged the warning too quickly and stand corrected - thank you. It might be the manager/templates/default/resource/sections/tvs.tpl most of them come from then?

Additional errors would be useful in the issue in case there may be multiple similar issues. The SiteDash error log analyzer can be useful to quickly weed out duplicates and find the unique ones.