mysql error trying embed video

getting this error, scratched all my hair off so now i ask here. i will post just the beginning of the error message if whole message needed i can post it, i have the video setting set to embed only, when i create new video and after pasting youtube code, i am pulling in the info from youtube, the info screen comes up but it is red background, i fill out info and hit add, this the error getting in email after trying to add the embedded youtube video, when i inspect my database under sys_album, the info seems to be writing ok, id is updating and count is correct, then i check sys_album_objects, id_album matches and id_object is showing 0 insted of 1, think i to close to problem and cannot see it, any help appreciated. 

 

Query:

INSERT INTO `sys_albums_objects` (`id_album`, `id_object`) VALUES ('25', '0')

Mysql error: Duplicate entry '25-0' for key 'id_album'

Found error in the file '/xxxxxx/inc/classes/BxDolAlbums.php' at line 387.

Called 'query' function with erroneous argument #0.


Debug backtrace:

Array
(
    [1] => Array
        (
            [file] => /xxxxxx/inc/classes/BxDolDb.php
[line] => 246 [function] => error [class] => BxDolDb [object] => BxDolDb Object ( [error_checking] => 1 [error_message] => Duplicate entry '25-0' for key 'id_album' [host] => localhost [port] => [socket] => [dbname] => adult [user] => ***** [password] => ***** [link] => Resource id #28 [current_res] => [current_arr_type] => 1 [oParams] => BxDolParams Object ( [_oDb] => BxDolDb Object *RECURSION* [_oCache] => BxDolCacheFile Object ( [sPath] => /xxxxxx/cache/
) [_sCacheFile] => sys_options_1c5a6e3bbf55b4881edcf68f4785a971.php [_aParams] => [truncated] ) [oDbCacheObject] => BxDolCacheFile Object ( [sPath] => /xxxxxx/cache/
) ) [type] => -> [args] => Array ( [0] => Database query error [1] => [2] => INSERT INTO `sys_albums_objects` (`id_album`, `id_object`) VALUES ('25', '0') ) ) [2] => Array ( [file] => /xxxxxx/inc/classes/BxDolDb.php
[line] => 214 [function] => res [class] => BxDolDb [object] => BxDolDb Object ( [error_checking] => 1 [error_message] => Duplicate entry '25-0' for key 'id_album' [host] => localhost [port] => [socket] => [dbname] => adult [user] => ***** [password] => ***** [link] => Resource id #28 [current_res] => [current_arr_type] => 1 [oParams] => BxDolParams Object ( [_oDb] => BxDolDb Object *RECURSION* [_oCache] => BxDolCacheFile Object ( [sPath] => /xxxxxx/cache/
) [_sCacheFile] => sys_options_1c5a6e3bbf55b4881edcf68f4785a971.php [_aParams] => [truncated] ) [oDbCacheObject] => BxDolCacheFile Object ( [sPath] => /xxxxxx/cache/ ) ) [type] => -> [args] => Array ( [0] => INSERT INTO `sys_albums_objects` (`id_album`, `id_object`) VALUES ('25', '0') ) )

 

Quote · 19 Jul 2016

also when i click on save video it saying "failed to accept information"

Quote · 19 Jul 2016

appreciate all the help thanx

Quote · 20 Jul 2016

Query:

 

INSERT INTO `sys_albums_objects` (`id_album`, `id_object`) VALUES ('25', '0')

Mysql error: Duplicate entry '25-0' for key 'id_album'


The error message is quite clear, there is already an entry 25-0 for the key; you can not have two entries with the same values for the key.

What version of Dolphin is this because 7.3 does not have an insert statement on that line.

Geeks, making the world a better place
Quote · 20 Jul 2016

7.3.1 is version, yes i thought also was obvious problem, i went into and cleared out all the old records relating to this error in my database, when trying again to add another youtbe embed the same error appear again, i even went so far as to delete all video folders in database and tried to create new video folder when uploading new youtube embed video, still same error, thanks again for the help, i am really stumped, 

Quote · 20 Jul 2016

after clearing all video folder, the script creating new folder automatically, my site is a new install, starting with version 7.3.1, i didn't upgrade from a older version, fresh database etc. i am not sure if this makes a difference, photos are writing ok, seems maybe a conflict on the video side when writing, i have not tested the sounds yet to see if they will write correctly

Quote · 20 Jul 2016

here is copy of database before trying to add new youtube embed, you can see the error it throwing me doesn't exsist, the sound upload also not working, photos working fine, all 3 of course sharing this 2 database.

 

