Re: Deleting Users results in Malformed SQL Syntax
Following the error, the page displays fine with the exception of user roles and the link to the user profile. All are listed as invalid, with the exception of the user that is logged in.
The malformed SQL request is listing the user ID’s in the thread. The ID’s are in order of post appearance. Once an anonymous post is in the sequence it fails to insert the userID.
Another example is below:
SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (17,23,1,18,) /* WP_Users::append_meta */
The fifth post in the topic is an anonymous poster with no corresponding wp_user or wp_usermeta information but it appears a null is inserted in the request rather than the legacy user ID.
If I look into the database and examine topics and posts made by anonymous users the legacy user ID’s are there. bb_posts has the old user IDs for the posts made by deleted users . Somehow, this data isn’t making it into the request.