• Resolved dilinger

    (@dilinger)


    We’re seeing a bug with Molongui authors plugin and the Newspaper theme and non-guest authors.

    We have a post that was edited by a different user (Stephen, who is in the users table with an ID of ‘6’), but Stephen set the post author to Futurewise (who is also in the users table, with an ID of ‘113’). So inside the database, the posts table has a post_author of ‘6’ for that post. The postmeta table has the _molongui_author and_molongui_main_author keys set to ‘user-113’ for that post.

    When you look at the post itself, everything is fine:

    https://www.theurbanist.org/2020/09/16/wonkabout-washington-the-climate-change-land-use-nexus-and-washington-cant-wait/

    However, the author link on the main page is broken:
    https://www.theurbanist.org/

    There, you can see that even though the byline says “Futurewise”, clicking on it goes to https://www.theurbanist.org/author/stephen-fesler/

    So for some reason, wordpress’s default author function is being used when grabbing the author page link, rather than Molongui’s function being used. Any ideas on what’s causing that?

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Having the same issue with my Newspaper theme also. Even the author image it picks the user who publish it rather than Molongui’s one.

    Thread Starter dilinger

    (@dilinger)

    By the time someone looks into this the post that I highlighted will probably have shifted as new posts are made, but there are other posts where this is happening as well. For example, the https://www.theurbanist.org/2020/09/18/cascadia-needs-to-change-its-ways-to-keep-from-burning-up/ byline link should go to /author/editorial/ but instead goes to /author/dmtrumm/ when viewed from https://www.theurbanist.org/.

    Plugin Author Molongui

    (@molongui)

    Hi @dilinger and @thenesh,

    thanks for reporting the issue. And thanks for providing such detail. We have being trying to reproduce the issue on our testing server but we couldn’t. It seems to be working fine on our end.

    There is one thing @dilinger pointed out that shouldn’t be like that, though:

    the posts table has a post_author of ‘6’ for that post. The postmeta table has the _molongui_author and_molongui_main_author keys set to ‘user-113’ for that post.

    The correct behavior in this case would be to have all three fields set to ‘user-113’. So @dilinger could you please try to edit that post (id=97472) doing this:

    1) remove author 113 from the list of authors (for that post)
    2) add a different author, no user-6 nor user-113. And save post.
    3) Refresh the edit-post screen. Does the assigned author remains as you configured in step 2? If so, go to the next step.
    4) remove the assigned author from the list of authors.
    5) add the author user-113 as the author of that post. And save the post again
    6) now go check the database. What is the value for the 3 fields you pointed out on your ticket (post_author and postmeta values)?
    7) Is the link on the homepage working now?

    Please let us know so we can keep looking into this.

    Thread Starter dilinger

    (@dilinger)

    I tried what you suggested.

    First, I removed the author and replaced it with another guest user (_molongui_main_author and _molongui_author as ‘guest-97710’ in the postmeta table). However, in the posts table, post_author is still set to ‘6’.

    This saved properly, so I went on to step #4

    I removed the user and re-added the 113 user, and saved it. Now the postmeta table has _molongui_main_author and _molongui_author as ‘user-113’, and the posts table has post_author as ‘113’. Now when I view the main page (well, 3rd page at this point), the byline links to the correct author page.

    Let me see if I can figure out how to reproduce this when creating a new post…

    Thread Starter dilinger

    (@dilinger)

    Okay, I was able to reproduce it. I created a new post as my own user (122), and saved a draft. At this point the posts table had a post_author of ‘122’, and the postmeta table had ‘user-122’ for _molongui_author/_molongui_main_author.

    Then I went back into the post to edit it, deleted myself as an author, and selected a guest author from the author pulldown list. Then I saved a draft. At this point, the posts table *still* had a post_author of ‘122’, while the postmeta table has ‘guest-97710’ for _molongui_author/_molongui_main_author. Now they’re out of synch, and if I publish the link will be wrong.

    Plugin Author Molongui

    (@molongui)

    Hi @dilinger,

    thanks for checking all that! It is actually correct to now have ‘user-122’ in the ‘post_author’ field for that last added post. Did you actually publish that post and check what the byline displayed? Was it wrong? What did it display, user-122 name or guest-97710’s?

    Thread Starter dilinger

    (@dilinger)

    I realized that I screwed up that last test. The problem is with normal, not guest users. So reproducing:

    1. New post (as me, user id 122), save as a draft. Currently the posts table with post_author of 122, and postmeta table author fields as ‘user-122’.

    2. Go back to the draft post, delete my authorship, add Futurewise (user id 113) as the author. Save draft. At this point, the posts table has a post_author of 122, and postmeta table author fields are ‘user-113’.

    3. Publish. Now on the main page the post author says “Futurewise” but the link is to my author page.

    This *only* happens with some users. It seems like the difference between the users that work properly and the ones that don’t are whether the user is an “Author” or a “Contributor”.

    If I set a user (let’s call them “Frank”) role as Author, and then edit the post and set Frank as the author: the post_author field in the posts table contains 122 (me) and the link is incorrect. If I then edit the post to set the author back to me, set Frank’s role as a Contributor, and then edit the post again to set the author to Frank: the post_author field in the posts table contains Frank’s ID and the link is correct.

    So it seems to only happen for users whose role is Author.

    Plugin Author Molongui

    (@molongui)

    Hi @dilinger,

    thanks for testing that and providing such detail. We have followed the provided steps in order to reproduce the issue, but on step 2 we have post_author field updated correctly. Even assigning a user with role author.

    I think you didn’t mention, but I guess you are running latest plugin version (4.2.3), right? If you don’t, please update and check if the issue persists. If you do, my guess here is that either your theme or a third party plugin is preventing that field to be updated under certain circumstances. Could you check for a plugin conflict? Here you have a step by step guide on how to do that.

    Depending on the number of active plugins you have, it might take a while to carry on the whole check. You can start by disabling all plugins but ours and switching to a default WP theme, like Twenty-twenty. And then check if the issue persists. If it doesn’t, activate all those plugins that you think doesn’t have anything to do with your posts. Then check again. If the issue shows up again, one of the activated plugins is the one to blame. If the issue is gone, then you can keep checking as described in the referenced support guide.

    Please let us know what your findings are so we can look into it and find a fix.

    Thanks!

    Thread Starter dilinger

    (@dilinger)

    Yes, we’re running the latest plugin and wordpress versions (auto-updates are enabled). This is a live site, so it will take me a little while to set up a dev environment to test out stuff without plugins.

    Plugin Author Molongui

    (@molongui)

    Hi @dilinger,

    Thanks for confirming. And sure, no problem, take your time. We will keep this ticket open.

    Hi @molongui ,

    I habe the same problem: After saving the article freshly, the author ist shown correctly. In my opiniion the database-updater changes the correction later, so the authorship is shown wrong again later.
    Is there a solution for that?

    Best regards
    JWH

    Plugin Author Molongui

    (@molongui)

    Hi @jwhberlin,

    Which is exactly the issue you are experiencing? Could you please provide some detail on how we can reproduce it? Are you using the latest version of the plugin?

    Latest version (4.2.9, as of now) includes a fix that addresses some weird behaviors with post authors being saved correctly into database but wrong displayed on the frontend because of an object cache provided from some hostings.

    Hi Molongui,

    I used the latest version.
    In my case the authors where shown, but wrong ones. Mostly the editors and not the authors where shown. I changed it with deleting the author, saved it. Then I added the author and saved again. It was okay for some hours, but later the editor was shown again.

    My customer was not amused because it is an important function. So I had to deactivate the plugin.

    Best regards
    Jwh

    Plugin Author Molongui

    (@molongui)

    Hi @jwhberlin,

    Thanks for providing more detail. Can’t be sure, but that issue reassembles a lot to the one I mentioned as fixed in version 4.2.9. Would had helped to know which version you had installed. If it wasn’t 4.2.9, probably and update would have fixed the issue. Anyway, thanks for reporting it and so sorry you give up on the plugin.

    I’m closing the ticket now, but feel free to re-open it if anything.

    Best,
    Monlongui Supoort Team

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘link to author page is incorrect when listing posts’ is closed to new replies.