-- -------------------------------------------------------- 
-- -- Table structure for table `sys_albums_objects` -- 
CREATE TABLE IF NOT EXISTS `sys_albums_objects` (
  `id_album` int(10) NOT NULL,
  `id_object` int(10) NOT NULL,
  `obj_order` int(10) NOT NULL DEFAULT '0',
  UNIQUE KEY `id_album` (`id_album`,`id_object`),
  KEY `id_object` (`id_object`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- -- Dumping data for table `sys_albums_objects` -- 
INSERT INTO `sys_albums_objects` (`id_album`, `id_object`, `obj_order`) VALUES
(1, 1, 0),
(7, 6, 6),
(2, 3, 1),
(2, 4, 0),
(3, 5, 0),
(10, 7, 0),
(9, 8, 0),
(7, 9, 0),
(3, 10, 0),
(12, 11, 0),
(13, 12, 0),
(14, 13, 0),
(23, 21, 0),
(22, 20, 0),
(20, 18, 0),
(40, 28, 0),
(28, 22, 0),
(30, 26, 0),
(2, 25, 0),
(31, 27, 0);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- Table structure for table `sys_albums` -- 
CREATE TABLE IF NOT EXISTS `sys_albums` (
  `ID` int(10) NOT NULL AUTO_INCREMENT,
  `Caption` varchar(128) NOT NULL DEFAULT '',
  `Uri` varchar(255) NOT NULL DEFAULT '',
  `Location` varchar(128) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(20) NOT NULL DEFAULT '',
  `Owner` int(10) NOT NULL DEFAULT '0',
  `Status` enum('active','passive') NOT NULL DEFAULT 'active',
  `Date` int(10) NOT NULL DEFAULT '0',
  `ObjCount` int(10) NOT NULL DEFAULT '0',
  `LastObjId` int(10) NOT NULL DEFAULT '0',
  `AllowAlbumView` int(10) NOT NULL DEFAULT '3',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `Uri` (`Uri`,`Type`,`Owner`),
  KEY `Owner` (`Owner`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ;

-- -- Dumping data for table `sys_albums` -- 
INSERT INTO `sys_albums` (`ID`, `Caption`, `Uri`, `Location`, `Description`, `Type`, `Owner`, `Status`, `Date`, `ObjCount`, `LastObjId`, `AllowAlbumView`) VALUES
(1, 'Hidden', 'Hidden', '', '', 'bx_photos', 1, 'active', 1467750488, 1, 1, 8),
(2, 'cowboy''s photos', 'cowboy-s-photos', '', '', 'bx_photos', 1, 'active', 1467751932, 3, 4, 3),
(3, 'cowboy''s cover photos', 'cowboy-s-cover-photos', '', '', 'bx_photos', 1, 'active', 1467751932, 2, 5, 3),
(7, 'maryann''s photos', 'maryann-s-photos', '', '', 'bx_photos', 3, 'active', 1468288231, 2, 6, 3),
(9, 'maryann''s cover photos', 'maryann-s-cover-photos', '', '', 'bx_photos', 3, 'active', 1468294631, 1, 8, 3),
(10, 'Photo', 'Photo', '', '', 'bx_photos', 3, 'active', 1468294653, 1, 7, 3),
(12, 'Mhy''s photos', 'Mhy-s-photos', '', '', 'bx_photos', 33, 'active', 1468717564, 1, 11, 3),
(13, 'Norma''s photos', 'Norma-s-photos', '', '', 'bx_photos', 34, 'active', 1468717871, 1, 12, 3),
(14, 'bhabe123''s photos', 'bhabe123-s-photos', '', '', 'bx_photos', 35, 'active', 1468729104, 1, 13, 3),
(22, 'Member', 'Member', '', '', 'bx_photos', 1, 'active', 1468870024, 1, 20, 8),
(31, 'lauracute''s photos', 'lauracute-s-photos', '', '', 'bx_photos', 45, 'active', 1469019532, 1, 27, 4),
(40, 'cowboy''s timeline photos', 'cowboy-s-timeline-photos', '', '', 'bx_photos', 1, 'active', 1469112443, 1, 28, 4),
(20, 'sammy''s photos', 'sammy-s-photos', '', '', 'bx_photos', 36, 'active', 1468854221, 1, 18, 4),
(23, 'coolsaint''s photos', 'coolsaint-s-photos', '', '', 'bx_photos', 37, 'active', 1468877147, 1, 21, 4),
(28, 'marites''s photos', 'marites-s-photos', '', '', 'bx_photos', 38, 'active', 1468891387, 1, 22, 4),
(30, 'Tim''s photos', 'Tim-s-photos', '', '', 'bx_photos', 42, 'active', 1468957073, 1, 26, 4);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Quote · 21 Jul 2016

i must have stumbled onto something here to hard to figure out on a forum, i am thinking it trying write more than one time the same video id, the obvious solution is that there is a file already existing in database with that id number, but the file doesn't exist before trying to embed a new post, that is why i thinking thru the process of adding new post the id number is being created 2 times. well if anyone has any other ideas i would appreciate them, otherwise i will just start climbing thru the scripts and see how this thing ticks

Quote · 21 Jul 2016

Unless it is just me; that error report is off.

Open inc/classes/BxDolAlbums.php at line 387; there is a right brace there }

There is an insert statement on line 378.

Geeks, making the world a better place
Quote · 22 Jul 2016

this is the section you speaking of starting line 365 in inc/classes/BxDolAlbums.php, 

 

   // album's objects methods

    function addObject ($iAlbumId, $mixedObj, $bUpdateCount = true)

    {

        $iAlbumId = (int)$iAlbumId;

        if ($iAlbumId == 0)

            return;

        $sqlFields = "`id_album`, `id_object`";

        $sqlBody = "";

        $iLastObjId = $this->getLastObj($iAlbumId);

        $iCount = 0;

        if (is_array($mixedObj)) {

            foreach ($mixedObj as $iValue) {

                $iValue = (int)$iValue;

                $sqlBody .= "('$iAlbumId', '$iValue'), ";

                $iCount++;

            }

        } else {

            $iValue = (int)$mixedObj;

            $sqlBody = "('$iAlbumId', '$iValue')";

            $iCount++;

        }

        $sqlQuery = "INSERT INTO `{$this->sAlbumObjectsTable}` ($sqlFields) VALUES " . trim($sqlBody, ', ');

        $iRes = $GLOBALS['MySQL']->query($sqlQuery);

 

        if ($bUpdateCount) {

            $this->updateObjCounter($iAlbumId, $iCount);

            if ($iLastObjId == 0)

                $this->updateLastObj($iAlbumId, $iValue);

            elseif ($iLastObjId !=0 && getParam($this->sAlbumCoverParam) == 'on')

                $this->updateLastObj($iAlbumId, $iValue);

        }

        return $iRes;

    }

Quote · 23 Jul 2016

definitely trying to write 2 times the same information, finding it the way everything is linked together isn't easy unless you knowledgeable in how it written. i am sure it a simple fix for right person, does boonex follow this forum area? if not where can I contact boonex to get assistance this problem? 

Quote · 27 Jul 2016

Here is a question to be asking; why is it writing 25-0 for the album id?

Mysql error: Duplicate entry '25-0' for key 'id_album'

The code is:

INSERT INTO `sys_albums_objects` (`id_album`, `id_object`) VALUES ('25', '0')

Although I am not sure the id of the object is suppose to be zero.

And I posted the question that the error code is not referencing actually code in Dolphin 7.3.  It is point to a freaking brace, not an insert command.

So there is some major crap here that we really can not help with because we don't have access to your site.  However, don't ignore points here because they are very interesting points.

Geeks, making the world a better place
Quote · 27 Jul 2016

I guess I should have asked this at the beginning; have you modified code for some third party module or just on your own?

Geeks, making the world a better place
Quote · 27 Jul 2016

let me retrace that idea of modifying code, i have added 3rd party mods, but the few changes I have made i cannot see how they could have effected this, will have a look at those changes and the mods that possibly effecting this. it is always possible something extra left behind. if it just me experiencing this problem, that would be the obvious trouble maker, if i have no luck would you, geek_girl be willing to have a look inside this problem if i give you access?

Quote · 29 Jul 2016

i deleted both files, BxDolAlbums.php, BxDolDb.php, and uploaded a clean file for both, cleared cache, and tried again to embed youtube same error message. i will set you up a ftp username geek_girl if you would like to have a look, this server is where i build sites, haven't moved it yet to the production server, i am already getting members joining, so some care is needed in preserving the info, if you wouldn't mind having a look i would really appreciate your help. , 

 

   

Quote · 29 Jul 2016

figured it out, problem in the boonex flash files

Quote · 1 Aug 2016

Could you give a bit more details ?

Geeks, making the world a better place
Quote · 1 Aug 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.