WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] 2.6 not working with WP 3.3 (32 posts)

  1. Brian Cruikshank
    Member
    Posted 2 years ago #

    When I save an article by another author, the co-author box clears of contents. When I try to add the author back in still comes back blank (author doesn't save).

    I just updated a bunch of posts without realizing this and it shows me (when displaying the post in the theme) as the author of them all.

    It won't let me set it to another author. Tested in FF and Chrome. Please help.

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    What other plugins do you have installed? Does the auto-suggest work and allow you to select authors? Also, can you share screenshots of before and after?

  3. Brian Cruikshank
    Member
    Posted 2 years ago #

    Advanced Access Manager, Advanced Custom Fields, Akismet, CloudFlare, Co-Authors Plus, Contact Form 7, Custom Post Type UI, Digg Digg, Disqus Comment System, Edit Flow, Enable Media Replace, Google Analytics for WordPress, Redirection, Simple Pull Quote, W3 Total Cache, WordPress SEO, WP-DBManager -- all latest versions

    Yes, auto-suggest works fine and I can select the author. It just doesn't save when I save the post--comes back blank.

    before and after saving:
    http://www.brianswebstudio.com/wp-content/uploads/2011/12/before.png
    http://www.brianswebstudio.com/wp-content/uploads/2011/12/after.png

    Thanks

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Odd, that's a server error in the after shot.

    Can you disable all of your plugins except Co-Authors Plus and see if the problem persists? If it doesn't, try re-enabling one by one to see which is causing the conflict

  5. Brian Cruikshank
    Member
    Posted 2 years ago #

    I disabled all plugins, but Co-Authors Plus, tried to save a name, came back blank.

    I disabled Co-Authors Plus (so no plugins enabled), saved the article under correct article, it worked (default wp author select). Then I re-enabled co-authors plus and it shows up blank again.

  6. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Ok, thanks. For now, I'd recommend downgrading to v2.5.3. If the problem still persists, then there's another issue at hand. I can take a deeper look soon.

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Odd, that's a server error in the after shot.

    My bad, it was actually a server error I saw :) I'm not able to reproduce the issue, so I'd be interested in any other details you might be able to include, or whether other users experience the same issue.

  8. evanw
    Member
    Posted 2 years ago #

    I also am experiencing this issue. When I save or publish an article written by someone else, the author is being completely removed and I cannot re-add the author. Regretfully disabling this plugin for now.

  9. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    @evanw Can you help diagnose? In particular, what plugins do you have installed, and does the problem persist after you disable them?

  10. annoiato
    Member
    Posted 2 years ago #

    Same problem here. It happens only with some users and also with old posts. The user disappears but the posts are still assigned to it.

    If I create a new author and delete the old one reassigning the posts the author shows up again.

    This happens randomly with users that were working fine.
    Downgrade doesn't help.

    Thank you for the support.

  11. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Thanks for your detailed report annoiato. I suspect I might know what's going on. I'll test further and report back.

  12. RedVDN
    Member
    Posted 2 years ago #

    Same problem here. For a short-term solution I've found that it's possible to edit the author ID number in the posts database, and that will cause it to show the correct author on posts, though it's still blank in the WP dashboard. Though not a solution for many people as they may not know how or be comfortable with editing the database.

  13. jewishpress
    Member
    Posted 2 years ago #

    We're getting an error when saving saving posts.

    We suspect it has to do with permission levels of the authors.

    We had two authors with the same first & last name (but different usernames), and the one with a lower permission level (but higher id#) wouldn't save.

    After saving it, the article was instead showing the name of the person logged in (who was entering the articles). The editor showed no name where the author would be.

    When we used the name of the author with higher permission level (and lower id#), it saved fine.

    Though, we had another article with a new author (low permission level) and he saved fine.

  14. Marc
    Member
    Posted 2 years ago #

    Does it have to do with:

    // Bail on revisions
    if( $data['post_type'] == 'revision' )
    return $data;

    Should it also check if it's status = published ?

    (I'm jewishpress' developer)

  15. annoiato
    Member
    Posted 2 years ago #

    I found that users with a dot in login name are filtered by sanitize_key that's why it happens only with some users.

  16. jewishpress
    Member
    Posted 2 years ago #

    And we have user names with spaces in them (and others with dots) that we imported from another system.
    And that might to be connected to the problem.

  17. evanw
    Member
    Posted 2 years ago #

    I can also confirm that users with periods in their login names are affected.

  18. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    I found that users with a dot in login name are filtered by sanitize_key that's why it happens only with some users.

    That would make sense. Does the problem only occur for users with periods in their user_logins, or does it occur for others as well?

    If the former, we're using sanitize_key() in two places: coauthors_set_post_author_field and coauthors_update_post(). Can you replace that with sanitize_user(), and see if the problem is resolved? I probably should've used the latter to begin with.

    Thanks folks!

  19. Brian Cruikshank
    Member
    Posted 2 years ago #

    It occurs with spaces too, which most all usernames on my site have (i.e. username of "John Doe").

    I just tried a username without a space and it appears to save correctly.

  20. salenish
    Member
    Posted 2 years ago #

    I have a same problem since i updated both wordpress and your plugin, which i find great by the way. We are running a multi user/editor student magazine site, and all of our registered users have a . in the username due to our internal codex. Please help us, as this now seems to be a mayor problem for us. Thank you.

  21. kenlaws
    Member
    Posted 2 years ago #

    Hi Daniel.

    I, too, have had the "can't change author" problem since upgrading to WP 3.3. I went in and replaced sanitize_key() with sanitize_user() in the two spots you suggested, and now everything is working just fine.

    Have you gotten this feedback from others? Do you plan on making this change in the next release?

    Thank you so much!

  22. Mohammad Jangda
    Member
    Plugin Author

    Posted 2 years ago #

    I just pushed a new version that replaces sanitize_key with sanitize_user.

  23. Mohammad Jangda
    Member
    Plugin Author

    Posted 2 years ago #

    Oh, and forgot to say thanks for all the feedback and testing everyone :)

  24. kaygee79
    Member
    Posted 2 years ago #

    Is anyone else having issues with the same author being listed in the list posts page? looks like it always displays the author of the first post. I just killed the hooks for now.

  25. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Thanks for the fix, Mo :)

    @kaygee79 Can you post a link or a screenshot? In what ways have you modified the code?

  26. evanw
    Member
    Posted 2 years ago #

    Thanks for the update! I tested with a problematic period-in-username user and it appears to work correctly now.

  27. kaygee79
    Member
    Posted 2 years ago #

    @Daniel Bachuber

    screenshot: http://www.fugitivehost.org/co.png

    You can see its the same author listed in the list over and over for all the posts, he not the correct author or co-author on all the posts.

  28. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    @kaygee79 Your author data might've been dropped :( Can you share a screenshot of what author data you see when you edit the post?

  29. kaygee79
    Member
    Posted 2 years ago #

    That's what I thought, but when I go to edit, the correct authors are still there. See attached screenshot: http://www.fugitivehost.org/co2.png

  30. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Interesting. I'd bet the authors column in the manage posts view isn't being unset properly. Do the proper bylines appear on your posts?

    Have you tried deleting the plugin entirely and reinstalling? Also, what other plugins do you have installed and activated? Does the problem persist when they've been deactivated?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic