multiple links with same URL make problems
Posted: Tue Jun 19, 2007 4:35 pm
When i create multiple links to the same URL in an article entry, a postgresql error complaining violation of uniqueness is shown. Only one of the links is being saved (which is not so a big problem)
I think the problem is in "serendipity_handle_references" in functions_trackbacks.inc.php. I haven´t fully investigated this, but guess it is somehow related to the use of the linkurl as a unique key in those arrays there which will go wrong if theres a url is used more than once.
My S9Y version is 1.2b2.
Edit :
When Editing an entry, even more unique violations of the same kind are reported.
Code: Select all
[...]
Warning: pg_query() [function.pg-query]: Query failed: ERROR: duplicate key violates unique constraint "serendipity_references_pkey" in /www/blog.evilazrael.de/include/db/postgres.inc.php on line 210
Error in INSERT INTO serendipity_references (id, entry_id, name, link) VALUES(310, 42, 'Im Geierforum berichtet "Zampato"', 'http://www.geierforum.de/ftopic11485.html')
ERROR: duplicate key violates unique constraint "serendipity_references_pkey"
array (
0 =>
array (
'file' => '/www/blog.evilazrael.de/include/functions_trackbacks.inc.php',
'line' => 529,
'function' => 'serendipity_db_query',
'args' =>
array (
0 => 'INSERT INTO serendipity_references (id, entry_id, name, link) VALUES(310, 42, \'Im Geierforum berichtet "Zampato"\', \'http://www.geierforum.de/ftopic11485.html\')',
),
),
1 =>
array (
'file' => '/www/blog.evilazrael.de/include/functions_entries.inc.php',
'line' => 1287,
'function' => 'serendipity_handle_references',
'args' =>
array (
0 => '42',
1 => 'Evil Azraels Stänkerblog',
2 => 'Otto Gutschein Aktion - Panne oder Abzocke?? ',
3 => '[..]',
4 => false,
),
),
2 =>
array (
'file' => '/www/blog.evilazrael.de/include/functions_config.inc.php',
'line' => 714,
'function' => 'serendipity_updertEntry',
'args' =>
array (
0 =>
array (
'id' => '',
'title' => 'Otto Gutschein Aktion - Panne oder Abzocke?? ',
'timestamp' => '1182256497',
'body' => '[..]',
'extended' => '',
'categories' =>
array (
0 => '0',
),
'isdraft' => 'false',
'allow_comments' => 'true',
'moderate_comments' => 'false',
'exflag' => false,
),
),
),
3 =>
array (
'file' => '/www/blog.evilazrael.de/include/functions_config.inc.php',
'line' => 675,
'function' => 'serendipity_iframe',
'args' =>
array (
0 =>
array (
'id' => 42,
'title' => 'Otto Gutschein Aktion - Panne oder Abzocke?? ',
'timestamp' => '1182256497',
'body' => '[..]',
'extended' => '',
'categories' =>
array (
0 => '0',
),
'isdraft' => 'false',
'allow_comments' => 'true',
'moderate_comments' => 'false',
'exflag' => false,
),
1 => 'save',
2 => true,
),
),
4 =>
array (
'file' => '/www/blog.evilazrael.de/serendipity_admin.php',
'line' => 43,
'function' => 'serendipity_is_iframe',
'args' =>
array (
),
),
)
INSERT INTO serendipity_references (id, entry_id, name, link) VALUES(310, 42, 'Im Geierforum berichtet "Zampato"', 'http://www.geierforum.de/ftopic11485.html')
Der Eintrag wurde gespeichert (Anzeigen)
My S9Y version is 1.2b2.
Edit :
When Editing an entry, even more unique violations of the same kind are reported.