[JIRA] Created: (DSY-740) namespace error when upgrading empty daisy 2.2 repository to daisy 2.3

View: New views
1 Messages — Rating Filter:   Alert me  

[JIRA] Created: (DSY-740) namespace error when upgrading empty daisy 2.2 repository to daisy 2.3

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

namespace error when upgrading empty daisy 2.2 repository to daisy 2.3
----------------------------------------------------------------------

         Key: DSY-740
         URL: http://issues.cocoondev.org//browse/DSY-740
     Project: Daisy
        Type: Bug
  Components: Repository  
    Versions: 2.3    
 Environment: Linux, Mysql 5.0, Daisy 2.3
 Reporter: Tom Brusselle
    Priority: Minor


When trying to add the first site to daisy that was recently upgraded from version 2.2 to 2.3, we got the following error message:
"Namespace 'www' is not managed by the repository. Could not generate an id. To solve this try making the namespace managed"
This 2.2 daisy was empty (no documents) when i upgraded it, and i think that was what caused problem.

When looking in the database what could cause this, i noticed that the "document_sequence" table was empty, where in a fresh daisy 2.3 installation, after starting the repository, a record (maxid=0, ns_id=1) already exists.
After manualy adding this record in the database of the upgraded daisy, it was possible to add a wiki site (and new documents).  

I think the reason is that the database update script daisy-2_2-to-2_3.sql doesn't seem to account for the possibility that the table document_sequence might be empty.  The relevant lines in the script are the following:

    # Set the document sequence for the default namespace
    update document_sequence set ns_id = 1;

If the table is empty, this wil not add a record, but apparently daisy 2.3 needs there to be a record with ns_id=1 to add a document.
So the database script should probably check for this condition, and if there is no record present in the table document_sequence, a record (maxid=0, ns_id=1) should be added.

it's probably an unlikely situation that someone has an empty daisy 2.2 instance and wants to update that to daisy 2.3, instead of installing a fresh daisy 2.3.  So this is probably a minor issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy