Closed (fixed)
Project:
ProfilePlus
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Jul 2007 at 15:42 UTC
Updated:
29 Aug 2007 at 03:20 UTC
Jump to comment: Most recent file
This occurs after updating user's profile data. If I search for a keyword that I just added to a profile, the ProfilePlus module displays both the old (pre-update) & new user objects. Please take a look at the screenshot I've provided. The first result shows the user's account before I added extra profile data the second is the updated one with the new profile data included. This is reproducible. If this issue isn't clear, please let me know.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | profileplus_results_fix_0.patch | 964 bytes | peterd12 |
| #4 | profileplus_results_fix.patch | 1.28 KB | peterd12 |
| problem.JPG | 21.91 KB | peterd12 |
Comments
Comment #1
davemybes commentedIf you clear your cache tables (all of them), does this solve the issue? I am not suggesting this as a real solution, but rather as a way to find where the problem is.
Comment #2
peterd12 commentedThis doesn't solve the issue. It provides the same results after clearing. Once I'm done a module I'm working on I should be able to take a look at it and possibly submit a patch.
Comment #3
davemybes commentedOK, thanks for testing that. I'll take a look at the module in the next few days.
Comment #4
peterd12 commentedincrn8, this should fix the problem that was occurring. A new item was being added to the $find array for each profile category, producing multiple results for the same user. This ensures that only one item is added to $find for each user.
Comment #5
peterd12 commentedOops, that patch was applied to a slightly older version of the profileplus module. This should be the correct one.
Comment #6
davemybes commentedNice. I'll take it for a test run and see what happens. Thanks.
Comment #7
davemybes commentedPeter,
I just tested your issue (without the patch) on my system and I don't get that double result problem. I created new profile fields, changed them, created new users, modified their profile data too, but I always got only the one result for each user. Could you send me step-by-step instruction on exactly what you did. Include the details of the profile field (category, title, etc). I'll do exactly what you did and see what happens.
Does this occur with an unmodified Garland theme too?
Comment #8
frerin commentedI get the same problem here, too. I am using Drupal 5.1, Garland.
Without the patch I will get the results twice, with the patch I get the results three times.
Comment #9
peterd12 commentedOK, I just tried it with a fresh db and fresh install, so here's the step by step method to reproduce it (with the default Garland theme enabled):
1. Download & install http://ftp.drupal.org/files/projects/drupal-5.x-dev.tar.gz with a new MySQL db.
2. Enable and set up permissions for authenticated users to access the search, profile, and profileplus modules.
3. Create a user (e.g. test_user) with two profile fields each in their own categories.
4. Log in as that user and update one of the two profile fields with some data.
5. Search with some of that data at /?q=search/profile/profile and note only one result.
6. Update the second profile field with some data.
7. Search with some of the second field's data at /?q=search/profile/profile and note two results; the profile with the first update, and the profile with the second update.
frerin: Werid, with the fresh install and no other modules enabled, the patch fixes the results for me and only shows one user.
Comment #10
peterd12 commentedThe profile fields and categories can be any names for this to happen. I used categories Personal info and Contact info and fields profile_blurb (personal) and profile_location (contact.)
Comment #11
davemybes commented@peterd12,
Your patch appears to work fine. I followed your steps and saw the issue - even for admin. With the patch (actually just the one line where the $find[] line is moved outside the second foreach loop), the issue is gone.
I'm marking this as RTBC, but will hold off a bit until we can figure out frerin's issue.
@frerin: do you get the same problem on a clean install of Drupal 5.1 with a fresh download of the profileplus module?
Comment #12
peterd12 commentedGlad I could be of help. frerin: are you sure you applied the patch properly? If applied improperly (ie. a duplicate $find[] line added inside the for-loop) you would see three results.
Comment #13
totaldrupal commentedI have tried Profile Plus on two site, 5.1 and 5.2. Both sites give me multiple results. It appears to me that how many times the profile is duplicated is related to the amount of fields you have in the profile.
Will your patch fix this? If so how do I apply it? I'm not a programmer, your assistance is appreciated.
Comment #14
davemybes commentedThis should be fixed in the latest release of the module.
Comment #15
davemybes commentedThis issue IS fixed in the latest dev version.
Comment #16
(not verified) commented