• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Server Error Undefined index: field5_title

snoopy5

Well-known member
#1
Hi

I just try to test the import of a vb forum into XF. The plan is to import around 9 different vb 3.8x forums into 1 XF forum.

Now I just tried to import the first forum and get this error as soon as I hit the import custom user fields:

Server Error

Undefined index: field5_title
  1. XenForo_Application::handlePhpError() in XenForo/Importer/vBulletin.php at line 533
  2. XenForo_Importer_vBulletin->stepUserFields() in XenForo/Importer/Abstract.php at line 77
  3. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
  4. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 232
  5. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 175
  6. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
  7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  8. XenForo_FrontController->run() in /xxxxx/xxxxxxx/_tests/xfdt_import/admin.php at line 13
What does this mean and how can I fix it?
 

snoopy5

Well-known member
#3
Hi

I do not want to delete it. I tried now several times to change the title within the ACP of vb and saved it. After that, I tried to continue the import. But the error stays the same.

Then I went into phpmyadmin and looked in the table profilefield. But there is no field for the title. How that? See screenshot:

vb3.8x_profilefield5.jpg

In case this is important: this is version vb 3.8.0
 

Insy

Well-known member
#4
A dirty fix that should work:

Open library/XenForo/Importer/vBulletin.php and go on line 532 ({) and adds below:
PHP:
isset($phrases["field$profileField[profilefieldid]_title"]) || $phrases["field$profileField[profilefieldid]_title"] = '';
isset($phrases["field$profileField[profilefieldid]_desc"]) || $phrases["field$profileField[profilefieldid]_desc"] = '';
This will define an empty title and description if they do not exist.
 

snoopy5

Well-known member
#5
A dirty fix that should work:

Open library/XenForo/Importer/vBulletin.php and go on line 532 and adds below:
PHP:
isset($phrases["field$profileField[profilefieldid]_title"]) || $phrases["field$profileField[profilefieldid]_title"] = '';
isset($phrases["field$profileField[profilefieldid]_desc"]) || $phrases["field$profileField[profilefieldid]_desc"] = '';
This will define an empty title and description if they do not exist.

What I do not understand is that the title does exist in my ACP and if I go to the userprofile, but it does not exist a field for the title in the vb database. So where is vb storing this information of the title of profilefield #5?

Or shall I delete the XF database and make first a totally fresh import again after I changed the title?
 

Adam Howard

Well-known member
#9
BACK UP

Do the following on the full database (not just that table)

Repeat repair until you have ZERO errors from within phymyadmin

Next optimize, but do not optimize until the above is done.

Proceed from there.

Most common fix for import is that.
 

snoopy5

Well-known member
#10
It looks correct. I would have to debug it. snoopy's fix should work.

Do you mean Insy's fix?

A dirty fix that should work:

Open library/XenForo/Importer/vBulletin.php and go on line 532 ({) and adds below:
PHP:
isset($phrases["field$profileField[profilefieldid]_title"]) || $phrases["field$profileField[profilefieldid]_title"] = '';
isset($phrases["field$profileField[profilefieldid]_desc"]) || $phrases["field$profileField[profilefieldid]_desc"] = '';
This will define an empty title and description if they do not exist.
 

snoopy5

Well-known member
#12
If you are so fast in responding, when you are sleepy, how fast are you then if you are awake? Is there not a speed limit in the posting restrictions? I can not read as fast as you all answer here... (y)
 

snoopy5

Well-known member
#13
o.k., I applied the code change suggested by Isny and the error is gone.

Code:
        XenForo_Db::beginTransaction($this->_db);
 
        foreach ($profileFields AS $profileField)
        {
 
// ab hier 2 Zeilen code einfuegen, um den Error mit title profilefield nummer 5 zu korrigieren beim import
 
isset($phrases["field$profileField[profilefieldid]_title"]) || $phrases["field$profileField[profilefieldid]_title"] = '';
isset($phrases["field$profileField[profilefieldid]_desc"]) || $phrases["field$profileField[profilefieldid]_desc"] = '';
 
// ende codeaenderung profilefield5
 
            $title = $this->_convertToUtf8($phrases["field$profileField[profilefieldid]_title"]);
            $description = $this->_convertToUtf8($phrases["field$profileField[profilefieldid]_desc"]);
I got in the importer screen the message
Imported 0 items. (0.12 seconds)
Sound not logical, since there are profile fields in vb, but will check this later once I was gone through the whole process of testimporting and check than afterwards.

Another error came now when I try to import in the next stepthe users, but I will open an extra thread for this, so that it is easier for others to find if they have similar problems...
 

Adam Howard

Well-known member
#16
yes, this is the requirement for the XF installation. And both xf installations have mysql5. But the old vb installations have mysql4.

Is for the db which will be imported into the Xf also mysql5 required? That would be strange...
I misunderstood ....

I thought your copy of vBulletin was still running on a MySQL 4 server. If it was... You'd need to import it or upgrade it into a MySQL 5 server.

That would not be strange, that would be the accepted norm and standard. MySQL 4 was discontinued over 8 years ago and is very insecure (and unstable) compared to today's standards.
 

snoopy5

Well-known member
#17
I misunderstood ....

I thought your copy of vBulletin was still running on a MySQL 4 server. If it was... You'd need to import it or upgrade it into a MySQL 5 server.

That would not be strange, that would be the accepted norm and standard. MySQL 4 was discontinued over 8 years ago and is very insecure (and unstable) compared to today's standards.
Hi,

no you were right then. all my old vb forums are running still with mysql4 :oops:

If I chnage to Mysql5, what do I have to pay attention to?
 

Adam Howard

Well-known member
#19
Hi,

no you were right then. all my old vb forums are running still with mysql4 :oops:

If I chnage to Mysql5, what do I have to pay attention to?
BACK UP.
Back up.
Back up again.....

You sound like you're trying to do this remotely... I would suggest trying to do this on the same server (or localhost).

I believe on import (if I recall correctly) it will convert it to mysql5 structure. It's been years since I recall anyone using mysql4 (almost 10 years).

You really do not need the forum working per say, just the database and your attachments for the import.
 

snoopy5

Well-known member
#20
mmmhhhh, that sems not to be as easy as I hoped it would be....

1. All installations are on the same server
2. I created an empty fresh new mysql5 db
3. I backed up my vb mysql4 db
4. I imported the vb-backup into the empty mysql5 db
5. I changed in ./includes/config.php the settings for the db name, username and host to the new mysql5 settings
6. I went to my vb forum to check whether everything is working, but get errors:

Warning: array_keys() [function.array-keys]: The first argument should be an array in [path]/includes/functions.php on line 4227

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4227
I googled and in the vb support forum, they advice with this error to

Upload the tools.php script in the 'do_not_upload' folder of the vB zip file to your Admin CP directory and run it from your browser. Then run the [Usergroup/Forum Cache] option. This should fix this.
7. I did that and the errors went away. BUT...

If login now into my ACP of vb, not all informations & buttons are visible. Strange stars are shown on the left etc. Weired....

I will try again...

Is there a way to disable with one click all plugins & add-ons in vb? I want to make sure, that they do not interfere with this.