Title: url error
Last modified: January 4, 2018

---

# url error

 *  Resolved [firebubble](https://wordpress.org/support/users/firebubble/)
 * (@firebubble)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/)
 * Hi, I am using the ‘Sabai directory’ plugin here: [https://codecanyon.net/item/sabai-directory-plugin-for-wordpress/4505485?s_rank=1](https://codecanyon.net/item/sabai-directory-plugin-for-wordpress/4505485?s_rank=1)
 * but when I add the ‘View Admin As’ plugin it changes the urls of listings and
   if you reload the page it redirects to another page which is really weird / unwanted.
   When I disable the ‘View Admin As’ plugin it all works as it should.
 * I am working on a local site so cannot provide a url to check but do you have
   any idea what would cause this as I was viewing the pages as an administrator
   role but still got the url issues?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Furl-error-11%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833856)
 * Hi [@firebubble](https://wordpress.org/support/users/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.
 *  Thread Starter [firebubble](https://wordpress.org/support/users/firebubble/)
 * (@firebubble)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833907)
 * 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.
 *  Thread Starter [firebubble](https://wordpress.org/support/users/firebubble/)
 * (@firebubble)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833921)
 * 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/](http://www.example.com/directory/listings/listing-number-one/)
 * and they change plus redirect on page reload to:
 * [http://www.example.com/directory/listings/](http://www.example.com/directory/listings/)
 * so that the listing part of the url is removed.
 *  Thread Starter [firebubble](https://wordpress.org/support/users/firebubble/)
 * (@firebubble)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833950)
 * Hi, I can setup a test server. Do you have an email that I can send the login
   details to?
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833953)
 * 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](https://wordpress.org/support/topic/url-error-11/info@keraweb.nl?output_format=md))
 * 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!
    -  This reply was modified 8 years, 5 months ago by [Jory Hogeveen](https://wordpress.org/support/users/keraweb/).
 *  Thread Starter [firebubble](https://wordpress.org/support/users/firebubble/)
 * (@firebubble)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9833984)
 * HI, test server is ready so will send details to your info @ keraweb email address
   now.
 * Thanks.
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9834055)
 * 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](https://github.com/JoryHogeveen/view-admin-as/issues/87)
    -  This reply was modified 8 years, 5 months ago by [Jory Hogeveen](https://wordpress.org/support/users/keraweb/).
    -  This reply was modified 8 years, 5 months ago by [Jory Hogeveen](https://wordpress.org/support/users/keraweb/).
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9835309)
 * 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.
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9835370)
 * 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](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

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘url error’ is closed to new replies.

 * ![](https://ps.w.org/view-admin-as/assets/icon-256x256.png?rev=1821735)
 * [View Admin As](https://wordpress.org/plugins/view-admin-as/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/view-admin-as/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/view-admin-as/)
 * [Active Topics](https://wordpress.org/support/plugin/view-admin-as/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/view-admin-as/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/view-admin-as/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/url-error-11/#post-9835370)
 * Status: resolved