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

PARTIALLY RESOLVED: Fatal Error from deleting too many members only for certain channels entered in Edit menu - 3.2.0

How Do I?

Rural Intelligence's avatar
Rural Intelligence
18 posts
9 years ago
Rural Intelligence's avatar Rural Intelligence

When I try to open certain channels for editing, I receive the following:

Fatal error: Call to a member function getMemberName() on a non-object in /home/ruralint/public_html/risys/ee/EllisLab/ExpressionEngine/Controller/Publish/Edit.php on line 177

The contents of Edit.php near that section involve the auto-save function. But line 177 seems to stand on its own.

$title .= '
<span class="meta-info">— ' . lang('by') . ': ' . htmlentities($entry->Author->getMemberName(), ENT_QUOTES, 'UTF-8') . ', ' . lang('in') . ': ' . htmlentities($entry->Channel->channel_title, ENT_QUOTES, 'UTF-8') . '</span>';

This is an upgraded version, from 2.7.3. I am concerned about database corruption, but am open to suggestions for investigation.

This copy of the site is not live yet.

[Addendum and partial solution] I had purged all the member names from the Members lists, as we no longer support any services only for those who have created an account. This seems to be what caused the problem. I used the following code, which worked fine for getting rid of all my “Pending” members in ID=4, but using ID=5 and the same code is what apparently broke the Edit.php code.That is - Folks, do not do this!!

DELETE FROM exp_member_data where member_id in (select member_id FROM exp_members where group_id = 5) LIMIT 1000000
DELETE FROM exp_message_folders where member_id in (select member_id FROM exp_members where group_id = 5) LIMIT 1000000
DELETE FROM exp_member_homepage where member_id in (select member_id FROM exp_members where group_id = 5) LIMIT 1000000
DELETE FROM exp_members where group_id = 5 LIMIT 1000000

I did get rid of about 2/3rds of them using the following, which worked fine:

Delete from exp_members where group_id = 5 AND member_id not in (Select member_id From exp_member_data where last_visit > 0)

That left 12,000 I am not certain how to purge safely (thus the partial solution title), but it is far less than we had before! (Almost 48,000!)

Terry

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

It looks like you have some authors who do not have a member account anymore, but did not get reassigned. Deleting member records manually is highly discouraged, as there are a number of associations you could leave orphaned, which sounds like what has happened here. Do you have a backup you could work from? Your best bet would be to use the bulk action on the form to delete members in bulk.

       
Rural Intelligence's avatar
Rural Intelligence
18 posts
9 years ago
Rural Intelligence's avatar Rural Intelligence

Derek,

I did have a backup, and restored things to working again - love to do backups!

Ah, yes - that is likely it – orphaned authors (we’ve been at it 10 years, so of course!)

When I took out the ones who had signed up but never returned, nothing got damaged. But that still left 12,000 behind.

Will the bulk form manage to leave old authors alone? (I feel a query that matches author names with member names might be tricky…)

What you mention definitely rules out a simple date-based removal. I guess we’ll have to review our authors and perhaps put them all into a special “retired” membership group, and then attempt weeding after that. (With backups in place, of course!!!)

Terry

       
Rural Intelligence's avatar
Rural Intelligence
18 posts
9 years ago
Rural Intelligence's avatar Rural Intelligence

Derek,

We just migrated from another server, so I could do some tests on that older server first without risking messing any viewers’/readers’ or writers’ access up.

Not sure where the bulk tool is in here… I’ll hunt around.

Terry

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

Bulk tools appear as form options when you have rows select, so in your Members area, you’d just filter to the ones you want to delete, click the checkbox at the top to select them all, and then use the Delete action.

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

If you try to delete members that have records, ExpressionEngine will offer you to reassign them to another member. Entries must have authors, so either the old members need to still exist (even if you remove them from the authorlist), or you will need to reassign those entries to another member.

       
kokako's avatar
kokako
57 posts
9 years ago
kokako's avatar kokako

I think I was having a version of this problem, but pertaining to content creators.

I had deleted old content editor accounts that, I guess, were connected to revisions.

I seemed to have fixed it by disabling versioning for the channel.

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

Are you getting an error message Kokako? The revisions should be reassigned as well.

       

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.