Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.4

Bug #3068 Admin::update() buggy
Submitted: 2004-12-30 20:14 UTC
From: tobias dot eberle at gmx dot de Assigned: quipo
Status: Closed Package: Translation2
PHP Version: 4.3.10 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 27 = ?

 
 [2004-12-30 20:14 UTC] tobias dot eberle at gmx dot de
Description: ------------ Hello, I have multiple tables for different languages. I have defined a string in one language (i.e. en), but not in another one (i.e. de). If I want to add a translation for 'de' (and maybe change the 'en' one), update() only updates the existing string in 'en' and does not add the new string in 'de' (because it queries "UPDATE translation_de SET de = 'string' WHERE sStringId = 'mystringid' AND sPageId = 'mypageid';", of cause update failes). I have only tested db container. Bye, Tobias Eberle

Comments

 [2005-01-03 17:47 UTC] quipo
I cannot reproduce this issue, it's working fine in my tests. What version are you using? Have you already tried the latest CVS code?
 [2005-01-03 18:25 UTC] tobias dot eberle at gmx dot de
I used beta5. I checked cvs and saw that the admin files were changed last before the release of beta5. Therefore I did not test this yet. Are you sure you added only to the one and not to the other language (Really no entry! Not adding NULL!) while you test it? Firstly I added array(1) { ["en"]=> string(7) "english" } and then do the edit: array(2) { ["en"]=> string(7) "english" ["de"]=> string(6) "german" } A look at Translation2/Admin/Containers/db.php line 351 shows that there weren't any inserts (or I missed them ;-) )
 [2005-01-03 22:06 UTC] quipo
ah, yes. I couldn't reproduce the issue because I used this script (it updates *existing* records on each table): ========================================= $newData = array( 'it' => 'piccolo test', 'en' => 'small test' ); $tr->add('smallTest', null, $newData); $newData = $tr->add('smallTest', null, array('de' => 'kinder')); $newData = array( 'it' => 'piccolissimo test', 'en' => 'tiny test' ); $tr->update('smallTest', null, $newData); ========================================= Anyway, I've committed an updated version of add() and update(), can you tell me if they work for you too? Thanks
 [2005-01-04 12:25 UTC] tobias dot eberle at gmx dot de
Works fine. Thank you for fixing.
 [2005-01-04 16:13 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.