
merkado
Upload Video and Music "undefined"
Answers
| LeonidS | 140 days ago![]() |
![]() | ![]() | |
![]() | 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? | ![]() |
![]() | ![]() | ![]() |
View 1 replies to this comment
| passerby | 52 days ago![]() |
![]() | ![]() | |
![]() | 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 | ![]() |
![]() | ![]() | ![]() |
Post an Answer
Please login to post an answer.

































