Ticket #273 (new patch)

Opened 10 months ago

Last modified 8 months ago

{{blog}} tag using wrong url form for user icon

Reported by: mericson Assigned to: rho
Priority: normal Milestone: 0.9.3
Component: core Version: 0.9.0
Severity: normal Keywords:
Cc: renato, ewout, rho, dramirez Patch Included: 0
Review Stage: accepted

Description

I added a {{blog}} template keyword to my front page and discovered that the user icon is not displayed. The following incorrect URL was generated for the image.

<img src="http://mysite.com/_icon/user/" border="0" alt="default user icon" />

Attachments

missing_icon_blog_keyword.diff (1.1 kB) - added by renato on 01/18/08 05:35:39.
simple (and ugly) workaround

Change History

01/18/08 05:35:39 changed by renato

  • attachment missing_icon_blog_keyword.diff added.

simple (and ugly) workaround

01/18/08 05:44:52 changed by renato

  • cc set to renato, ewout.
  • keywords changed from blog, keyword,user, icon to patch,review.
  • type changed from defect to patch.
  • priority changed from high to normal.

I gave up on doing this in a cleaner way, because weblogs_posts_view.php is quite confusing, it checks icons in strange and apparently inconsistent ways, and ends up passing icond id 0, which causes the bug.

Moreover, icon_html function in lib.php doesn't do a good job either in checking if it's a valid icon id, and even with icon id -1 it gets confused. In fact, there's already user_icon_html function in elgglib, from which the former was built. Cleaning up and using just one function for this would be much better.

01/20/08 00:57:26 changed by ewout

  • keywords changed from patch,review to accepted, review.
  • owner changed from nobody to rho.
  • milestone changed from 0.9.1 to 1.0.

Checked this in in r1523 and r1524, but leaving the ticket open so that rho or diego can have a look at a cleaner solution.

01/25/08 19:08:41 changed by ewout

  • cc changed from renato, ewout to renato, ewout, rho, dramirez.
  • keywords deleted.
  • haspatch changed.
  • review_stage set to accepted.

03/13/08 11:26:31 changed by

  • milestone deleted.

Milestone 1.0 deleted

03/13/08 11:34:19 changed by misja

  • milestone set to 0.9.3.