Fabulous module. Can't wait to really start using it.

I created a new category attribute and the ticket list page shows a missing icon. The code asks for "category_product_request.png" (my attribute was 'product request'), which of course is missing.

I copied and renamed category_feature_request.png and that fixed the broken link. However, perhaps there is a more elegant way to handle this? Maybe the icon is duplicated and renamed by the system when a new attribute is created? That way people who want individualized icons can still have them but for everyone else it would just be automatically handled.

Comments

Roberto Gerola’s picture

> Maybe the icon is duplicated and renamed by the system when a new attribute is created?
Yes, this could be an idea.
Another option could be to define a default icon.

Roberto

Roberto Gerola’s picture

Status: Active » Postponed
Roberto Gerola’s picture

Category: bug » task
Magnity’s picture

Title: Missing icon » New attribute results in missing icon
Priority: Minor » Normal
Status: Postponed » Active

I think the best way to deal with this would be to go down the default icon route.

Perhaps in the future having a way to specify the web address of an icon from within the attributes settings.

Magnity’s picture

Component: User interface » Storm.module
Category: task » bug

Changing to bug report.

qriz’s picture

Anything new to this problem???
I don't like to turn the icons off, because the images get turned off as well ...

iamjon’s picture

I just used firebug to see the name of the file that the storm was looking for/created and in my case it was the icon for the bug report...I copied the original and popped it into the icon field. It may not be the best way of doing things, but it took care of it for me.

juliangb’s picture

Status: Active » Needs review
StatusFileSize
new2.12 KB

This is first attempt at a patch that checks for whether the icon is there. It will probably need improvements after bot and real testing.

I didn't want to check for the file every time an icon is requested (could be 100 per page), so instead the files in the directory are cached. Therefore, if a new icon is added to the directory, the cache should be cleared for it to appear.

Currently, if the icon is not found, simple the text will be displayed. This can be improved in due course.

juliangb’s picture

StatusFileSize
new2.19 KB

And here's one that works for me.

I'd like to have a review from someone else before I commit please.

Then we'll work on allowing a default icon to be set or something similar.

juliangb’s picture

*Bump*.

I'd be very keen for someone to test this if poss.

juliangb’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Wolfke2800’s picture

I added an attribute "test" (domain: Project category) and put a icon "test.png" in storm/icons. The icon is not showing, instead there is the text "test". Did i do something wrong?

juliangb’s picture

@Wolfke2800, please try clearing your cache. If you still experience problems, then please open a new issue.