Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

import vanilla 1 to 2 - parse error

edited October 2009 in Vanilla 2.0 - 2.8
hello!
I correctly installed vanilla 2 in a fresh directory, with the same database of my previous vanilla 1 install.
I'm tryng to /import the old tables: it elaborates the first table and stops at the second, with the message "parse error" without any further explanation.

Is there something I can do, to see what's wrong with the import?
thank you

Comments

  • LincLinc Detroit Admin
    edited October 2009
    Use Firefox, grab the Firebug addon, and enable it before you run the importer. It'll let you see the final error message (Firebug lets you see what Ajax messages are going back and forth to the server). That's how I'm debugging the importer I'm building. :)
  • wow, thanks
    here's the error report!
    I don't undertand what does it mean, maybe a problem with a ' character?

    ---
    FATAL ERROR IN: Gdn_Database.Query();
    "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm a monkey'' at line 1"
    select * from GDN_Role where Name = 'i'm a monkey'
    LOCATION: /nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/library/database/class.database.php
    > 210: $PDOStatement = $this->Connection()->query($Sql);
    > 211: }
    > 212:
    > 213: if ($PDOStatement === FALSE) {
    >>> 214: trigger_error(ErrorMessage($this->GetPDOErrorMessage($this->Connection()->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
    > 215: }
    > 216:
    > 217: $Result = TRUE;
    > 218: // Did this query modify data in any way?
    BACKTRACE:
    [/nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/library/database/class.database.php] PHP::ErrorHandler();
    [/nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/library/database/class.database.php 214] PHP::trigger_error();
    [/nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/applications/garden/controllers/import.php 132] Gdn_Database->Query();
    [/nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/library/core/class.dispatcher.php 220] ImportController->Index();
    [/nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/index.php 41] Gdn_Dispatcher->Dispatch();


    Fatal error: Call to a member function setFetchMode() on a non-object in /nfs/c01/h07/mnt/1686/domains/xxxxxxxxxxxxx.com/html/v2/library/database/class.dataset.php on line 134

  • lucluc ✭✭
    Indeed, an issue with the ' character.

    It's, apparantly, not escaped before importing into the new database.
  • is there a way I can manually escape it?
    or, can I remove all the ' in my table with a regular expression?
    what would be the best way?
  • LincLinc Detroit Admin
    edited October 2009
    They didn't anticipate you using an apostrophe in the role name, it seems. I think this definitely qualifies for a bug report; I'll make one shortly.

    They easiest fix would be to remove the apostrophe from your "i'm a monkey" category name until after the import. I don't think apostrophes will cause a problem in many other places.
  • edited October 2009
    that worked!!!
    thanks! ^____^


    but now I'm stuck at the fourth table :(

    FATAL ERROR IN: Gdn_Database.Query();
    "Duplicate entry '6-8' for key 1"
    insert into GDN_UserRole
    (UserID, RoleID)
    select u.UserID, r.RoleID
    from GDN_User u
    inner join LUM_User ou
    on u.ImportID = ou.UserID
    inner join GDN_Role r
    on ou.RoleID = r.ImportID
    LOCATION: /nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/library/database/class.database.php
    > 210: $PDOStatement = $this->Connection()->query($Sql);
    > 211: }
    > 212:
    > 213: if ($PDOStatement === FALSE) {
    >>> 214: trigger_error(ErrorMessage($this->GetPDOErrorMessage($this->Connection()->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
    > 215: }
    > 216:
    > 217: $Result = TRUE;
    > 218: // Did this query modify data in any way?
    BACKTRACE:
    [/nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/library/database/class.database.php] PHP::ErrorHandler();
    [/nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/library/database/class.database.php 214] PHP::trigger_error();
    [/nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/applications/garden/controllers/import.php 164] Gdn_Database->Query();
    [/nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/library/core/class.dispatcher.php 220] ImportController->Index();
    [/nfs/c01/h07/mnt/1686/domains/xxx.com/html/v2/index.php 41] Gdn_Dispatcher->Dispatch();
    {"NextUrl":"\/v2\/index.php\/import\/5","FormSaved":true,"DeliveryType":"VIEW","Data":"\n

    Hang on while we get your old data. This should take a few minutes...<\/p>\n

    5\/19<\/strong> Importing user\/role relationships.<\/div>\n","StatusMessage":"","RedirectUrl":""}
  • LincLinc Detroit Admin
    How many roles are there in your old forum?
  • edited October 2009
    Unauthenticated

    its a monkey

    Banned

    Member

    SuperMod

    Administrator

    six roles!
  • LincLinc Detroit Admin
    edited October 2009
    Can you run some SQL manually? Try this and then run the importer again:

    delete from GDN_Role where RoleID > 16

    I got a similar error when my Role table had gotten the max number of Roles (32) in it. Maybe from re-running the import you've ended up with a bunch of extra roles? I'm shooting in the dark here. That SQL will remove all the Roles that don't come with Vanilla 2 by default so you can start fresh.

    If that doesn't work you'll need to wait for @Todd or @Mark. :)
  • I tried and doesn't work, it gives me the same error :(
    thank you anyway!
  • did anybody solved this issue or succeded in importing from vanilla 1?
    thank you and sorry for bumping!
  • I've succeeded in importing from Vanilla 1.

    The Github download button seems to always give me files from August for some reason, I had to do a Git-clone to get an up-to-date copy...
  • I did it too! ^___^
  • I am getting this error when trying to import a vbulletin forum. I am assuming this is due to the fact I may have some users with ' in their usernames...
Sign In or Register to comment.