Fixed Import system doesn't proceed correctly for an importer with no base configuration

Affected version

Jeremy P

Well-known member
Judging from the import_config template, the import system is supposed to allow for importers that don't need any base configuration:

<div class="block-body">
    <xf:if contentcheck="true">
            {{ $importer.renderBaseConfigOptions(vars())|raw }}
    <xf:else />
        <div class="block-row">{{ phrase('no_configuration_necessary') }}</div>
However, pressing continue on the respective page does not load the step configuration properly because it is dependent on the following condition in \XF\Admin\Controller\Import line 68:
if ($baseConfig)
Since $baseConfig is an empty array, this line will always evaluate to false. The step importer does not have this problem, as the pertaining conditional instead checks for the presence of a hidden input (steps_configured on line 109).
Last edited:


XenForo Developer
Staff member
I'm going to mark this as confirmed so it doesn't get lost, though the resolution may end up being that $baseConfig needs to be populated with something even if no actual configuration is required...

Will look into it.

Jeremy P

Well-known member
Thank you. I think it could also be fixed by adding something like <xf:hiddenval name="configured">1</xf:hiddenval> to the import_config template and changing the conditional on \XF\Admin\Controller\Import line 68 to if ($this->filter('configured', 'bool')).

In the meantime it seems this can be worked around by adding a hidden config[] input to a template and setting renderBaseConfigOptions() to render it:
<div class="block-row">{{ phrase('no_configuration_necessary') }}</div>

<xf:hiddenval name="config[]" />


XenForo Developer
Staff member
This is fixed now. Two changes to make:
  1. As you suggested, add <xf:hiddenval name="config[]" /> to the import_config template, underneath the 'no_configuration_necessary' phrase
  2. In your config-free importer, just have validateBaseConfig() return true;