XF 2.3 Importing IPS 4 to XF 2.3 problem

Bob de Bouwer

Active member
Licensed customer
I'm trying to import from IPS 4 to XF 2.3, but i get an error and don't know what to do.
Hoping someone can help me!

Thanks

1776061381501.webp
 
Any idea where to find that? I'm looking, but i don't see the display order in IPS.
Check the values on IPB:
Code:
SELECT g_id, g_name, g_order
FROM core_groups;

if any of them is inconsistent (null, non numeric or empty) fix it by running this
SQL:
UPDATE core_groups
SET g_order = g_id
WHERE g_order IS NULL OR g_order = 0 OR g_order = '';

Also make sure SQL is not on strict mode.
 
Check the values on IPB:
Code:
SELECT g_id, g_name, g_order
FROM core_groups;

if any of them is inconsistent (null, non numeric or empty) fix it by running this
SQL:
UPDATE core_groups
SET g_order = g_id
WHERE g_order IS NULL OR g_order = 0 OR g_order = '';

Also make sure SQL is not on strict mode.
Thanks for your help, but i found a workaround by adjusting the importer. It works now!
Again, appreciate your help ;)

public function stepUserGroups(StepState $state, array $stepConfig)
{
$groups = $this->getUserGroups();

$this->session->extra['groupConfig'] = $stepConfig;

foreach ($groups AS $oldId => $group)
{
switch ($oldId)
{
case $stepConfig['guest_group']: // guests
$this->logHandler(UserGroup::class, $oldId, User::GROUP_GUEST);
break;

case $stepConfig['member_group']: // registered
$this->logHandler(UserGroup::class, $oldId, User::GROUP_REG);
break;

case $stepConfig['admin_group']: // admins
$this->logHandler(UserGroup::class, $oldId, User::GROUP_ADMIN);
break;

case 6: // mods
$this->logHandler(UserGroup::class, $oldId, User::GROUP_MOD);
break;

default:
$title = isset($group['g_title']) && $group['g_title'] !== ''
? strip_tags($group['g_title'])
: ('Imported group ' . $oldId);

$userTitle = isset($group['g_title']) && $group['g_title'] !== ''
? $group['g_title']
: $title;

/** @var UserGroup $import */
$import = $this->newHandler(UserGroup::class);
$import->bulkSet([
'title' => $title,
'user_title' => $userTitle,
'display_style_priority' => 5,
'order' => (int) 1
]);
$import->setPermissions($this->calculateGroupPerms($group));
$import->save($oldId);
break;
}

$state->imported++;
}

return $state->complete();
}
 
Back
Top Bottom