Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Jan 2006 at 19:27 UTC
Updated:
17 Mar 2006 at 09:02 UTC
Jump to comment: Most recent file
When a list of user profiles (http://faculty.law.unlv.edu/profile/profile_role/Academic+Faculty) is accessed using a path alias the output is not as expected. When the page is aliased so faculty > profile/profile_role/Academic+Faculty the resulting page shows just the title "Academic+Faculty" and no contents (http://faculty.law.unlv.edu/faculty).
At first glance it seems to be profile_browse() is taking its argument from the third portion of the URL which no longer works with an aliased path.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | path-decode.patch | 2.56 KB | matt westgate |
| #7 | profile-browse.patch | 671 bytes | killes@www.drop.org |
Comments
Comment #1
Zen commentedComment #2
jbrauer commentedComment #3
wulff commentedActually, I think this might be a more general problem. Here's what I have found so far:
Under 'settings >> profiles' I created a new list selection field with the following selection options:
Under 'my account' I chose the item 'FOO BAR' from the list selection field. The value 'FOO BAR' is stored in the
profile_valuestable.When I view the 'my account' page, the text 'FOO BAR' links to
http://www.drupal.local/?q=profile/profile_test/FOO+BAR.I create a path alias 'test' pointing at the part after ?q= of the above URL:
test => profile/profile_test/FOO+BAR. Now, when I go tohttp://www.drupal.local/?q=profile/profile_test/FOO+BARI get the expected result (a link to my account is displayed), but when I go tohttp://www.drupal.local/?q=testI am presented with an empty page.Adding a
print_rstatement after theswitch ($field->type)block inprofile_browsegives the following results.On
http://www.drupal.local/?q=profile/profile_test/FOO+BAR:On
http://www.drupal.local/?q=test:In the second case, this means that 'FOO+BAR' is plugged into the select query; this returns an empty set since the string stored in the database is 'FOO BAR'
A quick fix is to do a
preg_replace('/\+/', ' ', $value)in the beginning ofprofile_browse(similar to what is done intaxonomy_term_page).Comment #4
jbrauer commentedI've been trying the suggested preg_match without success. Do you mean taxonomy_term_path in the taxonomy.module (which doesn't seem to use the preg_match in 4.7) or is taxonomy_term_page somewhere else that I'm missing?
Comment #5
Zen commentedThis is a non-critical issue in a non-critical module. Please explain why you believe this is critical, if you want to reset it back.
Critical = A critical bug in Drupal... not a bug critical in importance to you :)
Thanks :)
-K
Comment #6
jbrauer commentedThis is an issue critical to the profile module working in the same manner as other modules. I agree the profile module is not absolutely critical, however it is a key module for many users of Drupal resulting in a critical bug.
Comment #7
killes@www.drop.org commentedThis is certainly not critical.
Anyway, here's a patch which needs testing.
Comment #8
matt westgate commentedThis is a path aliasing issue and I'm working on it. Patch coming for review shortly.
We need to decide how dst aliases should be stored: urlencoded or urldecoded. That's the main dilemma.
Comment #9
matt westgate commentedWhen saving a path alias, the system accepts urlencoded or urldecoded paths so no standard was in place. That was the problem. I've changed this so we only store urldecoded paths since the
url()function encodes paths already.On a different note, I changed the help text in profile module becuase fields marked "public" can create their own view page, not just "public fields that are listed on the member page".
Comment #10
dries commentedCode looks good to me.
Comment #11
jbrauer commented+1 the code seems to work well.
A note for anybody encountering this issue that you have to re-add the path aliases to have it work.
Comment #12
jbrauer commentedA minor glitch... There is another system_update_174() that updates the comment tables. It works when I change this to update_175.
Comment #13
dries commentedThe patch needs to be rerolled.
Comment #14
dries commentedRe-rolled and committed. Thanks.
Comment #15
(not verified) commented