I have issue when trying to install:

In PackageDiscoveryTrait.php line 364:

Could not find a matching version of package kilowhat/flarum-ext-wordpress. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

EDIT: I forgot to update the composer.

After installation backoffice is not working because its url pointing to main domain insted of forum.

Must be: ***en.com/forum/backoffice/extension/flamarkt-backoffice

Now: ***en.com/backoffice/extension/flamarkt-backoffice

Also I'm not seeing any wizard.

How to fix it?

    Anomalien I am aware there might be a problem with subfolder installation. I have not been able to test yet. There is unfortunately no workaround. Either rollback to 1.x if you haven't run the migrate command yet, or manually change the settings by editing the database. If you ran the migrate command, everything should continue to work as before even if you can't access the settings.

      clarkwinkelmann Can you please tell me how I can rollback to 1.x? Also do I need different wordpress plugin (not 2.0) to work with 1.x version?

      I'm still confused. So if I have my flarum on domain.com/forum instead of domain.com I can't use the plugin?

      I also want to clarify that I did not even go through the wizard tab as nothing appeared. I couldn't set the settings.

        Flarum extension version 2.0.1 - June 1, 2024

        • Require backoffice 0.1.4, move WordPress settings page back to Flarum admin panel.

        If you see "Problem loading user selection dropdown" message in the admin panel, disable and re-enable the WordPress Integration extension.

        The reason the settings were moved to the Backoffice screen in 2.0.0 was because I wanted to avoid updating Backoffice and the components needed by the WordPress Integration were only available on the Backoffice screen. Now that I had to release a bugfix to Backoffice for subfolder support, I also made the components available in the regular admin panel. Backoffice must remain activated, but you don't need to visit its dedicated screen anymore.

        If you are still on 1.x version, follow the upgrade instructions in the 2.0.0 release. If you are already on 2.0.0, just clear the cache with php flarum cache:clear. This update is only for the Flarum extension. The WordPress plugin doesn't have a 2.0.1 release.


        If you haven't already updated your forum to use the new Flarum.org repository instead of Extiverse, see the Instructions button at the top of https://flarum.org/dashboard/subscriptions and the other discussion on this forum https://discuss.flarum.org/d/32812-the-future-of-flarum-in-2023-balancing-open-source-and-success/61


        Anomalien update backoffice and/or the WP Integration extensions, the problems are now solved.

          Now everything works perfectly. Thank you for the quick fix. This is a really nice plugin.

          Question related to: Role to Group Synchronisation https://prnt.sc/oAjCyl5xTH01

          If I change a user's role in Wordpress, should this plugin automatically change the forum user group?

          If this is the case, then nothing happens. After changing the user's role on the site, nothing happens on the forum.

          Also, is there any way to remove target _blank from forum posts?

            Anomalien After changing the user's role on the site, nothing happens on the forum

            Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum. Do the other features work correctly?

            If you have SSH access you could try running php flarum kilowhat-wordpress:sync:users <wordpress user id> (replace <wordpress user id> with the integer ID) in the Flarum folder to force a user synchronisation and see if anything happens.

            Anomalien Also, is there any way to remove target _blank from forum posts?

            You mean the link back to the WordPress post in the preview? I currently don't have any setting for that, but I could add something with an update.

              clarkwinkelmann

              Hi all, I successfully updated two Flarum installations with WP integration to the new 2.01 extension.

              Given that I generally find the "update instructions" less than clear, I thought I'd provide the details of what I did to complete this:

              1) you should first follow the information Clark linked to at https://flarum.org/dashboard/subscriptions
              2) I had to log in with my Extiverse email info to get to an account page to go there
              3) I then followed the steps of the Instructions BUTTON to create a new token for the subscription
              4) I then used my hoster CPanel / Terminal program to get to the folder of the Flarum install
              5) I then ran the composer command with the super long token after copying it there and pasting it as plain text
              6) I then ran normal Flarum update commands to update the whole installation
              7) this picked up Clark's new 2.01 version and higher Backoffice version automatically
              8) I then was able to log in as usual as an Admin and confirm the WPI update was successful, with the WPI panel again showing under the normal Admin tabs, and it confirmed that my SSO settings were working properly

              I think that was about it, and it is working as expected.

              Thought I'd share, and I continue to highly recommend ADDING a forum to a WordPress site with this WPI extension and Flarum itself!

                clarkwinkelmann You mean the link back to the WordPress post in the preview? I currently don't have any setting for that, but I could add something with an update.

                Yes. I think sometimes it's better to use without _target for "smoothness". This creates the illusion of the two systems as one.

                clarkwinkelmann Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum. Do the other features work correctly?

                Understood. But for some reason synchronization does not occur. I'll try to update manually from the consoles and then I'll write.

                One small bug: If you turn "Only allow WordPress login" on and off, forum registration will still be closed, but it must be opened.

                Btw, here's interesting solution for iframe height: https://iframe-resizer.com/introduction/

                  Anomalien If you turn "Only allow WordPress login" on and off, forum registration will still be closed

                  This is intentional. Because first off it's complicated to "remember" the value of the setting before the change, I would have to store that in the background, and make sure it's still valid even if the extension gets disabled and re-enabled later, or some other change. And since the sign up setting can still be changed anytime by the admin, I would also need to decide what to do if it was manually changed in the meantime. And second even if I went the trouble to do all this, I still don't want to unexpectedly re-open registrations if the forum owner doesn't expect it, so I would have to add a whole UI to ask the admin whether they wish to re-enable sign up.

                  So to save all this work I decided to not implement sign up re-opening, leaving it for the admin to decide.

                  But I kept the auto-close because there's no reason to keep it open when enabling the WP-only sign up, and if the step was skipped it would allow users to circumvent the protection they think they just enabled.

                  Anomalien here's interesting solution for iframe height

                  I am familiar with that library. It was in fact part of the plugin in one of the early betas. It was also part of the flarum/embed extension but I think it's not included anymore looking at the source code.

                  But it doesn't work correctly with Flarum's discussion infinite scroll. If the iframe expands, it completely breaks the ability to load more pages. And if it somehow worked, then it would prevent reaching the footer of the WordPress site if a discussion has thousands of comments.

                  I am researching solutions to make the iframe more seamlessly integrate with WordPress. Unfortunately it seems like we have to choose between infinite scroll and auto height, and keeping Flarum's built-in infinite scroll is the least work and least risky solution for now.

                  I will probably add options for a paginated iframe view in the future, as well as maybe a "summary" view that only shows the top comments and the composer and forces you to open the Flarum page to browse through the full list.


                  NetConfig it's unfortunate that the Extiverse-Flarum.org migration happened right about at the same time as my WPI V2 release, as this causes a number of extra steps to be needed 😅 I haven't re-written my upgrade guide since those are really 2 different things, and if you have multiple Extiverse premium extension you luckily only need to update the Extiverse repository once.

                    Got it.

                    clarkwinkelmann I will probably add options for a paginated iframe view in the future, as well as maybe a "summary" view that only shows the top comments and the composer and forces you to open the Flarum page to browse through the full list.

                    Great ideas.

                    clarkwinkelmann

                    Thanks Clark - yeah, the timing of multiple "new" things happening at once made it more interesting.

                    I would recommend to all users who are interested in the WordPress Integration or who are looking at these update things to ALWAYS start with a full regular update of the Flarum installation in your Terminal software on your hoster panel.

                    It seems that starting there "gets you back on track and in a good place" from where you can then do the remaining steps that need to be completed, as applies in the situation.

                    I am so used in WordPress of doing backups and updates weekly, on Saturday mornings for the sites I manage.

                    With Flarum, it is more of an under the hood thing with the Terminal method.

                    I am sticking to the Terminal and then composer update process, even though I have the Extension Manager active on the Admin Panel also.

                    I have not had much luck in seeing that work correctly, essentially not wanting to update some extensions I think.

                    So I see that more as informational than as an Update tool.

                    Your mileage and situation may be different, but I like safe and consistent for these things.

                    Big picture, I worked through the updates, am happy that the WordPress Integration settings are back on the normal Admin Panel which is more standard, and all is well.

                    Thanks for all your hard work, Clark; it is appreciated by a happy WPI subscriber.

                    10 days later

                    clarkwinkelmann Yes, it's supposed to be automatic. It reacts to the profile_update hook and compares the old roles to the new ones and if they changed, sends a sync request to Flarum

                    I want to clarify that this works correctly.

                    One small bug. If the forum is in a subfolder (domain.com/forum) and you write a comment from the WordPress comment section and click Preview, then the URL duplicates the subfolder: domain.com/forum/forum/wordpress-embed/7043-etc

                    4 days later

                    Hi. I would like to integrate a Wordpress website login system to Flarum and as far as I undertand this extension will do that. Before I pay for that I would like to ask if it will work in my case that I have sites on the same domain but both are subdomain. Ex: subdmain1.my-domain.com for Wordpress site and subdomain2.my-domain.com for Flarum site.

                      ivangneiding yes that's perfect. You will be able to use any of the global login mechanism including cookie. The extension should even guess the cookie domain automatically on activation and set the settings to their correct value.

                        clarkwinkelmann I have installed and configured it and it's working. Well done, nice extension!
                        I just would like to ask you if it is possible to resize the Wordpress login popup? I am asking because we have a costumized login page and the fields are not totally visible as you can see in the print below. A little resize on this popup would work great.

                        13 days later

                        @ivangneiding

                        Hi Ivan, I have the Flarum integration working very nicely on a site and can likely make a suggestion here.

                        You need to use the Chrome Developer tools to figure out how to fix this, and then add a little custom CSS to your Wordpress theme that controls the display details of this popup.

                        Steps:
                        1) activate the popup
                        2) put your cursor over a section in the pop-up, and right-click your mouse button
                        3) look in the CSS details in the Developer tools area for "where you are in the CSS" details
                        4) activate the pointer thing on the top-left of the Developer tools, so you can point at things in the pop-up and move around in the CSS file in the Dev panel
                        5) do this towards the top of the pop-up so that the entire login pop-up is highlighted
                        6) in my CSS< I now see a section that is labeled: #login

                        The code there is:

                        #login {
                        width: 314px;
                        padding: 5% 0 0;
                        margin: auto;
                        }

                        You can adjust the width pixels by entering a number or by highlighting it and using the down-arrow to reduce the width, as it will lower the pixels number for you.

                        When you have determined what width should work correctly, then add code that looks like this to your Custom CSS section in the WP theme, however that works for your theme:

                        #login {
                        width: 250px !important;
                        }

                        The !important designation will force this setting over the default width.

                        After saving the Custom CSS with this update, check how it looks.

                        Another option is to add a max-width: 250px; setting instead of changing the width number.

                        I understand that to be an overall limit that works even if the width setting itself is higher.

                        SECOND suggestion.

                        You can also right-click and inspect the area of just the login fields themselves.

                        You should then see a CSS area labeled as

                        .login form

                        followed by a section with parameters between a starting { and ending }.

                        You can also play with these details in the Dev tools panel to see if you would want to fine-tune anything else there.

                        One word of caution: you have to be careful with CSS overrides as things may end up working or looking differently on different screens, phone, tablet, desktop, different screen resolutions and magnification, browser zoom settings, etc.

                        So generally speaking, it seems that fewer direct overrides are more prudent.

                        Hope this helps for your situation.

                        ONE more thing: Clark's forum integration with Wordpress is terrific indeed. I have suggested that he should see if he can get the plugin part published on Wordpress.org to get more visibility in the pure WP world.

                        Have fun!

                        BTW, it seems that you have not enabled the Only Allow Wordpress Login feature in the Admin panel for the WPI extension.

                        I see a Flarum login pop-up first, on your site, and then the WP login pop-up when I click the Login with Wordpress button.

                        I would look at enabling the Only Login with WP feature, so users go directly to the 2nd pop-up.

                        I have customized mine also with a plugin that replaces the WP logo with my site's favicon.

                        https://wordpress.org/plugins/change-login-logo/

                        That way, the user login experience from the Flarum side is nice and clean.

                        FYI

                        21 days later

                        @clarkwinkelmann Idea for a feature: when a new wordpress article is created I would love it if a new post would immediately appear on my flarum forum with a link to that article and perhaps a blurb or small section of the wordpress article... just an idea 😉