We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Fatal error on opening all templates named Layout_Footer

News and General

Linda A's avatar
Linda A
647 posts
6 years ago
Linda A's avatar Linda A

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

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

Any reason you haven’t updated?

       
Linda A's avatar
Linda A
647 posts
6 years ago
Linda A's avatar Linda A

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.

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

Something leftover from v2 perhaps? In any case glad you worked it out!

       
Linda A's avatar
Linda A
647 posts
6 years ago
Linda A's avatar Linda A

I couldn’t say, to be honest. I have certainly deleted templates several times while on v.3 and v.4 before, but not had these issues. But yeah, all seems fine now, just working on converting to https and then maybe moving to using the multiple site manager.

       
rokker's avatar
rokker
175 posts
6 years ago
rokker's avatar rokker

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

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

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.

       
rokker's avatar
rokker
175 posts
6 years ago
rokker's avatar rokker

i think i could use a hand at that, i’m not sure if i’d know what do to…

  • i took a look, tried to repair/optimize database, not sure at all what i’m looking for, situation still the same

i could definitely use help

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

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.

       
rokker's avatar
rokker
175 posts
6 years ago
rokker's avatar rokker

hmmm… none of those solutions will work for me, funding will not be available to me from the site owners.

is it that i can re-create those templates and just delete the nonworking ones?

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

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.

       
rokker's avatar
rokker
175 posts
6 years ago
rokker's avatar rokker

could you expound on this a little more: what am i looking for, and how would i repair myself once i find?

“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.”

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.