Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001277 [Piwigo] web API minor always 2009.11.23 23:36 2009.12.07 23:32
Reporter plg View Status public  
Assigned To plg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 2.0.7 Product Version 2.0.0
  Target Version 2.0.7 Product Build
Summary 0001277: [pwg.images.setInfo] warning or error when trying to associate a photo with a given category twice
Description When trying to associate a photo with a category that is already associated, depending on the error reporting level, we get a warning or a blocking error.
Steps To Reproduce
Additional Information [mysql error 1062] Duplicate entry \'4618-605\' for key 1

INSERT INTO piwigo_image_category
  (image_id,category_id,rank)
  VALUES(\'4618\',\'605\',\'5\')

0000001 my_error /home/pierrick/public_html/piwigo/dev/branches/2.0/include/functions.inc.php(602)
0000002 pwg_query /home/pierrick/public_html/piwigo/dev/branches/2.0/admin/include/functions.php(471)
0000003 mass_inserts /home/pierrick/public_html/piwigo/dev/branches/2.0/include/ws_functions.inc.php(1830)
0000004 ws_add_image_category_relations /home/pierrick/public_html/piwigo/dev/branches/2.0/include/ws_functions.inc.php(1728)
0000005 ws_images_setInfo ()
#6 call_user_func_array /home/pierrick/public_html/piwigo/dev/branches/2.0/include/ws_core.inc.php(533)
#7 PwgServer::invoke /home/pierrick/public_html/piwigo/dev/branches/2.0/include/ws_protocols/rest_handler.php(52)
#8 PwgRestRequestHandler::handleRequest /home/pierrick/public_html/piwigo/dev/branches/2.0/include/ws_core.inc.php(361)
0000009 PwgServer::run /home/pierrick/public_html/piwigo/dev/branches/2.0/ws.php(385)
Tags No tags attached.
browser any
Database engine and version
PHP version
Web server Apache 1.3.x
Attached Files

- Relationships

-  Notes
(0003196)
svn (reporter)
2009.12.07 23:28

[Subversion] r4444 by plg on branch 2.0

-----[Subversion commit log]----------------------------------------------------
feature 1312 added: pwg.images.setInfo can replace multiple values propreties
(tags/categories). The primary condition is to provide "tag_ids" and/or
"categories" input parameters, ie pwg.images.set won't create emptiness. You
can reduce the set of tags/categories but not remove all tags/categories.

bug 1277 fixed: with a stronger algorithm for adding/replacing categories, we
now avoid to recreate an existing image_category association.

When a remote client calls pwg.images.setInfo, Piwigo returns an error 500 if:
1. the "categories" parameter is malformed (no numeric id inside)
2. one of the input categories does not exist at database level.
(0003198)
svn (reporter)
2009.12.07 23:30

[Subversion] r4445 by plg on trunk

-----[Subversion commit log]----------------------------------------------------
merge r4444 from branch 2.0 to trunk

feature 1312 added: pwg.images.setInfo can replace multiple values propreties
(tags/categories). The primary condition is to provide "tag_ids" and/or
"categories" input parameters, ie pwg.images.set won't create emptiness. You
can reduce the set of tags/categories but not remove all tags/categories.

bug 1277 fixed: with a stronger algorithm for adding/replacing categories, we
now avoid to recreate an existing image_category association.

When a remote client calls pwg.images.setInfo, Piwigo returns an error 500 if:
1. the "categories" parameter is malformed (no numeric id inside)
2. one of the input categories does not exist at database level.

- Issue History
Date Modified Username Field Change
2009.11.23 23:36 plg New Issue
2009.11.23 23:36 plg Status new => assigned
2009.11.23 23:36 plg Assigned To => plg
2009.11.23 23:36 plg browser => any
2009.11.23 23:36 plg Web server => Apache 1.3.x
2009.12.07 23:28 svn Checkin
2009.12.07 23:28 svn Note Added: 0003196
2009.12.07 23:30 svn Checkin
2009.12.07 23:30 svn Note Added: 0003198
2009.12.07 23:31 plg Fixed in Version => 2.0.7
2009.12.07 23:31 plg Status assigned => closed
2009.12.07 23:32 plg Resolution open => fixed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker