FloV
Well-known member
- Affected version
- 2.2
Hi,
i was trying to export a style in XF 2.1.10 and importing it in XF2. and I got this error:
#1 src/XF/Service/Style/Import.php(177): XF\Service\Style\Import->getAssetValues(Object(SimpleXMLElement))
#2 src/XF/Service/Style/Import.php(161): XF\Service\Style\Import->importAssets(Object(XF\Entity\Style), Object(SimpleXMLElement), '')
#3 src/XF/Admin/Controller/Style.php(434): XF\Service\Style\Import->importFromXml(Object(SimpleXMLElement))
#4 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Style->actionImport(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Style', 'Import', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2270): XF\Mvc\Dispatcher->run()
#9 src/XF.php(417): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}
array(4) {
["url"] => string(24) "/admin.php?styles/import"
["referrer"] => string(53) "https://xxx/admin.php?styles/import"
["_GET"] => array(1) {
["styles/import"] => string(0) ""
}
["_POST"] => array(6) {
["target"] => string(3) "new"
["parent_style_id"] => string(1) "2"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(24) "/admin.php?styles/import"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
i was trying to export a style in XF 2.1.10 and importing it in XF2. and I got this error:
- ErrorException: [E_WARNING] Invalid argument supplied for foreach()
- src/XF/Service/Style/Import.php:193
- Generated by: Florian_PL
- Jul 27, 2020 at 7:37 PM
Stack trace
#0 src/XF/Service/Style/Import.php(193): XF::handlePhpError(2, '[E_WARNING] Inv...', '/var/www/share/...', 193, Array)#1 src/XF/Service/Style/Import.php(177): XF\Service\Style\Import->getAssetValues(Object(SimpleXMLElement))
#2 src/XF/Service/Style/Import.php(161): XF\Service\Style\Import->importAssets(Object(XF\Entity\Style), Object(SimpleXMLElement), '')
#3 src/XF/Admin/Controller/Style.php(434): XF\Service\Style\Import->importFromXml(Object(SimpleXMLElement))
#4 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Style->actionImport(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Style', 'Import', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2270): XF\Mvc\Dispatcher->run()
#9 src/XF.php(417): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}
Request state
array(4) {
["url"] => string(24) "/admin.php?styles/import"
["referrer"] => string(53) "https://xxx/admin.php?styles/import"
["_GET"] => array(1) {
["styles/import"] => string(0) ""
}
["_POST"] => array(6) {
["target"] => string(3) "new"
["parent_style_id"] => string(1) "2"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(24) "/admin.php?styles/import"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}