Development

#3116 (Javascript Error - input_asset_tag [solution])

You must first sign up to be able to contribute.

Ticket #3116 (new defect)

Opened 4 months ago

Javascript Error - input_asset_tag [solution]

Reported by: dlachapelle Assigned to: francois
Priority: major Milestone:
Component: sfMediaLibraryPlugin Version: 1.0.10
Keywords: Cc:
Qualification: Unreviewed

Description

I found a bug with the input_asset_tag in Firefox 3 - It is unable to locate the form name using "this.previousSibling.previousSibling.form.name" in sfMediaLibraryHelper.php.

A simple solution is to add the following code to sfMediaLibraryHelper.php after:

$form_name = 'this.previousSibling.previousSibling.form.name';

Add:

if (isset($optionsform_name?)) {

$form_name = '\.$optionsform_name?.'\; unset($optionsform_name?);

}

Then when you call input_asset_tag() you can add the form name to the options variable:

input_asset_tag('somename',,array('form_name'=>'MyForm?');