•  
      request #5854 Card label deleted when moving cards
    Infos
    #5854
    Laurent Delaigue (ldelaigue)
    2014-03-27 10:42
    2014-01-09 14:08
    5966
    Details
    Card label deleted when moving cards
    I'm using Tuleap 6.9 on CentOS 5.9 / php 5.3.3.

    When I move a card from a column to another, the card looks like it is properly updated. but when I refresh the cardwall page, the card's label vanishes.
    I receive no mail notification of any change.

    In my server's log, I find this:

    [Thu Jan 09 13:57:17 2014] [error] [client 192.168.30.113] PHP Notice: DB error ==> INSERT INTO tracker_changeset_value_text(changeset_value_id, value, body_format)\n SELECT 1218, value, body_format\n FROM tracker_changeset_value_text\n WHERE changeset_value_id = 1194 @@ /usr/share/codendi/src/common/dao/include/DataAccessObject.class.php at line 144 in /usr/share/codendi/src/common/dao/include/DataAccessObject.class.php on line 152, referer: https://****/plugins/agiledashboard/?group_id=101&planning_id=2&action=show&aid=6&pane=cardwall
    [Thu Jan 09 13:57:19 2014] [error] [client 192.168.30.113] PHP Fatal error: Call to a member function hasChanged() on a non-object in /usr/share/codendi/plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php on line 646, referer: https://****/plugins/agiledashboard/?group_id=101&planning_id=2&action=show&aid=6&pane=cardwall
    Agile Dashboard
    development
    CentOS 5 + php53
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2014-03-27
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    I close the ticket since this problem has been solved by applying the given SQL, and nobody else seems to have encountered the same issue.

    • Status changed from New to Closed
    • Close date set to 2014-03-27
    User avatar
    I issued this command and it seems to fix the problem.

    What i'm afraid of is that maybe, if a DB update script went wrong, other tables may have invalid structures...
    User avatar

    It is strange that the structure of the table is not correct and the corresponding bucket are marked as skipped… I'm wondering if it comes from the generation/update of the appliance.

    Could you please issue the following command and see if it changes things?

    ALTER TABLE tracker_changeset_value_text ADD COLUMN body_format varchar(16) NOT NULL default 'text';
    User avatar
    +----+-------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+
    | id | script                                                                                                            | start_date          | end_date            | status |
    +----+-------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+
    | 37 | /usr/share/codendi/plugins/tracker/db/mysql/updates/2012/201206211511_add_body_format_column.php                  | 2013-10-03 15:42:08 | 2013-10-03 15:42:08 |      3 |
    | 81 | /usr/share/codendi/plugins/tracker/db/mysql/updates/2013/201310301030_add_body_format_on_field_text_changeset.php | 2013-11-12 09:27:42 | 2013-11-12 09:27:42 |      3 |
    +----+-------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+
    2 rows in set (0.00 sec)
    
    User avatar

    It seems that an upgrade has failed since you should have the following:

    *************************** 1. row ***************************
           Table: tracker_changeset_value_text
    Create Table: CREATE TABLE `tracker_changeset_value_text` (
      `changeset_value_id` int(11) NOT NULL,
      `value` text NOT NULL,
      `body_format` varchar(16) NOT NULL default 'text',
      PRIMARY KEY  (`changeset_value_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    
    

    What is the result of the following sql command?

    SELECT * FROM forge_upgrade_bucket WHERE script LIKE '%body_format%';
    
    User avatar
    Thanks for the details. Here is the result:

    *************************** 1. row ***************************
    Table: tracker_changeset_value_text
    Create Table: CREATE TABLE `tracker_changeset_value_text` (
    `changeset_value_id` int(11) NOT NULL,
    `value` text NOT NULL,
    PRIMARY KEY (`changeset_value_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    User avatar

    First you need to know the codendiadm password to connect to the database. You should find it in /etc/codendi/conf/database.inc on your server, alongside the name of the database ($sys_dbpasswd and $sys_dbname).

    Then issue the following command:

    $> mysql -u codendiadm -p codendi
    

    Where codendi is the name of the database (may be tuleap). Once connected to mysql (it will prompt the password), issue the command:

    mysql> SHOW CREATE TABLE tracker_changeset_value_text \G

    And copy-paste here the result.

    User avatar
    Hi Nicolas,

    Sorry, I feel dumb, but... How can I run this SQL command, and on which database?
    I'm not familiar with CentOS and Tuleap administration, so please tell me the steps or a documentation page if there is one.

    Thanks in advance
    User avatar

    Hi Laurent,

    What is the result of the following sql command ?

    SHOW CREATE TABLE tracker_changeset_value_text;
    User avatar
    I upgraded Tuleap and still have the same problem, but I don't have this problem on tuleap.net for instance.
    I repeatedly get 2 kinds of DB errors in the server's error_log.
    I'm wondering if I have upgraded correctly.
    Here is what I do to upgrade my server:

    /etc/init.d/codendi stop
    service httpd stop
    yum update tuleap*
    /usr/lib/forgeupgrade/bin/forgeupgrade --config=/etc/codendi/forgeupgrade/config.ini update
    service httpd start
    /etc/init.d/codendi start

    Am I missing something?