Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in add user dropdown on add new invoice page #11

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 10 comments
Closed

Bug in add user dropdown on add new invoice page #11

GoogleCodeExporter opened this issue Mar 14, 2015 · 10 comments

Comments

@GoogleCodeExporter
Copy link

I am using wp3.0 in multisite mode(also with buddypress).

On the add new invoice page the user dropdown menu only showed a couple of 
users, not all of them.

in file Display.php:

I commented out line 3151-3154 so It uses the normal "wp_" "prefix" instead of 
the else function you have for wpmu and it works fine now.

This function should really be changed since for security people change the 
prefix and it is not always "wp_".

Original issue reported on code.google.com by mydiskdr...@gmail.com on 1 Jul 2010 at 5:43

@GoogleCodeExporter
Copy link
Author

Issue 6 has been merged into this issue.

Original comment by sh.mohanjith on 1 Jul 2010 at 6:11

@GoogleCodeExporter
Copy link
Author

Original comment by sh.mohanjith on 3 Jul 2010 at 1:30

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed in revision r5

Original comment by sh.mohanjith on 3 Jul 2010 at 9:42

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Still not fixed in version 2.0.4 with WordPress 3.0 multisite mode/BuddyPress.

Same issue as before only showing 14 users, "primary blog" only has 4 
registered users. All other users are site admins on there own site(not 
registered on the primary site). Not sure how only a few of the others are 
showing.

seems to be this call:

$get_all_users = $wpdb->get_results("SELECT * FROM {$prefix}users LEFT JOIN 
{$prefix}usermeta on {$prefix}users.id={$prefix}usermeta.user_id WHERE 
{$prefix}usermeta.meta_key='primary_blog' and {$prefix}usermeta.meta_value = 
{$blog_id} ORDER BY {$prefix}usermeta.meta_value");

I fixed it by commenting out the if mu-plugins routine and putting in my custom 
prefix in the else routine 

Original comment by mydiskdr...@gmail.com on 6 Jul 2010 at 6:21

@GoogleCodeExporter
Copy link
Author

I can't reproduce the issue at all.

Can you please see what $prefix is, if it doesn't have your custom prefix 
that's the issue, and we can move on from there.

Also can you please let me know how many registered users are there in the 
primary blog?

Original comment by sh.mohanjith on 6 Jul 2010 at 6:30

@GoogleCodeExporter
Copy link
Author

I think the issue is with your expectation. The drop down will only show users 
that are part of the particular blog the Web Invoice is being used, not all the 
users from all the domains. 

Please verify whether you are looking for above, if so open a new  Feature 
request and explain in detail what you are looking for.

Original comment by sh.mohanjith on 6 Jul 2010 at 6:53

@GoogleCodeExporter
Copy link
Author

I understand what you are saying with "The drop down will only show users that 
are part of the particular blog the Web Invoice is being used, not all the 
users from all the domains."

Whats throwing me off is that the list is showing names of people not on the 
blog being used.

this is my setup:
Site 1 "primary site" wp_1_ has the plugin installed.
Only 3 users. me, a second admin, and a user with no sites. The user with no 
sites is the only one from the primary blog in the ad new invoice dropdown.

I have 148 sites as subdomains
71 total users in wp_users, most have sites, 13 do not.

I am showing 14 users in the ad new invoice dropdown, 99.9% of them are the 
users with no sites(1 is a subscriber to the primary blog), 1 of them is a user 
that has a site. I cant find any thing special about this 1 account that would 
make it show.

I have added more users to be subscribers to the primary blog but the dropdown 
list still stays the same at 14 users.

so to recap, it is only showing users with no sites, not on the primary sites 
user list except for 1

Original comment by mydiskdr...@gmail.com on 7 Jul 2010 at 1:26

@GoogleCodeExporter
Copy link
Author

Found the issue, in users_meta the primary_blog. all my users with sites have 
there blog as the id. No clue why one of my users with a site has the id set to 
1 instead of his site.

can you explain this alittle better and why you are calling this in the routine?

Thanx

Original comment by mydiskdr...@gmail.com on 7 Jul 2010 at 1:49

@GoogleCodeExporter
Copy link
Author

With the primary_blog we can figure out which blog the user belongs to. Only 
exception would be the main/root blog where all users are part of, issue 18 
addresses this.

Please let me know if this is not clear.

Original comment by sh.mohanjith on 7 Jul 2010 at 4:55

@GoogleCodeExporter
Copy link
Author

With the primary_blog we can figure out which blog the user belongs to. Only 
exception would be the main/root blog where all users are part of, issue 18 
addresses this.

Please let me know if this is not clear.

Original comment by sh.mohanjith on 7 Jul 2010 at 4:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant