1
Nick_James
User profile

The search.php routine is not working for some of my custom categories.

I have the search permissions set to use the field, but when I select a field, the search returns the entire database.

2
Nick_James
Re: User profile

Perhaps the fields are not working because they got left behind by an update.

I have 5 fields that are located in xxxxxx_profile_profile.

All the rest of the fields appear to be in xxxx_users

The 5 in profile_profile are custom fields with a dropdown box.

Rats.

I am pretty sure that this was working after I set it up. I guess not

3
ghia
Re: User profile
  • 2010/5/12 8:11

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Perhaps the fields are not working because they got left behind by an update.
What update do you mean?
Quote:
I have 5 fields that are located in xxxxxx_profile_profile.
All the rest of the fields appear to be in xxxx_users
That divide between normal standard fields and custom fields is intentional.
Quote:
The 5 in profile_profile are custom fields with a dropdown box.
You don't have other kinds of search fields? Maybe the dropdown has a problem.
If you put debug on, you can spot which SQL requests for the profile table are generated. Do you see anything unusual?
Quote:
I have the search permissions set to use the field, but when I select a field, the search returns the entire database.
Did you veryfy the counts?

4
Nick_James
Re: User profile

Could it be that my list of choices is too big?

The dropdown list is for each parish in Louisiana - so there are about 65 choices.


----------------------------------------------------
Warning: array_map() [function.array-map]: Argument #2 should be an array in file /class/model/write.php line 223

Warning: array_keys() [function.array-keys]: The first argument should be an array in file /class/model/write.php line 225

Warning: Invalid argument supplied for foreach() in file /class/model/write.php line 225

Queries
0.001398 - SET SQL_BIG_SELECTS = 1
0.000960 - SELECT * FROM config WHERE (conf_modid = '0' AND conf_catid = '1') ORDER BY conf_order ASC
0.000590 - SELECT sess_data, sess_ip FROM session WHERE sess_id = '4v85cu8qc7e038s3o844kltn80'
0.000526 - SELECT * FROM users WHERE uid = '1'
0.000395 - SELECT * FROM modules WHERE dirname = 'profile'
0.000568 - SELECT * FROM config WHERE (conf_modid = '38') ORDER BY conf_order ASC
0.000389 - SELECT * FROM modules WHERE dirname = 'protector'
0.000325 - DELETE FROM protector_access WHERE expire < UNIX_TIMESTAMP()
0.000427 - SELECT COUNT(*) FROM protector_access WHERE ip='69.31.146.238' AND request_uri='/modules/profile/edituser.php'
0.000640 - SELECT COUNT(*) FROM protector_access WHERE ip='69.31.146.238'
0.000429 - INSERT INTO protector_access SET ip='69.31.146.238',request_uri='/modules/profile/edituser.php',expire=UNIX_TIMESTAMP()+'60'
0.001449 - SELECT * FROM config WHERE (conf_modid = '0' AND conf_catid = '2') ORDER BY conf_order ASC
0.000316 - SELECT COUNT(*) FROM `users` WHERE `uname` = 'LaDads' AND `uid` <> {$uid}
Error number: 1064

Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1

0.000286 - SELECT COUNT(*) FROM `users` WHERE `email` = 'xxx@yyy.zzz' AND `uid` <> {$uid}
Error number: 1064
Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1

0.001097 - SELECT o.*,o.field_id FROM profile_field AS o LEFT JOIN profile_category AS l ON o.cat_id = l.cat_id WHERE o.field_id != '0' ORDER BY l.cat_weight ASC, o.field_weight ASC
0.000708 - SELECT * FROM group_permission WHERE (gperm_name = 'profile_edit' AND gperm_modid = '38' AND (gperm_groupid = '1' OR gperm_groupid = '2' OR gperm_groupid = '4' OR gperm_groupid = '17' OR gperm_groupid = '18'))
0.000342 - SELECT * FROM profile_profile WHERE profile_id = '1'

