Bug report: Here, for example, there are 5 comments. But if you go back to the homepage it shows that there are 4 comments in the thread.

Suggestion: I think it will be super useful to make the composer/commenting area always visible in the comments iframe.

    Is any demo available?

    EDIT: Oh I see now demo page.

    Another question:

    Here: https://wordpress-flarum-demo.http418.ch/2020/02/13/עברית/ we can see that iframe have a fixed height with an empty/blank space if there are no comments. Is there any fix for this? I mean fix for iframe height?

    Also, what will happen to old Wordpress posts? Because now I have about 2000 posts... This extension will create new thread for every old post or only for new one? Can users comment on old posts?

    I'm asking this because I'm very interested in purchasing this extension.

      danielunited I know this method can be used. It's just about two language packs I'm hosting, I hope my language pack can support this extension, so that users who bought this extension will be convenient.

      • [deleted]

      @clarkwinkelmann since the upgrade to 1.2.2, I am getting random HTTP 500 errors, and see the below in the logs

      [2020-02-20 10:55:33] production.ERROR: BadMethodCallException: Call to undefined method Kilowhat\Wordpress\WordpressSummaryPost::formatContent() in /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/illuminate/support/Traits/ForwardsCalls.php:50
      Stack trace:
      #0 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/illuminate/support/Traits/ForwardsCalls.php(36): Illuminate\Database\Eloquent\Model::throwBadMethodCallException('formatContent')
      #1 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/illuminate/database/Eloquent/Model.php(1610): Illuminate\Database\Eloquent\Model->forwardCallTo(Object(Illuminate\Database\Eloquent\Builder), 'formatContent', Array)
      #2 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Database/AbstractModel.php(202): Illuminate\Database\Eloquent\Model->__call('formatContent', Array)
      #3 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/v17development/flarum-seo/src/Managers/Discussion.php(101): Flarum\Database\AbstractModel->__call('formatContent', Array)
      #4 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/v17development/flarum-seo/src/Managers/Discussion.php(41): V17Development\FlarumSeo\Managers\Discussion->createTags()
      #5 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/v17development/flarum-seo/src/Listeners/PageListener.php(150): V17Development\FlarumSeo\Managers\Discussion->__construct(Object(V17Development\FlarumSeo\Listeners\PageListener), Object(Flarum\Discussion\DiscussionRepository), '1414-ring-makes...')
      #6 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/v17development/flarum-seo/src/Listeners/PageListener.php(116): V17Development\FlarumSeo\Listeners\PageListener->determine()
      #7 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Frontend/Frontend.php(63): V17Development\FlarumSeo\Listeners\PageListener->__invoke(Object(Flarum\Frontend\Document), Object(Zend\Diactoros\ServerRequest))
      #8 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Frontend/Frontend.php(55): Flarum\Frontend\Frontend->populate(Object(Flarum\Frontend\Document), Object(Zend\Diactoros\ServerRequest))
      #9 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Frontend/Controller.php(32): Flarum\Frontend\Frontend->document(Object(Zend\Diactoros\ServerRequest))
      #10 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Frontend\Controller->handle(Object(Zend\Diactoros\ServerRequest))
      #11 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
      #12 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
      #13 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/LogoutOverrideMiddleware.php(16): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #14 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Kilowhat\Wordpress\Middlewares\LogoutOverrideMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #15 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/LoginWarningMiddleware.php(21): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #16 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Kilowhat\Wordpress\Middlewares\LoginWarningMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #17 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/kilowhat/flarum-ext-wordpress/src/Embed/WordpressEmbedNotFoundMiddleware.php(18): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #18 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Kilowhat\Wordpress\Embed\WordpressEmbedNotFoundMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #19 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(56): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #20 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ShareErrorsFromSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #21 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #22 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #23 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(23): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #24 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #25 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #26 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #27 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #28 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #29 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #30 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #31 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php(46): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #32 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CollectGarbage->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #33 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #34 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #35 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #36 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #37 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #38 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #39 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #40 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #41 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #42 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #43 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #44 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #45 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
      #46 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
      #47 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
      #48 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
      #49 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/flarum/core/src/Http/Server.php(44): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
      #50 /var/www/vhosts/phenomlab.com/forum.phenomlab.com/index.php(22): Flarum\Http\Server->listen()
      #51 {main}  

      Could you take a look ?

      Thanks

      EvelinaAdamovi Also, what will happen to old Wordpress posts? Because now I have about 2000 posts... This extension will create new thread for every old post or only for new one? Can users comment on old posts?

      Comments from old posts will be gone and stay without any new comment threads. Only new posts will create new comments threads. Users can't comment on old posts

        • [deleted]

        hrvoje_hr Users can't comment on old posts

        That's not technically true. If you disable the ability to comment on a post, save it, then re-enable and save again, this will create a forum topic which can be replied to.

          hrvoje_hr if you disable and enable comments on old posts it works (maybe whenever the post is updated?). Maybe there's a WordPress plugin or something that just updates all of the posts one time. That way old posts will have comments.

            • [deleted]

            danielunited if you disable and enable comments on old posts it works (maybe whenever the post is updated?). Maybe there's a WordPress plugin or something that just updates all of the posts one time. That way old posts will have comments.

            Correct.

            [deleted] That's not technically true. If you disable the ability to comment on a post, save it, then re-enable and save again, this will create a forum topic which can be replied to.

            Oh, I didn't know that. However, doing that on 2k+ posts would only spam the forum. But it's great to know that it's possible.

              • [deleted]

              • Edited

              hrvoje_hr That's true. I found this out by trial and error yesterday. The issue I have is that I collect news sources from around the world on an RSS feed which then populates WordPress and creates posts. These aren't automatically created on the forum (which they should be) unless I disable then enable comments on each of them.

              Not great.

              However, if you have WordPress CLI, then you should do

              wp post list --format=ids | xargs wp post update --comment_status=closed

              then

              wp post list --format=ids | xargs wp post update --comment_status=open

              On a scheduled basis, or periodically to resolve this. It's not very clean, and on a blog with thousands of posts, it could place an unprecedented load on your server (ideally, you'd restrict this to say the last 10 posts etc). I'd much rather that the WordPress plugin from @clarkwinkelmann handled this on the fly.

              EDIT - and I can validate that the commands I posted work great. You need to install WP CLI if you are permitted to do this by your host (or on your own VPS if applicable) - see here for a working guide - https://wp-cli.org/

              By accident, I discovered today that a lot of my users can't see any WP commenting topics if there are no comments on them. At the same time when that topic gains any comment, it's shown to them.

              The same goes for guests. Empty topics don't show to them.

                • [deleted]

                hrvoje_hr Looks like we are uncovering some bugs here... 🙂

                • [deleted]

                Found another bug. When using the PrettyMail extension, the content is missing from the email. This needs to be rectified also.

                  Wow... So many messages from you guys. I'll try to answer everything.

                  hrvoje_hr I discovered today that a lot of my users can't see any WP commenting topics if there are no comments on them

                  That's actually a feature. By default new discussions don't get the "last reply" relationship set so that creating thousands of discussions for example (as mentioned above), won't render your forum hopepage unreadable. As soon as somebody replies from the Wordpress side, the discussion will have a last reply, and will rise to the top.

                  This behavior can be changed by setting Set the summary post as the last post of new discussions https://kilowhat.net/flarum/extensions/wordpress#set-the-summary-post-as-the-last-post-of-new-discussions

                  [deleted] When using the PrettyMail extension, the content is missing from the email

                  You mean the content of the Wordpress excerpt ? Just like I had to manually fix it for summaries in the frontend, I'd need to create additional logic here as well. Maybe that's what is linked to the error you shared above.

                  Which extension triggers an email that contains the first post ?

                  hrvoje_hr Comments from old posts will be gone and stay without any new comment threads. Only new posts will create new comments threads. Users can't comment on old posts

                  As correctly discussed above, the only way to create the missing discussions is to enable and disable commenting at the moment. If you don't have "set first post as last reply", it shouldn't spam the forum to create thousands of threads as all those new threads will appear at the very bottom of the discussion list until someone replies.

                  If there's enough interest, I could take a look at what would be necessary to automate the import for new users.

                  danielunited Bug report: Here, for example, there are 5 comments. But if you go back to the homepage it shows that there are 4 comments in the thread.

                  I will investigate.

                  danielunited Suggestion: I think it will be super useful to make the composer/commenting area always visible in the comments iframe

                  I'll see what I can do. The fixed height and the current iframe layout is a compromise to get everything working. I tried making the height flexible, but Flarum wouldn't play nice with it and the Composer would end up out of screen.

                  [deleted] I'm using RSS feeds to auto populate the WordPress post tables (via a plugin), but these new posts do not appear in Flarum unless I either

                  I'll investigate that. My extension uses the post_updated and post_deleted Wordpress hooks. post_updated is always called when you manually create a post because you need to first save it, then publish. I might need to listen to another hook for new posts that are created in a single action.

                  Littlegolden this premium extension has no public documents on github. . . I don't know where to look for .yml files

                  Translating premium extensions is something that's not been discussed much until now... I have no problem sharing the english YML files with you. The problem is that on each update I might add or remove strings, and I'd need to send them to translators again. I'd need some way of making that file public, without giving me any extra work to keep it updated. Right now it's in a private GitHub repo with the remaining of the extension source code so I'm not sure what I can do.

                    • [deleted]

                    • Edited

                    clarkwinkelmann You mean the content of the Wordpress excerpt ? Just like I had to manually fix it for summaries in the frontend, I'd need to create additional logic here as well. Maybe that's what is linked to the error you shared above.

                    Yes, exactly that.

                    clarkwinkelmann Which extension triggers an email that contains the first post ?

                    FoF/Subscribed I think...

                    clarkwinkelmann If there's enough interest, I could take a look at what would be necessary to automate the import for new users.

                    I think this is needed to be honest.

                    clarkwinkelmann I'll investigate that. My extension uses the post_updated and post_deleted Wordpress hooks. post_updated is always called when you manually create a post because you need to first save it, then publish. I might need to listen to another hook for new posts that are created in a single action.

                    Good point. I think it's a standard hook, but the plugin I use to perform this is FeedWordPress

                    clarkwinkelmann That's actually a feature. By default new discussions don't get the "last reply" relationship set so that creating thousands of discussions for example (as mentioned above), won't render your forum hopepage unreadable. As soon as somebody replies from the Wordpress side, the discussion will have a last reply, and will rise to the top.

                    I know that, you even develop that by my request and I have it turned on. The thing is that the topic is always created and I as an admin can see it, but guests and some of other users can't see it. Even if they visit it as a link they get error 404.

                    You can check it yourself. I can see link bellow, but you will get error 404.


                    At the sam time, this is topic of the same type and you can see it because it already have comments.


                      hrvoje_hr you even develop that by my request and I have it turned on

                      ahah oops I missed that 🙉

                      This must be related to Flarum considering a discussion deleted if it has zero comments. Because the Wordpress summary is not a comment post, it's not counted.

                      I had a fix implemented in the extension already. Could you mabye try to disable and re-enable the extension ? Maybe there's a priority issue with another extension. Or there could well be an incompatibility issue with another extension. I think the issue isn't present on the demo website. Maybe it's linked to an extension like byobu that also alters the permissions for listing discussions.