Importing from Discourse

Timelord_

Member
Thanks. I just purchased a license based on this conversation.

Now when trying to do the data import, it is asking to connect to a DB. How do I bypass this and import from a backup?


import.webp
 
You just need to create the database and user in your hosting account and import the backup file so it exists in sql.

Then enter the details used to create the database and user in the XF import page.
 
So, I need to create a PostGres DB? I am on a cPanel server, so I don't think I have the option to create a PostgreSQL DB. When I try to import the .sql file into MySQL it obviously fails.
 
Well, as is my luck today, my host does not support PostgreSQL in their shared environment, so, let me try to figure out a workaround.

For the Discourse Root Directory, I am assuming this is /var/discourse?
 
I am not sure I am following.

Assume I am able to convert my PostgreSQL file to a MySQL file. I then create a blank MySQL DB in my hosting, how do I use the importer for Discourse it is still looking to connect to a PostgreSQL environment?
 
Ah yes, I overlooked that as I've never imported from discourse.

In which case you will need postgres support in your hosting environment.

Although it would be possible to modify the importer to use mysql but that's getting into custom development.
 
So, I finally got the DB to import, so I am one step closer to world domination. What I need to know now is what to enter into the

Discourse Root Directory

I assume this is the root directory of my XenForo install? So something like \home\domain\public_html

Also, where do I upload the "assets" from the Discourse forum to Xenforo? I am thinking specifically about files that were uploaded to the Discourse forum
 
It's the root directory for discourse.

Create a temp directory in public_html and unzip the files there, then enter that path.
The importer will then grab anything required and populate the XF directories.
 
OK, that has been completed, however the importer just shows this error.

import1.webp

What is the expected contents? In the root directory listed above is a folder called uploads

I have tried adding that to the path, but the same issue
 
I believe the layout differs from what we expect depending on how the Discourse installation was set up. Try renaming the gt-import folder to public and entering just /home/gametalk/public_html as the root directory. We'll make changes to accomodate this better going forward.
 
So, using the /home/gametalk/public_html/public seemed to work better, at the very least it kicked off the process. However, when it came time to finalize, I get the following error.

Error: Call to a member function rebuildUserFieldValuesCache() on null in src/XF/Job/User.php at line 58
  1. XF\Job\User->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 42
  2. XF\Job\AbstractRebuildJob->run() in src/XF/Job/Atomic.php at line 40
  3. XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 260
  4. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202
  5. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 118
  6. XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 122
  7. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
  12. XF\App->run() in src/XF.php at line 524
  13. XF::runApp() in admin.php at line 13


Any thoughts?
 
So, our of frustration, I deleted the entire XF install, ran a totally new install, and the import completed without error.

For the XenForo team, would you be interested in me writing up the process to make it actually work?
 
Back
Top Bottom