vBulletin: Category node for FAQ pages is always created when retaining IDs


Well-known member
Affected version
When importing FAQ items from vBulletin while retaining IDs, a category node for FAQ items is always created:

     * When $retainIds is set, creates a category node in order to store all FAQ
     * entries imported as XF pages, which would otherwise be scattered all over
     * the node tree.
     * @param array $stepConfig
    public function setupStepFaq(array $stepConfig)
        if (
            $this->session->retainIds &&

            /** @var \XF\Import\Data\Node $parentNode */
            $parentNode = $this->newHandler('XF:Node');

            $parentNode->parent_node_id = $this->getImportNodeParentId();
            $parentNode->title = $stepConfig['parent_node_title'];
            $parentNode->display_order = 20;

            $parentType = $this->newHandler('XF:Category');
            $parentNode->setType('Category', $parentType);

            $this->session->extra['faqParentNodeId'] = $parentNode->save(false);

This is unnecessary when importing FAQ items as help pages, the category will stay empty and must be deleted afterwards.
Top Bottom