coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 bridging => Topic started by: spyro00 on October 01, 2010, 05:36:26 PM

Title: bridge with phpbb3
Post by: spyro00 on October 01, 2010, 05:36:26 PM
im getting an error after activating the bridge with custom groups, before it was working ok withou custom groups
now every time i create a new category it gives me this error


error
While executing query 'INSERT INTO cpg14x_categorymap (cid, group_id) VALUES (0, 2)' in catmgr.php on line 594

mySQL error: Duplicate entry '0-2' for key 'PRIMARY'




debug



USER:
------------------
Array
(
    [ID] => d58d245b99a2a90403f9cc3f297815ab
    [am] => 1
    [lang] => portuguese
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => admin
    [groups] => Array
        (
           
Title: Re: bridge with phpbb3
Post by: Joachim Müller on October 01, 2010, 07:22:35 PM
Not a valid bug report (http://documentation.coppermine-gallery.net/en/testing.htm). Not even a valid support request. Moving from cpg1.5 Testing/Bugs (http://forum.coppermine-gallery.net/index.php/board,85.0.html) to the corresponding support board. Provide the needed details as per documentation (http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_support_start) if you want help.
Title: Re: bridge with phpbb3
Post by: Nibbler on October 01, 2010, 07:30:43 PM
Fix is to change include/functions.inc.php


function cpg_db_last_insert_id()
{
    return mysql_insert_id();
}


to


function cpg_db_last_insert_id()
{
    global $CONFIG;

    return mysql_insert_id($CONFIG['LINK_ID']);
}


Commited in 7947 (http://coppermine.svn.sourceforge.net/viewvc/coppermine?view=revision&revision=7947)