WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] main co-author dissapeared after deleting user (2 posts)

  1. jorgitobg
    Member
    Posted 8 months ago #

    Hi,

    We have 8000 posts and we trying co-authors plugin some months ago, is a great plugin!.

    But we need to delete a user and asign they post to other so we try this direct sql command (not wordpress delete from backoffice):

    SELECT ID FROM wp_users where display_name='old_author_name'
    UPDATE wp_posts SET post_author='new_auhtor_id' WHERE
    post_author='old_author_id'

    But after this all post from "old-author" doesnt show any co-authors user on the box... both post list or post edit...

    SCREENSHOTS

    https://docs.google.com/file/d/0B92OgSEGXPrrbkE0T2dfaHZxbE0/edit?usp=drivesdk
    https://docs.google.com/file/d/0B92OgSEGXPrrSDRjdm4ybmFmZW8/edit?usp=drivesdk

    After this I tried to delete "old-user" from wordpress interface but still same problem.

    If I deactivate "co-authors" plugin I verify all posts from "old-user" are well assigned to "new-user". But after activate co-authors the problem back... the co-authors box is empty, and the only solution is to save post by post asigning new co-author, but I cant do this manually on 1000 post.

    Any help please?

    Regards,

    https://wordpress.org/plugins/co-authors-plus/

  2. jorgitobg
    Member
    Posted 8 months ago #

    Hi,

    Problem resolved! I update directly on database tables for updating post without co-author asignated after deleting user.

    CO-AUTHORS
    table: wp00_term_taxonomy
    taxonomy: author
    term_taxonomy_id: id used for relationship

    RELATION POST -> CO-AUTHOR
    table: wp00_term_relationships
    object_id: is the post id
    term_taxonomy_id: is the co-author id

    First you have to found the id author on "wp00_term_taxonomy" and then search using this id on "wp00_term_relationships" so there you have the posts you want change... then you have only to change term_taxonomy_id pointing to new author.

    Hope this helps others because there is no info on internet about this matter with co-authors plugin.

    Regards,

Reply

You must log in to post.

About this Plugin

About this Topic