Duplicate Incorrect generation of class names in \XF\Import\Manager::getImporterShortNamesForType

.example: \XF\Import\Manager::getImporterShortNamesForType('BS\JointPurchases') will give us BS\JointPurchases:EstheticCollaborativeShopping in windows and will get nothing in linux systems. If we write like that \XF\Import\Manager::getImporterShortNamesForType('BS/JointPurchases'), we will get it BS/JointPurchases:EstheticCollaborativeShopping, but it will not work, because BS/JointPurchases\Import\Importer\EstheticCollaborativeShopping class does not exist.

It has to use this method to add importers:
PHP:
$imps = \XF\Import\Manager::getImporterShortNamesForType('BS/JointPurchases');

$imps = array_map(function($v)
{
    return str_replace('/', '\\', $v);
}, $imps);

$importers = array_merge(
    $importers, $imps
);
 
I think roughly that code is already in XF 2.0.10.

Which version of XF were you testing with?

Here's the original bug report:
 
The "type" here is actually the add-on ID, essentially. So it should be:
PHP:
\XF\Import\Manager::getImporterShortNamesForType('BS/JointPurchases')

For me, that returns:
Code:
array(1) {
  [0] => string(36) "BS\JointPurchases:EstheticCollaborativeShopping"
}

I suspect either you're using it wrong or you're using a version older than XF 2.0.10.
 
Top Bottom