Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This needs confirmation but I am unable to get fields to be shown in the author information block. The 'Link to full user profile' will work, but when I deselect 'Link to full user profile' from admin/block/configure/profile/0 and select the other fields instead, the block fails to materialize.
Comment | File | Size | Author |
---|---|---|---|
#2 | profile_1.patch | 1.12 KB | killes@www.drop.org |
#1 | profile.module_2.patch | 1.09 KB | tostinni |
Comments
Comment #1
tostinni CreditAttribution: tostinni commentedThis little patch does the trick.
The bug came from the fact that the query retrieving user profiles, didn't take all public fields.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI've looked at the patch, changes "in" to "IN" and removed trailign DOS newlines, and can confirm that it works.
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedchanging status
Comment #4
Dries CreditAttribution: Dries commentedIs using IN() equivalent to using OR or is one faster than the other?
Comment #5
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedCvbge and I think that it is equivalent in this case. it is unsure whether it is faster, but IN () is usually regarded as being fast:
http://mysql.com/in
Comment #6
tostinni CreditAttribution: tostinni commentedI'm not a DB expert, but I got a little experience on Oracle (great you can answer ;) but I think it should happen pretty much the same), so IMVHO, I think that they're doing the same, in fact, looking at Oracle explain plan, it's exactly the same between a OR and a IN clause. They both do the same explain plan using "INLIST ITERATOR" in fact, the cost is the same, but explain plan tells me that it takes slightly less bytes to achieve it...
Ok sorry if very off topic and useless, but I thought it worthes to mention that.
Back to our query, I think whatever we put OR or IN clause, we shouldn't expect speed problem with this, as it's very little the change. If we do care about it, I think we should add an INDEX on this column. Also, I think IN clauses in this case (using 2 or more coma separated values) is much clearer than writing a lot of OR.
Comment #7
robertDouglass CreditAttribution: robertDouglass commentedperformance aside, we can fix the bug, right?
Comment #8
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Looks like MySQL rewrites OR to IN() internally.
Comment #9
(not verified) CreditAttribution: commentedComment #10
(not verified) CreditAttribution: commented