Anyone come across an error like this before:
Fatal error: Uncaught Error: Call to a member function getId() on null in /PATH/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php:1125 Stack trace: #0 /PATH/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php(973): EllisLab\ExpressionEngine\Controller\Design\Template->getExistingTemplates('60') #1 /PATH/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php(281): EllisLab\ExpressionEngine\Controller\Design\Template->renderAccessPartial(Object(EllisLab\ExpressionEngine\Model\Template\Template), NULL) #2 [internal function]: EllisLab\ExpressionEngine\Controller\Design\Template->edit('607') #3 /PATH/ee/EllisLab/ExpressionEngine/Core/Core.php(240): call_user_func_array(Array, Array) #4 /PATH/ee/EllisLab/ in /PATH/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php on line 1125
Just discovered that it happens every time I try to open any of my footer templates.
I am using Version: 4.3.4, Build: 17/8/2018
When I discovered the error, I tried to update, but couldn’t get the one-click updater to work (it was showing as being up to date). I have done so now, just didn’t have the time to do it manually right then.
Robin helped me find the issue with the templates, though I am still mystified as to how it happened because it had to do with deleting a template that had access permissions…which I’ve never setup. But it works now.
since my error is very similar i thought i’d post here before making a new post.
i’ve upgraded to EE 5.0.1 Build: 11/18/2018 and my site is online, functioning fine, and the control panel and database all seem to be fine.
the template section is also working fine and i’ve worked on a bunch of templates successfully.
then i went to open some of my embedded templates and got back a white page with the following error. a point of note, this only happens on a handful of templates, and pages using these templates are parsing out fine on the front end.
Fatal error: Uncaught Error: Call to a member function getId() on null in /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php:1123 Stack trace: #0 /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php(974): EllisLab\ExpressionEngine\Controller\Design\Template->getExistingTemplates(‘23’) #1 /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php(282): EllisLab\ExpressionEngine\Controller\Design\Template->renderAccessPartial(Object(EllisLab\ExpressionEngine\Model\Template\Template), NULL) #2 [internal function]: EllisLab\ExpressionEngine\Controller\Design\Template->edit(‘122’) #3 /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Core/Core.php(241): call_user_func_array(Array, Array) #4 /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Core/Core.php(110): EllisLab\ExpressionEngine\Core\Core->runController(Array) #5 /h in /home2/sasynaco/public_html/atwoodfest/express/ee/EllisLab/ExpressionEngine/Controller/Design/Template.php on line 1123
I suspect it’s similar, @rokker, sounds like some part of your database record for the affected template(s) lacks integrity, that is only now showing up after upgrading because the Models expect complete entities. If you’re up for it, you should be able to compare the template-related tables directly in the database and see if there are any mismatched, missing, or orphaned records. If you need a hand, our support team could handle that for you directly on your servers.
It would be a problem with the data integrity, not with MySQL’s storage; i.e. the data needs repairing, not the database. We’d be happy to help; head over to the support homepage and choose a solution that works best for you. Then you’ll have a private portal where you can provide us secure access to your site and our team can diagnose and repair right in your environment.
If you want to ensure the site’s data has integrity, you’ll need someone who can examine the tables directly and find and fix the cause. It’s not likely something that can be fixed by taking actions in the control panel, as all of those actions assume the data is available and correct.
An orphaned record is one that requires a parent or associated row in another table, but the parent/associated row does not exist. Mismatched would be rows in separate tables that should be associated but the keys are incorrect on one or both. Missing is, well, missing entirely. I’m sorry but that’s about as far as I can help you in the forums. If you’re intent on giving it a go, you could always give Slack a try and see if someone can help there.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.