XF 2.1 IPS to Xenforo import

gavpeds

Active member
Hey, so I have just done a test import and have some things come up in results I am not sure about.

Firstly what are the email conflicts? Is it that the user's email address was wrong or something?

Also user name change to a number whats that about?
 

Attachments

  • Annotation 2020-02-12 160129.webp
    Annotation 2020-02-12 160129.webp
    64.5 KB · Views: 29
As far as I can gather, without looking at the code, you may have users in your database that had blank email addresses and blank usernames. Is that possible?

If you run the following query against your IPS database, does it return any results?

SQL:
SELECT member_id, name, email
FROM core_members
WHERE name = '' OR email = ''
 
As far as I can gather, without looking at the code, you may have users in your database that had blank email addresses and blank usernames. Is that possible?

If you run the following query against your IPS database, does it return any results?

SQL:
SELECT member_id, name, email
FROM core_members
WHERE name = '' OR email = ''
Ah yes, that did. I have found some of the members and seems most are those that started registration with a social network login but never finished the registration.

I have another question about redirection. How can I ensure with an import that all old URLs are redirected to new URLs? I don't want to lose any traffic/ranking.

Example of what i get with IPS
forums/topic/31463-shoutout-to-spinaclean/

What I have in xenforo after import
index.php?threads/shoutout-to-spinaclean.31463/
 
Ah yes, that did. I have found some of the members and seems most are those that started registration with a social network login but never finished the registration.
Ah, that's mostly a side-effect of us not supporting empty email addresses or usernames. Actually, technically, we do support empty email addresses so detecting those as conflicts might be a bug. I'll look into that.

I have another question about redirection. How can I ensure with an import that all old URLs are redirected to new URLs? I don't want to lose any traffic/ranking.

Example of what i get with IPS
forums/topic/31463-shoutout-to-spinaclean/

What I have in xenforo after import
index.php?threads/shoutout-to-spinaclean.31463/
I think this still works:
Though you probably know better than me if the URL structure changed between IPS 3.x and 4.x

I also have an issue that all nodes have [No title] after import
That would suggest that you have forums that don't have names either, could that be correct?

Alternatively, it may be that you no longer have a language on your forum that has lang_id 1.

This is the default language on a default IPS install:

1581524722063.webp

We assume that is still available and that the language contains the names of your forums.
 
No the forums do have names. I have checked and seems I disabled the default US language and added UK language so that might be it.

I will have to try an import with that language turned on and see. Also, I noticed that my admin account doesn't seem to have any permissions on the from the end and in the backend, it does but in places I am told I don't have a superuser admin account.
 
Disabling the language wouldn't do that. Either lang_id 1 doesn't exist, or the phrases in that language for those forum titles don't exist or are empty.

Maybe it is a side effect of the language being disabled though. Maybe when you edit the forum title it only saves the value to enabled languages? 🤷‍♂️

Perhaps re-enabling the language and then editing the forum (just click save without changing anything) might re-create the missing phrases in language 1.

We might need to do a better job of detecting the correct language to pull the titles from in a few places.
 
No that all looks correct, and there's a lang_id field in the core_sys_lang table too.

This might demonstrate the issue better. This should return a list of forum IDs, their titles and descriptions for all languages:

SQL:
SELECT forum.id, lang_title.word_custom AS title, lang_desc.word_custom AS description
FROM forums_forums AS forum
LEFT JOIN core_sys_lang_words AS lang_title ON
   (lang_title.word_key = CONCAT('forums_forum_', forum.id))
LEFT JOIN core_sys_lang_words AS lang_desc ON
   (lang_desc.word_key = CONCAT('forums_forum_', forum.id, '_desc'))
ORDER BY forum.id
 
These are the main categories I have. Which I did go into and save again so looks like I just need to do the same for all forums. Thanks
 

Attachments

  • Annotation 2020-02-12 180330.webp
    Annotation 2020-02-12 180330.webp
    32.2 KB · Views: 9
You'll want to login with the admin that XF created, this will have full permissions, you can assign full permissions to other admins.
Ah yes for some reason the account I setup during xenforo installation before the import no longer existed or merged with another account found it now.

I am guessing this is going to be another language issue of having to go to the usergroup and saving it again. Must be an easier way to refresh all language fields or something?
 

Attachments

  • Screenshot_20200212_195010.webp
    Screenshot_20200212_195010.webp
    24.8 KB · Views: 7
In IPS? Maybe I don't know.

If you're going to do the import again then I can tell you the code you need to change to just make sure the phrases come from the right language if it helps.

It will affect user groups, forums, profile fields and reactions.

Essentially you just need to find all instances inside src/addons/XFI/Import/Importer/IpsForums.php of:

SQL:
lang_id = 1

And replace with:
SQL:
lang_id = X
(Where X is your actual language ID in IPS)

There are six instances of it.
 
Back
Top Bottom