Fixed Completing Import throws Server Error

rellek

Well-known member
Hi,

I was test importing a vBulletin 3.8 to XF 1.2 b3 and when it finished rebuilding threads, a error was thrown. From the error log:

Code:
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP Fatal error:  Class name must be a valid object or a string in [path]/xftest/library/XenForo/Model/Import.php on line 108
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP Stack trace:
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP   1. {main}() [path]/xftest/admin.php:0
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP   2. XenForo_FrontController->run() [path]/xftest/admin.php:13
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP   3. XenForo_FrontController->dispatch() [path]/xftest/library/XenForo/FrontController.php:132
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP   4. XenForo_ControllerAdmin_Import->actionComplete() [path]/xftest/library/XenForo/FrontController.php:335
[Mon Jul 01 21:43:11 2013] [error] [client my.ip] PHP   5. XenForo_Model_Import->getImporter() [path]/xftest/library/XenForo/ControllerAdmin/Import.php:276
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP Fatal error:  Class name must be a valid object or a string in [path]/xftest/library/XenForo/Model/Import.php on line 108
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP Stack trace:
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP   1. {main}() [path]/xftest/admin.php:0
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP   2. XenForo_FrontController->run() [path]/xftest/admin.php:13
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP   3. XenForo_FrontController->dispatch() [path]/xftest/library/XenForo/FrontController.php:132
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP   4. XenForo_ControllerAdmin_Import->actionComplete() [path]/xftest/library/XenForo/FrontController.php:335
[Mon Jul 01 21:43:12 2013] [error] [client my.ip] PHP   5. XenForo_Model_Import->getImporter() [path]/xftest/library/XenForo/ControllerAdmin/Import.php:276
 

Mike

XenForo developer
Staff member
I have made a tweak here, but I don't think that this code should be running after an import. I also can't reproduce it here. Can you confirm the URL you were on when this error was triggered?
 

rellek

Well-known member
The URL was [path]/admin.php?import/complete and it still throws an error. I can give you access if you want.

It happend after I clicked "Complete Import" and after users and threads were rebuilt. It redirected there and died.
 

Mike

XenForo developer
Staff member
The error if you hit that page after clicking complete was always there (as the import session is already removed). The issue relates to redirecting there -- that doesn't happen to me. It should be redirecting to admin.php?import/complete&confirm=ImporterName (and it does in my tests). Regardless, I have at least prevented the error in 1.2 if you end up at the wrong page.

The only way I can see getting to that page is if the "archive" form was submitted twice.
 

rellek

Well-known member
The only way I can see getting to that page is if the "archive" form was submitted twice.
Well, this could have happened. Is the submit button disabled after clicking (like it is in the Customer Area when I download a build)?

Btw, admin.php?import/complete&confirm=ImporterName throws an error too:
Code:
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP Fatal error:  Class name must be a valid object or a string in [path]/xftest/library/XenForo/Model/Import.php on line 108
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP Stack trace:
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP   1. {main}() [path]/xftest/admin.php:0
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP   2. XenForo_FrontController->run() [path]/xftest/admin.php:13
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP   3. XenForo_FrontController->dispatch() [path]/xftest/library/XenForo/FrontController.php:132
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP   4. XenForo_ControllerAdmin_Import->actionComplete() [path]/xftest/library/XenForo/FrontController.php:335
[Tue Jul 02 12:45:36 2013] [error] [client my.ip] PHP   5. XenForo_Model_Import->getImporter() [path]/xftest/library/XenForo/ControllerAdmin/Import.php:268
 

Mike

XenForo developer
Staff member
True, though that particular example was a placeholder. It's not what you would've actually been redirected to (the importer name would be a valid class).
 

rellek

Well-known member
OK, will try the import again with the next beta and report back. :)

Thanks for your time.
 
Top