Preview of custom color widget disappears
forschi - April 24, 2008 - 17:12
| Project: | Fivestar |
| Version: | 6.x-1.12 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.

#1
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.#2
Hmm, strange. If you go to
sites/all/modules/fivestar/widgets/outline/star-template.png?o=1209057218796in your browser do you get an image? It sounds like there are files missing from your installation.#3
Yes, the image is there. Have a look at:
http://kniffologie.de/drupal/sites/all/modules/fivestar/widgets/outline/...
#4
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
#5
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.
#6
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=1234567890is 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.#7
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.
#8
Thanks for testing. Now committed and will be fixed in 1.13. Thanks!
#9
Automatically closed -- issue fixed for two weeks with no activity.