Fixed Trying to import XF2.1 to XF2.1 installation -- Errors received

Chernabog

Well-known member
Affected version
2.1rc1
I am trying to import a site into ours and I have only selected the bare minimums to facilitate the import being users, avatars, nodes, threads, messages and PMs. However I keep getting this error (even though I have not selected anything related to likes, etc.)

TitanX Games



InvalidArgumentException: Could not find 'first_post_likes' in data in src/XF/Import/Importer/AbstractImporter.php at line 203

  1. XF\Import\Importer\AbstractImporter->mapKeys() in src/addons/XFI/Import/Importer/XenForo2.php at line 1563
  2. XFI\Import\Importer\XenForo2->stepThreads() in src/XF/Import/Runner.php at line 160
  3. XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 74
  4. XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 232
  5. XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 321
  6. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  7. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  8. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  10. XF\App->run() in src/XF.php at line 390
  11. XF::runApp() in admin.php at line 13

I am not exactly sure what to do and I am afraid to re-import over what I just imported. Can someone offer a little insight into what this is and what I should do? Looking at the forums, I see the new forums were imported and they show message counts but no messages exist under the imported forums :(

Also, I am getting this error now in my ACP:

The following issues should be resolved. Once they have been resolved, check for upgrades again to confirm.
Any MY installation's URL is correct --- so it seems to have botched up and somehow must be thinking that from the site I imported. However, when I goto options - my installations URL is in and it is proper.

I am at a total loss and afraid to do much else, I do not want to jeopardize the integrity of my installation -- what should I do?

Worried :(
 
It isn't, amongst other things, the likes tables dont exist anymore, they are reactions. You will need to wait for the importers to be updated, or make modifications to the code to handle the schema changes.
 
The importer add-on was last updated September 2018.

It is likely not compatible with 2.1.

Well that is nice to know now after I was told to update the site I was importing to XF2.1 and to go ahead and do the import. No one even hinted or gave the slightest idea that it MAY not be compatible with XF2.1; while knowing that was the version of XF I was using. So while I appreciate that heads up, in hindsight, it is a little disheartening to receive it that way.

I know this is not a fortune 500 price point product and I truly appreciate what you and your team develops and makes available at a reasonable cost for people, such as myself, who utilize it as a community portal -- BUT.... now I am trying to backtrack and fix damages caused by the importer and I am not even fully sure what damage has been done. I do know it certainly has not imported as it should and I guess that leaves me now to debate if I should restore a backed up database and try again. :(

Any idea when there may be an updated importer that is compat. with XF2.1?
 
It isn't, amongst other things, the likes tables dont exist anymore, they are reactions. You will need to wait for the importers to be updated, or make modifications to the code to handle the schema changes.

Like I said all well and fine, had another member of the XF team stated that - in another thread where I have been discussing this need to merge XF communities - rather than imply it should be okay. I am sure it was an unintentional oversight.

ps: I did not select for it to even import the likes - so ideally that table would have gotten bypassed.
 
Please remember that this is pre-release software. It contains known bugs and incomplete functionality. We do not recommend or support running pre-release software in a production environment. Support for pre-releases is limited to questions here on the community forums.
 
Like I said all well and fine, had another member of the XF team stated that - in another thread where I have been discussing this need to merge XF communities - rather than imply it should be okay. I am sure it was an unintentional oversight.

ps: I did not select for it to even import the likes - so ideally that table would have gotten bypassed.

As a potential hack fix...

I believe, though I dont have a copy of both databases in front of me to verify this right now, in your source database if you rename the tables related to xf_reactions back to xf_likes and the field names the same (if its called a reaction, change it to like) then it should work.

You would also need to make the same changes to the xf_threads table and maybe the xf_post. But again, this is just going from memory so it may be wrong.

Obviously make a backup of the database before making any such changes.
 
As a potential hack fix...

I believe, though I dont have a copy of both databases in front of me to verify this right now, in your source database if you rename the tables related to xf_reactions back to xf_likes and the field names the same (if its called a reaction, change it to like) then it should work.

You would also need to make the same changes to the xf_threads table and maybe the xf_post. But again, this is just going from memory so it may be wrong.

Obviously make a backup of the database before making any such changes.

90% of the import went fine - it seems. I just need to find a way to get the forum threads and messages to pop in now and then I think it would be done. Although I am still not sure what to do about the ACP error saying my board's URL is not the same as my license; because it is within options -- unless something got a little wonky in the database.
 
These issues have been addressed for the next XFI release (which will likely be with the stable 2.1 release). Note that this would generally require a fresh import.

Thanks @Mike - I figured, if I want it to work 'better' it made more sense to revert my installation of XF back to 2.0.12 - update the site I am importing to 2.0.12 --> do the import, verify it worked correctly and THEN go ahead and upgrade myself to XF2.1

So that is what I am in the process of doing. Ideally this should work without much issue :fingers crossed:
 
Back
Top Bottom