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.
https://wordpress.org/plugins/view-admin-as/
GNU General Public License v2.0
45 stars 4 forks source link

Adds own canonical even though other plugins might already have. #119

Closed apermo closed 3 years ago

apermo commented 3 years ago

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.

JoryHogeveen commented 3 years ago

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

apermo commented 3 years ago

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

JoryHogeveen commented 3 years ago

@apermo Could you share the error?

apermo commented 3 years ago

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

JoryHogeveen commented 3 years ago

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.

apermo commented 3 years ago

image

That is the error message.

JoryHogeveen commented 3 years ago

Hi @apermo

I've made a change in the dev branch: https://github.com/JoryHogeveen/view-admin-as/commit/000dab542252b22334253a3579e960685c650aa8

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

Cheers, Jory

JoryHogeveen commented 3 years ago

Hi @apermo

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

Cheers, Jory

apermo commented 3 years ago

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.

JoryHogeveen commented 3 years ago

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