#4348 closed Defect (fixed)
Add friend action error messages don't show up if passed invalid guid
| Reported by: | brettp | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | Elgg 1.8.4 |
| Component: | Core | Version: | 1.8 |
| Severity: | trivial | Keywords: | |
| Cc: | brett@… | Difficulty: | easy |
Description
Current Error message includes user name of friended entity. No logic to handle if a guid isn't valid.
Change History (4)
comment:1 Changed 16 months ago by cash
- Priority changed from normal to low
comment:2 Changed 16 months ago by brettp
I caught this while documenting the JS engine's elgg.action(). I accidentally passed the wrong parameter and instead of giving any error it just looked like the ajax never fired.
comment:3 Changed 16 months ago by Cash Costello
- Resolution set to fixed
- Status changed from new to closed
Fixes #4348 adds check for missing user when friending
Changeset: bdb32999ac9bcdce8803868fb7f400ddc8db8cbd
comment:4 Changed 12 months ago by Cash Costello
Fixes #4348 adds check for missing user when friending
Changeset: bdb32999ac9bcdce8803868fb7f400ddc8db8cbd
Note: See
TracTickets for help on using
tickets.

This would happen if a user was deleted/disabled between another user requesting a page and clicking "add friend". Any other ways for this to happen?
I'm not inclined to create a special error message for something that is so unlikely. Maybe some kind of missing parameter error or an access error.
Also, we need to remove the "please try again" from Elgg's error messages. If something fails once, it is not likely to work the second time. Encouraging users to do something futile is not a good idea.