If I select a custom color widget for setting its colors, the preview of the widget disappears. If a 'normal' widget is selected, the custom color widget is there again.

CommentFileSizeAuthor
#6 fivestar_color_update.patch647 bytesquicksketch

Comments

Anonymous’s picture

Edit:
Leaving a page after only selecting a custom color widget and then selecting a normal widget again (without saving the changes), leads to tons of warnings in the kind of:

warning: imagecreatefrompng(sites/all/modules/fivestar/widgets/outline/star-template.png?o=1209057218796) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /homepages/6/d202983230/htdocs/kniffologie.de/drupal/sites/all/modules/fivestar/fivestar_color.inc on line 215.
quicksketch’s picture

Hmm, strange. If you go to sites/all/modules/fivestar/widgets/outline/star-template.png?o=1209057218796 in your browser do you get an image? It sounds like there are files missing from your installation.

Anonymous’s picture

quicksketch’s picture

Could you provide more information about your system?

Webserver: Apache?
PHP version
Browser (though won't make a difference in this case I feel)
OS

Anonymous’s picture

Browser: The problem occurs on FireFox 3 Beta 5 and IE 7.
OS: Windows XP on the client, guess linux on the server.
PHP: 5.2.5
mySQL: 5.0.51
GD: bundled (2.0.34 compatible)
PHP memory limit: 20M
Webserver: Apache/1.3.34 Ben-SSL/1.55
Drupal 6.2

Hope that helps.

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new647 bytes

Alright, I narrowed down where and how this could be happening, but I'm not really sure why it's occurring on your setup. I'm also still not able to reproduce, so if you can test this out and let me know if it works I'd appreciate it.

It looks like the query string ?o=1234567890 is being passed in as part of the file name to the fivestar_preview_color() function. This is strange behavior because the query string should be trimmed off rather than coming in as part of the file name. So this patch manually trims off the query string if it's still present. Let me know if this works out for you.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for that patch. It works fine now. The image dissappears for a short time, when selecting the corresponding widget, but comes up again. Maybe this is because processing custom collor widgets needs more time than displaying normal widgets. Normal widgets do not disappear for this short period, when they are selected.

Leaving the settings page for fivestar does not bring up any error with this patch.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing. Now committed and will be fixed in 1.13. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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