Hi @firebubble,
First of all, thank you for your review!
As I’m not familiar with the plugin and it isn’t open source it might be difficult to tackle on a local site. I’ll do my best!
View Admin As shouldn’t make any changes to the URL’s of any page.
– Are you switched to another view when this happens?
– Does the same issue happens when you are in the default view?
– What kind of URL issues/changes do you see? (parameters? And if zo, what parameters?)
Please give me an as detailed as possible description of what exactly happens so I’ll have a better understanding of the problem.
Thanks! Jory.
Hi, thanks for your reply. I have done some further testing and it seems to have the issues no matter what settings or what user role.
I also tested removing from the front end setting and this still had the issues. It only seems to have the issues for users that are logged in though as tested from another browser whilst logged out of the site and all was ok.
I also tested the default (off) but this too had the issues and the issues only go away when I deactivate the plugin.
The url issues look like this example:
http://www.example.com/directory/listings/listing-number-one/
and they change plus redirect on page reload to:
http://www.example.com/directory/listings/
so that the listing part of the url is removed.
Hi, I can setup a test server. Do you have an email that I can send the login details to?
This plugin doesn’t use any hooks related to URL’s. Especially not on the front-end…
There is no way I can take a look at the code and try some debug options?
Maybe you could share your current installation privately so I can test it locally as well? (WeTransfer for example: info@keraweb.nl)
If this is indeed an issue caused by this plugin I very much like to know what it is!
Let me know, thanks!
EDIT: For an account you can use the same email! No rush, I’ll be gone for the next couple hours but will check later tonight!
HI, test server is ready so will send details to your info @ keraweb email address now.
Thanks.
Took a look and found the issue.
WP has a method to remove some parameters from the URL like nonces etc. I use this feature to remove some VAA parameters to clean up when they are shown (like reset etc.)
WP only does this for the backend and I use the same code to copy the logic on the front-end (when logged in).
I’ve reviewed the code they use to accomplish this and they seem to use a form of canonical URL generated with $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'].
The problem is that when I go to a listing, the canonical URL generated by those two parameters are is still the main page so the URL gets changed to a different state.
I’ll do some more research on this and let you know a.s.a.p.!
GitHub issue: https://github.com/JoryHogeveen/view-admin-as/issues/87
After some more research I found that it is actually the Sabai plugin that is causing this issue.
It replaces the $_SERVER['REQUEST_URI'] with it’s own value and stores the original in the $_SERVER['ORIG_REQUEST_URI'].
This is actually very uncommon to my knowledge but I’ll think of another method to overcome this issue.
Keep in mind though that this plugin might also cause other issues with plugins and tools that use the $_SERVER data.
I’ll get back on this a.s.a.p.
Alright, did some extra searching and I found other plugins that also have similar uses of ORIG_REQUEST_URI to “fool” WP into validation the original URL.
I’ve added compatibility for ORIG_REQUEST_URI in the 1.7.6-dev version of this plugin.
Dev branch on GitHub: https://github.com/JoryHogeveen/view-admin-as/pull/85
You can preview the changes on your test site. You’ll see the issue is resolved there.
I will try to release 1.7.6 a.s.a.p.!
Regards, Jory