Not sure if this is the right place to file, given how CVS content is mixed up, but here it goes. Apparently recent changes to Buddylist API broke Buddylist UI, in multiple places. This is probably incomplete list:
#1) Incorrect buddy_api_get_buddies calls
UI module calls the parameters in the wrong order. Fixed everywhere in the patch.
#2) Recursive loading of user objects in buddylist_ui_user
When op = load, buddies should not be loaded as full objects, as this is likely to cause infinite recursion. Changed to UID loading.
#3) Requester / requestee confusion in buddylist_ui_pending_requested_accept_submit
I found this problem at least once - at the step where friend request is confirmed. There is a possibility of a similar problem in other request code / form submits, but I am not familiar enough with the code to be sure.
#4) Various errors with Workflow tokens
When friend request is created, even though it is sent out fine, this message appears: "Workflow-ng: Applying token replacements failed. To fix this try editing and saving all conditions and actions."
It may be possible that #3/#4 are related because of more mis-matches is request API. Please help with reviewing this.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | buddylist.patch | 8.31 KB | dkruglyak |
| #1 | buddylist_ui.module.patch | 8.57 KB | dkruglyak |
| buddylist_ui.module.patch | 2.52 KB | dkruglyak |
Comments
Comment #1
dkruglyak commentedOK, I dug deeper into the module and made a few more fixes - all in consolidated patch. Summary here:
A) Incorrect buddy_api_get_requestees calls
Parameters of buddy_api_get_requestees are called in wrong order, just like buddy_api_get_buddies. Rearranged
B) Requestee status actions were not themeable
This is a problem and I changed them into themeable functions (called by buddylist_ui_get_buddy_actions)
C) Requester / requestee confusion in buddylist_ui_pending_requested_deny_submit
Problem identical to buddylist_ui_pending_requested_accept_submit. Rearranged params the same way.
D) Menus not generated correctly
The module does not generate a proper menu for navigation block and does not use translations. Fixed.
E) Central page should be themeable, just like request page
Added theming function and updated the menu accordlingly
F) Theme function naming confusing
Standardized, renaming existing functions wherever appropriate
The patch was tested pretty well and should be ready to go. I also verified that "Cancel request" feature works fine.
Comment #2
nodestroy commentedHi,
thx for your great work!
Due to the little cvs mess, i allready fixed the most of your issues from your first patch. (Maybe we will have a buddylist2 project page soon)
I will quickly review and apply your second patch!
regards,
dominik
Comment #3
nodestroy commentedComment #4
dkruglyak commentedDominic, thanks for commiting! With more testing I found and fixed a few more problems:
FIX #1:
Made persistent menu items cached, using user.module as a model. This is required to allow admins to customize / move them. Note the change from MENU_SUGGESTED_ITEM to MENU_NORMAL_ITEM to show up in navigation by default.
FIX #2:
Streamlined buddylist_ui_user to generate output through themeable functions. In buddylist_ui_get_buddy_actions added keys to the action list to allow further theming customization by name. E.g. to make "Remove Friend" harder to find, like on Facebook.
FIX #3:
Removed buddylist_ui_buddy_api function, which is never used and is unnecessary
TBD:
We have buddylist_ui_translation and buddylist_api_translation duplicating one another adding to confusion. I suggest merging them into one, probably buddylist_api_translation. Not included in my patch.
Attached patch can be applied against latest CVS.
Comment #5
nodestroy commentedthx for this great patch!
@translation functions:
i think buddy_api_translation() would be best, because other UI´s can use it too. i will apply this soon.
Comment #6
dkruglyak commentedI agree that buddy_api_translation is the preferred function to keep. Look forward to seeing the patches applied, this one and the fixed one-way delete function here: http://drupal.org/node/203500
As you are working on the code, would love to hear your thoughts on activities / requests per this: http://drupal.org/node/203335
Comment #7
nodestroy commentedpatch and translation function changes applied & commited
Comment #8
dkruglyak commentedAll fixes from this issue look good, marking fixed.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.