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

forschi - April 24, 2008 - 17:14

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

quicksketch - April 27, 2008 - 01:19

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.

#3

forschi - April 27, 2008 - 09:07

#4

quicksketch - April 27, 2008 - 10:52

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

forschi - April 27, 2008 - 20:08

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

quicksketch - April 27, 2008 - 20:59
Status:active» patch (code needs review)

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.

AttachmentSize
fivestar_color_update.patch647 bytes

#7

forschi - April 28, 2008 - 09:42
Status:patch (code needs review)» patch (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.

#8

quicksketch - May 6, 2008 - 03:11
Status:patch (reviewed & tested by the community)» fixed

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

#9

Anonymous (not verified) - May 20, 2008 - 03:23
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.