troymccann if you updated to Flarum beta 14, there's a conflict with fof/oauth which will be fixed soon but isn't yet FriendsOfFlarum/oauth9

If Wordpress isn't redirecting, it could be a conflict with another Wordpress plugin. You could try temporarily disabling some Wordpress plugins to see if this solves the issue.

Same thing in Flarum. If it's not working, you can try disabling some extensions to see whether there's any conflict.

    clarkwinkelmann This extension will change everything for me. I have a suggestion for a gamechanging additional feature... It will be pretty simple for you to implement it.

      T_Medias feel free to leave suggestions here, or you can use the support email if you've already purchased the extension.

      I can't guarantee I will implement all suggestions, but will definitely take a look.

        clarkwinkelmann I'm sure you will, cause it will be amazing :-).

        I didn't purchase it yet, but definitely will asap you implement this kind of feature.

        This is the idea : a function to receive the WordPress user role, in order to do something with it into Flarum. Per example in my case, I want to give special privileges to my Wordpress paid members, by automatically putting them into a Flarum group called, per example, "Premium". It would be pretty powerful and increase engagement. In the future, like that, additionnaly to special privileges (like uploading files or other), we will be able to give them special badges, extra points, etc...

          T_Medias I am planning to synchronize Wordpress user roles with Flarum groups in the future.

          I've also been thinking of integrating purchase features, like Woocommerce orders to Flarum groups, but the difficulty here is that I might need custom code for each kind of Wordpress plugins that offers purchase, unless those plugins connect with roles, which could be synced with the base feature.

          Implementing the base feature (group sync) shouldn't be too complicated. But the difficult part is testing with all possible Wordpress plugins, because if a single plugin messes up with Wordpress hooks, the sync might break and that's a lot of work to troubleshoot when we need to identify which plugin might be conflicting.

            clarkwinkelmann Great !

            Yes, I think it's better to focus on synchronizing wordpress user roles, and not those related to other plugins. In fact, too complicated to troubleshoot. It can be a mess.

            So I think something like this :

            • A member aquire a Wordpress user role (like "premium") on the main website
            • When he connects to Flarum, the Wordpress user role "premium" is passed to Flarum
            • Into flarum, and with parameters of your plugin, the admin can choose which user role triggers which attribution to a Flarum group. Per example : "premium" (wordress user role) -> "premium" (Flarum group)

            Is it something like that you are planning ?

            7 days later

            clarkwinkelmann Thanks Clark. I'm on beta 13. I disabled all extensions except for this one and the problem persists.

            This is all a bit too time consuming to keep spending time on this,and its caused my site to be down for large chunks of time - since April I think it's only been functional for maybe a week in total - so I'm going to cancel the subscription and remove the integration until it's a fair bit more stable.

              troymccann I'm sorry to see you go, but I understand.

              If you are able to give me information to reproduce, or give me access to a hosting where the issue reliably happens, I could try to look into it.

              Right now I don't know about anything that might cause it, and haven't seen that issue with any other customer.

              If you wanted to give it a go again, I'd suggest first updating to Flarum beta 14 to see if the issue also happens with that version. I will also release the beta 15 version shortly.

              Thanks Clark. I will one day, but I need to find the time to make sure everything is working just fine.

              I did try to update to beta 14. It looks like it installs just fine, but the version indicator does not increment to reflect the change. I haven't found time to try and diagnose that problem, either.

              4 days later

              Hi @clarkwinkelmann. Finding some time to try and get this running properly. I'm on beta 14 now (although, might need to go to beta 15 for the Formulaire addon over this one). I'm on 1.4 of your Wordpress plugin and 1.6.2 of the Flarum extension.

              I have a problem where the style for the embedded Flarum comments in Wordpress is bare when FoF/night-mode is enabled. Do you know of an easy way for me to tell your plugin to default to the day mode CSS when this addon is being used?

              Here's an example.

                troymccann after taking a quick look, I'm unsure whether there's any solution to the problem. The extensions just cannot work together at the moment.

                This is due to Nightmode not being designed to handle multiple frontend groups, which is a very obscure feature only used by Flarum Embed extension and my own WP Embed. This means there are two different CSS files, but the code from Nightmode assumes there can be only one, and it replaces multiple style tags with the same target URL, which ends up being the file that contains just the WP CSS.

                I will try to take a deeper look and will probably open an issue to discuss this on FoF Nightmode. I hope there's some way to disable Nightmode on custom frontends, but that's not looking good.

                Flarum extension version 1.6.3 - December 28, 2020

                • Flarum beta 15 compatibility

                This version can only be installed on Flarum beta 15.

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

                  Amarok can you share the output of your php flarum info ?

                  Do you have FoF Nightmode installed? It's known to cause that exact issue.

                    Regarding the Nightmode extension, would it be possible to export some CSS from Flarum that could easily be embedded into Wordpress as custom CSS, such that it will override the CSS for the Flarum iframe?

                    It wouldn't be automatic, but it would be good to also be able to change the style of the iframe to match the Wordpress site in case the site doesn't quite match the style of the Flarum site.

                      troymccann in the Wordpress extension, there is an additional button on the Appearance page that allows to add CSS just for the iframe.

                      However Nightmode compatibility is a nightmare. The way Flarum assets management work is so obscure I'm not even sure where to look.

                      The only remotely possible solution I see would be for the Wordpress extension to not use a second CSS file, and instead push everything into the main CSS file of Flarum. But that's not an ideal solution for flexibility, and it also increases the size of the base Flarum assets on all pages when it's only used in the iframe...

                      5 days later

                      I've resubscribed because I've got this all up to date now and it's all working nicely. Let me know when the Formulaire extension is ready for beta 15, because I'd love to use that in the next couple of days if it will be ready!

                      Thanks for the info re. CSS. At the moment night mode is a luxury, so easier to turn it off with this extension running.

                        troymccann thanks. Yeah, since I'm not seeing any easy solution for Night mode, it's probably best that way.

                        Formulaire update should be ready in 1-2 days.

                        7 days later

                        Hi @clarkwinkelmann . Do you think it would be possible to replace Gravatar on WP with avatars loaded from the Flarum database instead?

                        In fact, is it possible to sync more data between the user profiles on Wordpress and Flarum? I'd love to see the two merged together, to minimise the confusion for users who don't understand why therer's two different profile settings locations.