This actually started when I was upgrading a site from EE2. I got it to EE5 and started seeing some odd notices and warnings. So I upgraded to EE6 hoping to fix the issue, but the warnings persist, and I can’t pin down the cause.
Notice
Trying to get property 'site_name' of non-object
ee/ExpressionEngine/Model/Template/TemplateGroup.php, line 174
Notice
Trying to get property 'site_name' of non-object
ee/ExpressionEngine/Model/Template/TemplateGroup.php, line 174
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/ExpressionEngine/Boot/boot.common.php, line 477
I only see this when editing a template or initiating a system change, like adjusting a member group. Everything still works, but these warning messages persist. One odd thing is that I don’t see the error messages when editing a snippet or a variable.
I’ve run the server wizard, and it did not flag anything other than the lack of URL Segment Support.
I’ve tried adding a second Super Admin to see if it was an issue with the legacy member account, but that wasn’t it. I’ve tried disabling all add-ons and extensions, but that didn’t work.
Currently running EE 6.0.6 with PHP 7.4.19
Any thoughts?
No, no solution. I suspect it’s a hosting configuration issue, since this has been an isolated incident with separate hosting. We have upgraded many sites to EE6 and EE7 at this point, and I’ve never seen the issue again. For that one site, I wound up using the “MX CP CSS & JS” add-on to adjust the system CSS to hide the warnings. If you track down anything, please let us know.
I had posted a ticket on GitHub and got a reply that helped resolve my issue. Within the exp_template_groups table in the db, there should only be “1” as site id for each record, assuming you do not run MSM. In my case I had a template group from an addon, mistakenly uploaded to above the default_site template group folder. That gave that group an id of 0 in the db table. Moving that group to within the default_site folder, and then changing the id of that group to 1 in the db has resolved the issue. Hope that helps in your case.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.