11
barryc
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/5 18:54

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


hhttp://www.aka.org/aka/modules/profile/userinfo.php?uid=4410

This is the result of doing the following search:

Log on as trabis
Click on Find Members in the left panel
Enter Last Name starts with Cooper (Note that the order of fields in correct in this search form)
Click Submit
Click on bcooper
The order in the results page does not respect the order as set in the Profiles module. The problem may therefore be in userinfo.php

You should be able to see this if you are logged on. Did you get the PM I sent with username and password?

Barry
Barry Cooper
Sweet Home, Oregon

12
trabis
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/5 19:15

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Ok, so it is not related with the search.

I did not recieve your pm.

13
barryc
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/5 20:21

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I can see that userinfo.php is a separate script from the search script, but from the user's point of view, I think one expects the results to come up in the order specified in the field weights. That;s why I asked the question in reference to search results.

It's true that if I just use View/Edit Profile (near the bottom of the left panel), which calles userinfo.php, the results are also in the same unsatisfactory order. So, you are right, the issue seems to be to tell userinfo.php to respect the field weights.

Thanks, as always, for spending time helping on this. I just sent you another PM. I was suspicious that the last one didn't go through as the message sent window was not normal. You should get this one.

Barry
Barry Cooper
Sweet Home, Oregon

14
barryc
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/6 1:48

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


trabis,

I have tested the search function with at least one date field being searchable and with no date fields being searchable. I still see the bug. You can examine this by logging on as trabis and as trabis2. Both use the same password. trabis is a member of Registered Users and one other group. The other group has permission to search the field last_login. trabis2 is a member of only Registered Users. Registered Users (at the moment) does not have permission to search on any of the date fields. You will see the difference. Either this is a bug, or I misunderstand how to set up permissions in the Profile module.

With debug turned on, when searching as a Registered User, I get the a lot of textsanitizer errors, then the following:

Quote:
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 330
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 331
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 330
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 331
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 330
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 331
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 330
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 331
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 330
Notice: Undefined index: uid in file /modules/profile/class/profile.php line 331


I do not get these errors if searching as someone in a group that has permission to search last_login.

Please let me know once you have seen this so that I can restore permissions for Registered Users. As it is set now, Find Members is broken for those Registered Users who are not members of another group.

Again, if it would help to give you temporary admin access, I can do that. My db and other files are fully backed up.

Barry
Barry Cooper
Sweet Home, Oregon

15
trabis
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/6 20:28

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

barryc wrote:
The order in the results page does not respect the order as set in the Profiles module. The problem may therefore be in userinfo.php


Actually is the way around. userinfo.php show fields in the same order as set in administration.

Search.php, however, does a sort on fields not looking at the sort of the categories.

A way around is to set global weights ignoring the ones set in categories. A problem with this approach is that if we reorder the categories we would have to review our weights again.

So I have changed loadFields() to do a join with categories table. This way fields come out sorted by category weight and then by field weight matching the same output we get on userinfo or in admin area.

You can download profile module from XOOPS trunk:
http://xoops.svn.sourceforge.net/viewvc/xoops/XoopsCore/trunk/htdocs/modules/profile.tar.gz?view=tar

To continue...

16
trabis
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/6 21:31

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

I do not get these errors if searching as someone in a group that has permission to search last_login.

Please let me know once you have seen this so that I can restore permissions for Registered Users. As it is set now, Find Members is broken for those Registered Users who are not members of another group.


Fixed in revision: 3336

Good catch, thanks. I was testing module as admin so I was missing that bug. You can remove my account, thanks.

17
barryc
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/6 22:37

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I do the same thing on my own site, overlooking that what looks fine as admin might not work for ordinary users.

Thanks for you attention to these problems.

If I have other suggestions for the Profile module, an important one on our site, may I post them here (with a new thread)? I have some ideas, but will have to think them through.

barryC
Barry Cooper
Sweet Home, Oregon

18
trabis
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/6 22:45

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi again Barry, go ahead and make your requests (in other thread). Please remember that my main concern is bug fixing and that I'm not the module developer. I may be not able to assist you. Thanks.

19
barryc
Re: Profile module issues, Xoops 2.3.3
  • 2009/7/7 1:10

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Hi trabis,

I downloaded the updated Profile module, copied the files over my existing ones and updated the module in admin. I can now make all date fields for a user group not searchable and the search works correctly. Thank you.

I am not sure if the update should have fixed the problem with sort orders when one clicks on the link to a particular user (calling userinfo.php). I still get the "random" order, as before. I could try your idea of sequentially numbering the weights in admin, but I thought I should ask first about this. Your account is still active, if you want to take a look.

[Edit] trabis, thinking about what you said about userinfo.php using the order set in admin - where do you mean? The only place I know to set the order is in the admin for the profile module fields. If that's the case, all of my field weights are already sequentially numbers, each having a unique number. That is, no weights are repeated in different categories.

Barry
Barry Cooper
Sweet Home, Oregon

Login

Who's Online

468 user(s) are online (343 user(s) are browsing Support Forums)


Members: 0


Guests: 468


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits