HomeUnityAnswers
 
 
merkado

Upload Video and Music "undefined"

Upload Video and Music "undefined"

I do not know why 2weeks ago without any response in boonex and help for others.

I am very afraid what happening to my site

Member cant upload their music and Video.

Always prompt: "undefined"

Anyone can help me?

bad
1
good
 
 

Answers

merkado
merkado 136 days agocomment permalink
 
Leon, too slow support

It almost 4days ago...
 
bad
1
good
 
 
LeonidS
LeonidS 140 days agocomment permalink
 
Did you apply this solutions

http://www.boonex.com/trac/ray/wiki/GenRayTShooter#IgetUploadingfileerrorwhenuploadingaudiovideofilesinRayMediaandVideoPlayers

What version of Dolphin package do you have?

Did you get any errors to your bug report emails?
 
bad
0
good
 
View 1 replies to this comment
 
passerby
passerby 52 days agocomment permalink
 
well I had the same error
I have found out that music player widget tries to insert an entry for the newly uploaded file with a blank Uri field, which results in mysql duplicate key error.
Strangely ad-enabled widget works as it should. I did not check for any further regressions, but just fixed this one for now.
here is a patch
diff -ur inc.bak inc
diff -ur inc.bak/actions.inc.php inc/actions.inc.php
--- inc.bak/actions.inc.php 2008-11-16 18:38:44.000000000 +0100
+++ inc/actions.inc.php 2008-11-16 19:21:47.000000000 +0100
@@ -265,7 +265,8 @@
break;
}
$sAutoApprove = $bAdmin ? TRUE_VAL : getSettingValue($sModule, "autoApprove");
- getResult("INSERT INTO `" . MODULE_DB_PREFIX . "Files`(`CategoryId`, `Title`, `Tags`, `Description`, `Date`, `Owner`, `Approved`) VALUES ('" . $sCategory . "', '" . $sTitle . "', '" . $sTags . "', '" . $sDesc . "', '" . time() . "', '" . $sId . "', '" . $sAutoApprove . "')");
+ $sUri = genUri($sTitle);
+ getResult("INSERT INTO `" . MODULE_DB_PREFIX . "Files`(`CategoryId`, `Title`, `Uri`, `Tags`, `Description`, `Date`, `Owner`, `Approved`) VALUES ('" . $sCategory . "', '" . $sTitle . "', '".$sUri."', '" . $sTags . "', '" . $sDesc . "', '" . time() . "', '" . $sId . "', '" . $sAutoApprove . "')");
$sFileId = getLastInsertId();
if(!renameFile($sId, $sFileId))
{
diff -ur inc.bak/customFunctions.inc.php inc/customFunctions.inc.php
--- inc.bak/customFunctions.inc.php 2008-11-16 18:38:44.000000000 +0100
+++ inc/customFunctions.inc.php 2008-11-16 19:20:11.000000000 +0100
@@ -1,9 +1,15 @@
<?
require_once("../inc/header.inc.php");
require_once( BX_DIRECTORY_PATH_INC . 'tags.inc.php' );
+require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );

function parseTags($iId)
{
reparseObjTags( 'music', $iId );
}
+function genUri($s)
+{
+ return uriGenerate($s, MODULE_DB_PREFIX.'Files', 'Uri', 255);
+}
+
?>
\ No newline at end of file
 
bad
0
good
 
 
passerby
passerby 52 days agocomment permalink
 
P.S.
this applies to ray/modules/music
 
bad
0
good
 
 


Post an Answer

Please login to post an answer.

This Question
 
 
merkado's questions
All Questions
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.362329006195