wpmu site can’t upload logo or OpenGraph Thumbnail or anything

#523355
Viewing 13 replies - 1 through 13 (of 13 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with your opengraph image uploads not working.

    Media uploads in Rank Math settings should work the same as media uploads on the rest of your website. If they are not, there might be a conflict with your theme or one of your plugins. To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    If the issue persists, please record a video screencast using a tool like Loom showing the troubleshooting and edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Please do take a complete backup of your website before sharing the information with us.

    We really look forward to helping you.

    found the conflict: https://wordpress.org/plugins/ai-engine/

    will you guys be able to work with them or should i check in with them?

    they fixed their side, also have comments for your team:
    https://wordpress.org/support/topic/conflict-with-another-plugin-rank-math-seo-breaks-image-uploads/

    After investigating, there seems to be an issue on their side in the way they load their scripts. Specifically, they need a module available in WP called “wp-uploader”, but they haven’t specified it. Without specifying anything, WP makes everything available, but the fact is they should really specify what they need.

    On my side, I always make sure to specify the modules I need, but I don’t actually require “wp-uploader”. My plugin being loaded first (the joy of being an “A” haha), I think that my plugin was setting the default modules.

    They can fix it my specifying the plugin but I am not sure how reactive they are, so I added that module as a necessary one on my side; even though I actually don’t need it (but I might, so that’s okay).

    Please try the 0.7.8 🙂

    nevermind, they couldn’t fix it… their next post:

    Sorry, I have a bad news 🙁 I thought I found the problem earlier, but it was not that – it’s related to something about wp-uploader, but since I don’t have access to the source code of Rank Math, I can’t say what the issue is exactly. Thing is, it breaks on their side, and not on mine.

    Can you contact them, ask them to install my plugin in their dev environment, fix the issue or let me know what is the issue so I can have a better look at it?

    Hello,

    We deeply apologize for the delay in response.

    I’ve already shared the issue with our developers and we’ll be informing you here soon when we have an update on this one.

    Meanwhile, please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hello,

    I checked this issue on a test site and I was able to replicate it, however, I could not find the exact cause of the error.

    If the AI Engine plugin does not offer any functionality on the Rank Math settings page, then it should not enqueue its JS files on that page – the files should only be loaded on the plugin’s own admin pages (this is in general a good practice in WP plugin development because it speeds up page loads and reduces possible conflict issues like the one we are facing here).

    So, I would recommend mentioning this to the plugin author. Until they look into it, there’s a workaround for the issue: we can manually dequeue the AI Engine JS files on all the Rank Math admin pages, using the following code snippet:

    add_action( 'admin_enqueue_scripts', function() {
    	if ( is_admin() && isset( $_GET['page'] ) && strpos( $_GET['page'], 'rank-math' ) !== false ) {
    		wp_dequeue_script( 'mwai_meow_plugin' );
    		wp_dequeue_script( 'mwai_meow_plugin-vendor' );
    	}
    }, 20 );

    We have a tutorial on how to add code snippets to your site, available here: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    their next reply:

    Of course, it’s not good to enqueue useless JS, however… AI Engine might be used in any Post Editor, and Rank Math too.

    So my question to them is simple; there is a value that becomes null for some reason on their side; which one is it, and what does it happen (where does this variable comes from, and at what moment does it becomes null, though it was not supposed to be); they must have a clue or two. I am pretty sure I could find the reason if I had access to the uncompiled JS code. If they are willing to share it with me, I’ll have a look. Otherwise, only the Rank Math team can know 🙂 I would love to help, and if it was breaking on my side of things, I would definitely give more information, but in this case, I need them to have a look at it.

    Hello,

    From what I gathered, the issue is happening on the Rank Math settings pages, and not in the post editor. If their JS files are needed on the post editor screen only, then they should add a condition to load them only on the post editor screens.

    If the developer would like to investigate the issue, they can find the uncompiled source codes in our public Github repo: https://github.com/rankmath/seo-by-rank-math

    For now, the code snippet I shared in my previous post should fix the issue on your site, and it should not cause any other issues, so I recommend using that. I have taken note of the issue and we will see if there’s anything we need to change in the plugin’s code to address this problem.

    Hope that helps.

    reply from plugin:

    I tried the version on GitHub; and there are no errors with it, it works. I suspect that this is an issue happening after they compile their JS. You can download that version (https://github.com/rankmath/seo-by-rank-math) and give it a try 🙂

    I might have an idea of what’s going on, and they will need to look into it. They are probably packing their JS with WebPack or another similar tool. It happens that packed JS code are conflicting with each other in some cases, so they need to have a different signature.

    There is an old article about this: https://medium.com/@cliffers/how-to-run-multiple-webpack-instances-on-the-same-page-and-avoid-any-conflicts-4e2fe0f016d1. But yeah, not many people talk about that. I faced it a few times, because I am actually running a lot of plugins of mine at the same time. Otherwise, I wouldn’t know, and maybe they don’t.

    The article I mentioned is a bit old, but explained the issue. As of 2023, with WebPack 5, it’s the chunkLoadingGlobal parameter that we need to use, and it should be set to something unique to their plugin. If they don’t do that, if will certainly clash someday with another plugin (and it is maybe now). I checked their package.json and they don’t use chunkLoadingGlobal. They must use it.

    Please guys at RankMath, it’s not because you have more downloads than me that the issue is not on your side. It might, or not But in any case, it’s always better to have a bit of curiosity to understand the issue 🙂

    Hello,

    Not sure if what is mentioned in your message is right. The same code runs in both public and private repo, and we were able to reproduce this issue with the public repo code as well.

    What @Balazs suggested in the ticket to load the script only where it is needed is correct. In the console, we see an error:
    error

    error 2

    The browser showing this error is because of the wp-edit-post & mwai_meow_plugin-vendor dependencies the plugin author has added to their plugin.

    Our public repo loads the compiled files only. The source files are for reference only.

    Or are we missing something entirely here?

    Maybe if the plugin author would not load their scripts on the pages where it is not needed, the issue will be resolved.

    Can that be done on their end and if they need any assistance, they can reach out to us directly at s******@r***********?

    We are not here to blame anyone but simply try to find a solution to the errors that are visible to us.

    Looking forward to resolving it together. Thank you.

    reply from plugin:
    To be honest, I am a bit frustrated; I am a developer, and I need to understand why it doesn’t work, and how to actually fix it. If you are developers, normally, you should too.

    Maybe if the plugin author would not load their scripts on the pages where it is not needed, the issue will be resolved.

    It is needed.

    I would like to ask again; have you read my previous message about the usage of chunkLoadingGlobal? Because you are definitely not using it (I checked), and if you don’t, this kind of issue will happen anyway, now or later. Can you please have a look at this, re-compile your JS the way I recommended? Please, let’s try this.

    I would be delighted to do something on my side, unfortunately, for now, the only idea I have is to be tried on your side.

    Hello,

    We had already tried compiling the files using chunkLoadingGlobal, and it didn’t make any difference.

    Can the other dev share the compiled code of Rank Math where the issue was not popping up?

    In our settings or on any other settings page, there is no need to generate the content; thus, that plugin’s code should not run there.

    Looking forward to helping you. Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)

The ticket ‘wpmu site can’t upload logo or OpenGraph Thumbnail or anything’ is closed to new replies.