Two things does not work:

1) Proper local relative paths, such as, "sites/all/themes/MYTHEME/MYIMAGE.png"
2) Leaving path empty to remove button image

Simple patch attached.

Comments

BarisW’s picture

Status: Active » Fixed

Thanks for this patch and apologies for the late reply.
Applied with proper attribution so it ends up on your profile.

Status: Fixed » Closed (fixed)

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

tjmoyer’s picture

Assigned: Unassigned » tjmoyer
Status: Closed (fixed) » Needs review
StatusFileSize
new834 bytes

The patch supplied here and integrated into the latest release of TranslateThis (7.x-1.1) adds the base_url to the $button_path in translate_this_js_options(), which causes the check on whether $button_path is empty to return false even if the actual path is empty. If a site has "Disable the default button image" selected, but no image settings set, this causes js settings for the button to be set improperly like this:

btnImg : "http://example.com/",
btnHeight : ,
btnWidth: ,

This causes a javascript error, at least in IE.

This patch also corrects a small error in how variable_get is called for the button image path, where there was no second parameter.

BarisW’s picture

Assigned: tjmoyer » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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