0.000600 - UPDATE `users` SET `name` = 'xxx', `uname` = 'xxxx', `email` = 'xxx@xxx.xxx', `url` = 'http://ladads.info/', `user_icq` = '', `user_from` = 'xxx', `user_sig` = 'I am not a lawyer. Don\'t even THINK I am one. ', `user_viewemail` = 1, `user_aim` = '', `user_yim` = '', `user_msnm` = 'xxxxxxx', `attachsig` = 1, `rank` = 7, `theme` = 'default', `timezone_offset` = '-6', `umode` = 'thread', `uorder` = 0, `notify_method` = '1', `notify_mode` = '0', `user_occ` = 'xxx', `bio` = '', `user_intrest` = '', `user_mailok` = 1 WHERE `uid` = '1'

0.000365 - UPDATE `profile_profile` SET `profile_id` = 1, `Parish` = 'N;', `Interests` = 'a:5:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";i:3;s:1:"4";i:4;s:1:"5";}' WHERE `profile_id` = '1'

0.000357 - SELECT COUNT(*) FROM banner
0.000496 - SELECT * FROM banner LIMIT 5, 1
0.000407 - UPDATE banner SET impmade = impmade+1 WHERE bid = 18
0.000474 - SELECT * FROM config WHERE (conf_modid = '0' AND conf_catid = '3') ORDER BY conf_order ASC
0.000412 - SELECT COUNT(*) FROM banner
0.000451 - SELECT * FROM banner LIMIT 2, 1
0.000339 - UPDATE banner SET impmade = impmade+1 WHERE bid = 14
Total: 26
-------------------------------------------------------------

The field is being updated with N. Presumably this is None.

5
Nick_James
Re: User profile

Oh, I think I have the 'Value Type' field set wrong.

If I change that to "Integer" it works.
Nicholas James
President - LaDads
www.ladads.info

6
ghia
Re: User profile
  • 2010/5/16 1:28

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Could it be that my list of choices is too big?
No, up to 200 items are a practical limit.

Glad you figured it out, altough not sure what the problem/solution realy was.

Quote:
0.000316 - SELECT COUNT(*) FROM `users` WHERE `uname` = 'LaDads' AND `uid` <> {$uid}
Error number: 1064

Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1

0.000286 - SELECT COUNT(*) FROM `users` WHERE `email` = 'xxx@yyy.zzz' AND `uid` <> {$uid}
Error number: 1064
Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1
Don't know where (module/block) these come from, but it is generating wrong queries.

(Modified an email address in the previous post to prevent SPAM)


7
Nick_James
Re: User profile

One of my fields is supposed to allow the user to select from about 41 district courts. However, it is not saving over about 32 options.

The other options disappear when I add them.
Nicholas James
President - LaDads
www.ladads.info

8
ghia
Re: User profile
  • 2010/5/17 7:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It is possible that the 32 is a PHP limit for multi select lists, try with a checkbox list.

9
Catzwolf
Re: User profile
  • 2010/5/17 9:56

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


@ghia: There is no limit really for this in PHP, but for performance sakes. Having a list of 1000 could send some users over the edge though.

@Nick_James: What field type do you have this set? If it is varchar (textbox)? Then set it to text (textarea). It could be the 255 limit on varchar could be causing items seem to disappear when you update them or save them.

It possibly would help further if you gave us clear examples of your profile form additions, laying out exactly what you're doing. That way we would better understand what you're trying to do and that would help us provide a solution quicker :)

ATB,

John

10
gooloomoo
Re: User profile
  • 2011/2/27 1:05

  • gooloomoo

  • Not too shy to talk

  • Posts: 110

  • Since: 2006/6/27


Hi, I just have the same problem with profile module, if I add more than 32 custom fields(textbox), only 32 of them will be saved, the rest keep unchanged.

Anyone know how to fix this?

Login

Who's Online

249 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

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

Latest GitHub Commits