#41715 closed defect (bug) (worksforme)
Wrong Site ID in site-users.php
Reported by: | pluus | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Users | Keywords: | reporter-feedback |
Focuses: | multisite | Cc: |
Description
I’ve found a weird glitch in wp-admin/network/site-users.php.
Issue :: http://imgur.com/rhArDXv
Whenever I was trying to add a user to a site, it was complaining that the requested site doesn’t exist. While investigating it, I’ve found that the $id value changes after the user table is displayed.
Fixed :: http://imgur.com/HWERGkg
After disabling #270, the wrong id issue was fixed. All I can assume at this stage is that the function to display the user table is corrupting $id somehow.
Is this a known issue?
Change History (6)
This ticket was mentioned in Slack in #core-multisite by desrosj. View the logs.
7 years ago
#4
@
7 years ago
- Keywords reporter-feedback added
Hey @pluus, welcome to Trac!
I was unable to reproduce the behavior that you described. When I am on wp-admin/network/site-users.php
, the field has the correct ID.
Are you using any plugins when you see this behavior?
Also, in the page's output, there should be a localized JavaScript variable, current_site_id
. Can you view source and see if that has the correct value in it?
#5
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
- Version 4.8 deleted
I'm going to go ahead and close this as worksforme
. @pluus, if you are still having this issue and can reproduce it without plugins activated, please feel free to comment and reopen if needed.
Since the table is a must have thing... I've replaced the following code
<input type="text" name="id" value="<?php echo esc_attr( $id ) ?>" />
with
<input type="text" name="id" value="<?php echo esc_attr( $_REQUEST [ 'id' ] ) ?>" />
to directly get the site id from the URL.