Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rankmath AI and Jetpack AI Conflict #34033

Closed
foleynotrose opened this issue Nov 9, 2023 · 12 comments
Closed

Rankmath AI and Jetpack AI Conflict #34033

foleynotrose opened this issue Nov 9, 2023 · 12 comments
Assignees
Labels
[Block] AI Assistant [Extension] AI Assistant [Focus] Compatibility Ensuring our products play well with third-parties Groundskeeping Worked on by Dotcom Groundskeeping [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@foleynotrose
Copy link

Impacted plugin

Jetpack

Quick summary

When Jetpack is activated, it overrides the Rankmath AI button that is part of the block toolbar.

image

Steps to reproduce

  1. Install Rankmath and connect it to account. (Free plan is fine.)
  2. Activate Jetpack
  3. Create a post with a paragraph block.

A clear and concise description of what you expected to happen.

Rankmath's AI button in block toolbar should appear.

What actually happened

  • When Jetpack is activated, Rankmath AI button does not appear in Block Toolbar.
  • This is true even if add_filter( 'jetpack_ai_enabled', '__return_false' ); filter is added to site.
  • When Jetpack is deactivated, it reappears.

Impact

One

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

https://wordpress.org/support/topic/conflict-with-rankmath-9/#post-17141423
https://wordpress.org/support/topic/jetpack-rankmath-conflict/#post-17165526

@foleynotrose foleynotrose added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged labels Nov 9, 2023
@github-actions github-actions bot added [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High labels Nov 9, 2023
@jeherve jeherve added [Focus] Compatibility Ensuring our products play well with third-parties [Block] AI Assistant [Extension] AI Assistant Triaged and removed Needs triage Ticket needs to be triaged labels Nov 9, 2023
@jeherve jeherve moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Nov 9, 2023
@jeherve
Copy link
Member

jeherve commented Nov 9, 2023

@Automattic/jetpack-agora Do you think you could take a look at this?

Thanks!

@anomiex
Copy link
Contributor

anomiex commented Nov 9, 2023

In some quick testing, this doesn't seem to have anything to do with Jetpack's AI feature specifically. I've tried versions of Jetpack back to 11.6 and they also somehow prevent Rankmath's AI button from showing up.

Coming at it in a different way, I find that Rankmath and the https://widgets.wp.com/wpcom-block-editor/default.editor.js script registered by Jetpack's modules/wpcom-block-editor/class-jetpack-wpcom-block-editor.php tool are both trying to do like

registerFormatType(
    '...',
    {
        title: '...',
        tagName: 'p',
        className: null,
        edit: ...
    }
);

It seems that it's not allowed for multiple things to register a format type for the same bare tag, we get this error in the console output: Format "wpcom/justify" is already registered to handle bare tag name "p".

It looks like the "wpcom/justify" one ultimately comes from Calypso's apps/wpcom-block-editor/src/default/features/rich-text.js.

@retrofox
Copy link
Contributor

retrofox commented Nov 9, 2023

It shouldn't be. It relies on the core API te extend the block toolbar.
Going to take a look asap.

@CGastrell
Copy link
Contributor

Thanks @anomiex for digging. The code there reads:

This code is developed in the calypso monorepo at https://github.com/Automattic/wp-calypso/tree/trunk/apps/wpcom-block-editor.

@jeherve any particular Calypso dev we could ping on this?

@jeherve
Copy link
Member

jeherve commented Nov 9, 2023

It seems that it's not allowed for multiple things to register a format type for the same bare tag

Great find! Looks like it indeed, since WordPress/gutenberg#11488

no format type can use the same tag name, so e.g. you cannot have two format types handling a or span elements.
[...]
This is a proposal to instead normally serialise a class name. Only in cases where it is wanted that the format type can handle any element with the tag name, you can pass null for the class name.

I'm not sure what approach we should take here, since we want to be able to apply the justify format to just about any paragraph. On their end, I assume Rankmath AI also want to be able to make changes to all paragraphs.

any particular Calypso dev we could ping on this?

The Build team has been considering getting rid of that option in the WordPress.com Block editor, and instead rely on Gutenberg instead:

Automattic/wp-calypso#73455

That would be a nice way to solve our problem.

Unfortunately it looks like we're not quite there yet in Gutenberg:
WordPress/gutenberg#48202

@Automattic/build What do you think?

@danielbachhuber
Copy link
Contributor

What do you think?

I'd love to just add "align text justify" to this dropdown and be done with it:

CleanShot 2023-11-09 at 13 19 33@2x

Google Docs has it:

CleanShot 2023-11-09 at 13 20 25@2x

Microsoft Word has it:

CleanShot 2023-11-09 at 13 22 27@2x

It seems like Core is overly stuck on semantics.

@renatoagds renatoagds self-assigned this Mar 1, 2024
@renatoagds
Copy link
Contributor

Trying to jump at this one, but looks RankMath requires a subscription to show the AI feature right now. Do you still able to reproduce it on free version @foleynotrose ?

@foleynotrose
Copy link
Author

@renatoagds I'm still seeing options for 100 AI requests with the Rankmath free version:

Screenshot 2024-03-05 at 09 41 59

@renatoagds
Copy link
Contributor

I have been trying to reproduce this conflict, but I'm not being able to do. I spawned some JN sites and I'm able to have Jetpack and RankMath installed and working properly both.

CleanShot 2024-03-07 at 16 16 29

@anomiex
Copy link
Contributor

anomiex commented Mar 7, 2024

I note the changelog for RankMath v1.0.206 says

Fixed: Missing Content AI Command Center option when the Jetpack plugin is active

So perhaps that's why it can't be reproduced so easily anymore.

It looks like there is still something broken though:

  • Create a "long" paragraph.
  • Click the red "Rank Math" button next to Publish, which should open a sidebar.
  • At the bottom of the sidebar there should be a "Content Readability" section, inside of which there should be an entry about long paragraphs with an "eye" icon next to it. Click the eye, which should highlight your long paragraph.
  • Select the paragraph. Without Jetpack you get a "Shorten with AI" button instead of the usual editor toolbar, while with Jetpack you get the normal toolbar.
Videos
Without.Jetpack.mp4
With.Jetpack.mp4

@rcrdortiz rcrdortiz self-assigned this Sep 24, 2024
@rcrdortiz rcrdortiz added the Groundskeeping Worked on by Dotcom Groundskeeping label Sep 24, 2024
@rcrdortiz
Copy link
Contributor

rcrdortiz commented Sep 24, 2024

I've checked and both the Rankmath and Jetpack AI are being displayed properly on the latest versions.

Screenshot 2024-09-24 at 15 15 33

This issue is in progress but hasn't had any movement over the last months, I'm guessing this isn't being looked into? Can we close the issue or change its status?

@rcrdortiz rcrdortiz removed their assignment Sep 24, 2024
@oskosk
Copy link
Contributor

oskosk commented Sep 24, 2024

Let’s close it

@oskosk oskosk closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] AI Assistant [Extension] AI Assistant [Focus] Compatibility Ensuring our products play well with third-parties Groundskeeping Worked on by Dotcom Groundskeeping [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended
Development

No branches or pull requests

9 participants