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
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
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
0
Comments
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
It's, apparantly, not escaped before importing into the new database.
or, can I remove all the ' in my table with a regular expression?
what would be the best way?
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.
Discussion of similar issue: http://vanillaforums.org/discussion/comment/97250/#Comment_97250
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
its a monkey
Banned
Member
SuperMod
Administrator
six roles!
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.
thank you anyway!
thank you and sorry for bumping!
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...