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

relationship error after upgrade

Development and Programming

NetSolid's avatar
NetSolid
2 posts
about 7 years ago
NetSolid's avatar NetSolid

I’ve successfully upgraded a EE 2.11.9 site to 3.5.16.

After upgrading to 4.3.1 I get a fatal error when I’m calling a parents relationship field in the template like:

{parents field="relationship_field"}
 {parents:title} - {parents:field1} - {parents:field2}
{/parents}

The error is this:

Fatal error: Uncaught Error: Call to a member function getValues() on null in /path_to_hosting/public_html/new/system/ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php:1156 Stack trace: #0 [internal function]: EllisLab\ExpressionEngine\Model\Channel\ChannelEntry->getModChannelResultsArray() #1 /path_to_hosting/public_html/new/system/ee/EllisLab/ExpressionEngine/Library/Data/Collection.php(85): call_user_func_array(Array, Array) #2 [internal function]: EllisLab\ExpressionEngine\Library\Data\Collection->EllisLab\ExpressionEngine\Library\Data\{closure}(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry)) #3 /path_to_hosting/public_html/new/system/ee/EllisLab/ExpressionEngine/Library/Data/Collection.php(244): array_map(Object(Closure), Array) #4 /path_to_hosting/public_html/new/system/ee/EllisLab/ExpressionEngine/Library/Data/Collection.php(93): EllisLab\ExpressionEngine\Library\Data\Collection->map(Object(Closure)) #5 /path_to_hosting/public_html/ne in /path_to_hosting/public_html/new/system/ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php on line 1156

any ideas what could be wrong?

       
Rob Games's avatar
Rob Games
38 posts
6 years ago
Rob Games's avatar Rob Games

@netsolid - I’m running into the same issue - Did you manage to resolve this?

       
Rob Games's avatar
Rob Games
38 posts
6 years ago
Rob Games's avatar Rob Games

In case anyone runs across this issue - For me, it turned out that two of my parent entries were missing the ‘author_id’ in ‘exp_channel_titles’ table.

To see if this is your issue, using phpMyAdmin or run a SQL query to search where author_id = 0 from exp_channel_titles

May be related to this article

       
NetSolid's avatar
NetSolid
2 posts
6 years ago
NetSolid's avatar NetSolid

Thanks, that resolved it for me. Although I didn’t have missing author_id’s but author_id’s of deleted authors. I replaced them with existing author_id’s and everything seems to be working again.

       

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.