JoryHogeveen / view-admin-as

View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.

Home Page:https://wordpress.org/plugins/view-admin-as/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adds own canonical even though other plugins might already have.

apermo opened this issue · comments

Describe the bug

The plugin adds a new canonical, even though others (in my case yoast) already added one.

Steps to reproduce the behavior:

Install and activate Yoast & view admin as, and search the source code.

Expected behavior

Don't add a secondary canonical, even if it is just for the admin. If this ist just required for some JS, just add this to some js variable please.

Hi @apermo

This is done to fix a compatibility issue with some plugins and older WP versions (pre-4.2). It will be removed once I drop WP 4.2 support.
Keep in mind that this is only done for logged in users that have access to this plugin. For all other page views there is no extra url added :)

Cheers, Jory

Yeah. I’ve seen that it’s only if logged in. But still my canonical checker plugin on chrome reported an error.

@apermo
Could you share the error?

Don’t have the Mac at Hand Right now. The error was something like „found two canonical tags“ or similar.

I'll look into this a.s.a.p. to find a alternate (better) solution.
In the meantime, once you have the time, please share all info from your dev tool.

image

That is the error message.

Hi @apermo

I've made a change in the dev branch: 000dab5

Could you let me know if this fixes this issue for you?

Cheers, Jory

Hi @apermo

Please let me know! I have a next version ready for release once you confirm this issue is fixed :)

Cheers, Jory

Hi, sorry I didn’t have time to check recently cause we’ve had some other issues. I see if I can test it tomorrow, but can’t promise anything.

Hi @apermo
I'm closing this topic as fixed in the next release.
Cheers, Jory