fileUpload download script doesn't work on details view linked from menu

remico

Member
I have a fileupload element with the download script enabled and it works as expected except for...

If i link to a detail view from a list entry the download function works fine because there is a rowid available but if I link to a detail view from a menu item, the download function doesn't work because the rowid is not set. So in the download link it says rowid=0 and the dowload fails...

How doe set teh rowid for a detail view from a menu item? Shouldn't be that hard...?
 
I Solved it for now by adding
PHP:
if($rowId == 0){$rowId = $data["__pk_val"];}
at line 2549 of fileupload.php to fill rowid with the key value but this just an emergency fix...
 
I don't see why it shouldn't always use $data['__pk_val'], no need to use $input. So can you try replacing 2547 ...

Code:
$rowId = $input->get('rowid', '0');

... with ...

Code:
$rowId = $data['__pk_val'];

... and remove your change, and make sure it works in both situations? If so, I'll commit that as a change.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top