when i try to make an audio node a product in the - create content > audio - and enable 'File download product' at the 'product' options area i get the error;
'Please enter the path to the file.'
at the top of the page.
but the file location box is greyed out and disabled - it says 'Do not edit. File is managed by audio node' but it is also highlighted red indicting it is where the error is. It did the same thing with 5.x.3 which is why I tried the dev. It seems to have something to do with the ec_media.module.

Thanks for looking into it.

Comments

stevecowie’s picture

The problem seems to be that file module tries to use node->path for setting the default value of the textbox that appears on the product section of the audio edit form. Unfortunately it doesn't have a node path because that information is held in the audio table and isn't being passed across. However, the file module can access the node->audio_file array so as a temporary fix on one version I did this:-
if ($node->audio_file->filepath){
$stc_audioinfo = $node->audio_file->filepath; //stc prefix avoids namespace problems
} else {
$stc_audioinfo = $node->fpath; //this is default setting
}
Now use the $stc_audioinfo as the default_value for the files textbox.
Obviously this is not the way to fix this for general release but hopefully may point in the right direction.

jowan’s picture

thanks for the temp fix

derekone’s picture

yeah...thanks!

eggthing’s picture

Where does this code go? Is it in audio.module?

derekone’s picture

in the file.module in ecommerce

rob101’s picture

Just subscribing.... (Also: if anyone is able to post a patched version of the file, that'd be most appreciated.)

brmassa’s picture

Status: Active » Fixed

Guys,

fixed on eC4

regards

massa

Anonymous’s picture

Status: Fixed » Closed (fixed)
jjjames’s picture

thanks...but seems like ec4 has been in alpha forever. do you think its safe to use ec4 in production right now?

jjjames’s picture

Alternate solution found here:

http://drupal.org/node/257177

Just wanted to let you all know :)