I'm using this on a site that we are running and it's working really nicely.

We only use it for comment integration, not really interested in SSO, as we don't have multiple WP authors who would also be using the forum.

There are a few things that I don't quite get though, and one of the must urgent and strange is the difference in the number of comments on WP and in Flarum. I'm not sure if it's something with my implementation (but I'm fairly sure not) or a bug, or by design for some reason, but seems wrong whichever case it is.

See attached images below for an example post - the number shows up correctly in WP, but is always one less than the actual comment count in Flarum.

In Flarum:

In WordPress:

    JohnP thanks for the feedback!

    Can you confirm which version of the Wordpress plugin and extension version you are running?

    An instance of this issue was fixed in version 1.2.1 of the Flarum extension one year ago. But maybe there has been a regression.

    It might also happen if an extension adds some new post content. Are all discussions impacted, or only some with particular content (a custom post type from another extension, soft deleted posts, ...)?

      clarkwinkelmann

      WP plugin 1.4.0
      Flarum ext 1.6.3

      It's the same on all discussions.

      It's as if it simply doesn't count the first reply after the plugin creates the post.

      It also doesn't list the user or time of the first reply under the discussion on the forum index page, it only displays them from the second reply. The reply is there in the discussion thread but not counted somehow.

        JohnP in Flarum it's sometimes a bit confusing because the first post is treated differently.

        The number shown on the Flarum discussion list is the number of replies, which is the number of comment minus 1 for the first post.

        Things start to get complicated with custom post types, because custom post types aren't comments, and as such aren't counted. The Wordpress extension is the only extension in the Flarum ecosystem right now that uses a custom post type as the first post of a discussion, and this leads to various issues, most of which have been patched in previous updates. But maybe there's still something wrong with Flarum trying to subtract one from the number of comments that doesn't include the first post.

        Can you clarify how many replies you actually see in the discussion, without counting the Wordpress summary? Are there 2 or 3 user comments in reality?

        JohnP It also doesn't list the user or time of the first reply under the discussion on the forum index page, it only displays them from the second reply

        If you mean the author/date of the Wordpress summary post (first "post" in the Flarum discussion) isn't shown in the discussion list, there's actually a setting for that https://kilowhat.net/flarum/extensions/wordpress#set-the-summary-post-as-the-last-post-of-new-discussions If you meant something different, can you clarify? It would be odd if the first user comment was causing an issue.

          clarkwinkelmann

          I'm going to include a couple of screengrabs below for a post that was created by the plugin and has just one reply, which makes it easier to see the issue.

          • The number of replies in a discussion is the number shown as the comment count in WordPress.
          • The WP summary post (autocreated first post) is not counting in the number of replies in Flarum, which is as it should be.
          • The number of posts (original post and replies) is correct in the scrubber, etc. when viewing the post.
          • On the forum index page it is not showing the author and date for the first comment, i.e. 'XX replied XX hours ago' and the replies count has not increased to 1 but remains at 0.

          Once a post receives a second reply, then the index page shows the commenter name and date for the second reply as it should, but the replies count stays one lower than it should be.


            JohnP I need to try to replicate this on my forum. Unfortunately I have no idea what could cause this right now.

            If it doesn't happen with the WP extension only (I haven't tested yet), then it could also be caused by a third-party extension. But I need to confirm whether it happens with just the WP extension or not first.

              JohnP

              For this one...

              That number is the number of unread posts in the discussion, not the total number. 🙂

                davwheat

                No, that's the total number of replies - if it was black it would be unread replies.

                Even if that were the case though, it would still be missing the fact that there has already been a reply in the last post text which should read in this example - 'Egle-K replied X hours ago'

                  clarkwinkelmann If it doesn't happen with the WP extension only (I haven't tested yet),

                  I can throw up another WordPress and Flarum install with no extensions or plugins to test this out, I'll give it a go tomorrow.

                  7 days later

                  clarkwinkelmann If it doesn't happen with the WP extension only (I haven't tested yet), then it could also be caused by a third-party extension. But I need to confirm whether it happens with just the WP extension or not first

                  I've since tried this on a clean WP and Flarum install, no other plugins or extensions on either and got exactly the same issue, so I'm pretty sure it's not a conflict with anything else.

                  Also... I know everyone hates this question, but any idea when this might be b16 ready (or does it already just work)?

                  8 days later

                  Flarum extension version 1.6.4 - March 29, 2021

                  • Flarum beta 16 compatibility

                  This version can only be installed on Flarum beta 16.

                  The new version will automatically be installed when you migrate to Flarum beta 16 with Flarum's official instructions.
                  Requires version 1.4 or greater of the Wordpress plugin.

                  25 days later

                  Is it possible to make it working on a wordpress multisite installation (comments not other stuff) ?
                  I know Discourse have this possibility. Just want to have this possibility too with Flarum

                    Amarok I have not tried yet. I've never worked with multisite installations, so I would have to look into that.

                    If Wordpress automatically splits the settings per-site, maybe it works out of the box? Have you tried?

                      clarkwinkelmann tried and have a 500 error.. so don't work at this moment. It worked perfectly on the simple installation ^^
                      I did a sub-directoy multisite to have something really clean for a multilanguage website.

                      It's not a pre-requist to stays on flarum, but it would be great if it's possible to make you beautiful extension working on a wordpress multisite installation 🙂

                        Amarok I'm adding that to my TODO, I'll check how feasible supporting multisite is. I can't promise when I'll get to it though 😅 I still want to finish the Formulaire update first.

                          8 days later

                          Any simple way to get the forum post to pull the featured image from WP as well as the post or excerpt?

                            JohnP not at this time, but I could add it.

                            Right now it only includes pictures that are inside of the post body (if not filtered out).

                            How would you like the featured image to be shown in Flarum? Full width above the excerpt?