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
Comment #1
stevecowie commentedThe 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.
Comment #2
jowan commentedthanks for the temp fix
Comment #3
derekone commentedyeah...thanks!
Comment #4
eggthing commentedWhere does this code go? Is it in audio.module?
Comment #5
derekone commentedin the file.module in ecommerce
Comment #6
rob101 commentedJust subscribing.... (Also: if anyone is able to post a patched version of the file, that'd be most appreciated.)
Comment #7
brmassa commentedGuys,
fixed on eC4
regards
massa
Comment #8
(not verified) commentedComment #9
jjjames commentedthanks...but seems like ec4 has been in alpha forever. do you think its safe to use ec4 in production right now?
Comment #10
jjjames commentedAlternate solution found here:
http://drupal.org/node/257177
Just wanted to let you all know :)