ClassicPress / classicpress-seo

Classic SEO is the first SEO plugin built specifically to work with ClassicPress. A fork of Rank Math, the plugin contains many essential SEO tools to help optimize your website.
GNU General Public License v2.0
30 stars 10 forks source link

Hijacked dismissible admin notices #143

Closed xxsimoxx closed 3 years ago

xxsimoxx commented 3 years ago

When Classic Seo is active, there is an AJAX error every time you try to dismiss other's admin notices. Seems to me that the jQuery code is linked to the generic is-dismissible class.

Didn't made a PR because I'm not totally sure and have not tested it, but this is the fix that worked for me:

timbocode commented 3 years ago

Thanks for reporting this @xxsimoxx. I will look into it and report back here.

timbocode commented 3 years ago

@xxsimoxx I've had a good look into this and as far as I can tell, the error occurs when dismissing notifications such as "Settings updated". Other notifications such as "We detected new post type(s)..." don't generate the error, or at least not for me.

I've created a PR (https://github.com/ClassicPress-plugins/classicpress-seo/pull/144) which is the same as your solution above except that I've used cpseo_notice instead of classic-seo-notice in keeping with naming conventions elsewhere in the plugin.

When the PR is merged, it will close this issue.

Thanks again for reporting it and for the solution. 👍🏻

xxsimoxx commented 3 years ago

Thank you for fixing this! The AJAX error was in every non-classicpress-seo notices. I've just tested the PR and works 👍🏻