CMTV
Well-known member
Hi!
I am learning how to export things in XenForo: trying to export my test "heroes" entities.
That is how my
Next, I created a class called
The problem is that the XML code itself is not generated. Clicking on "Export" button redirects me to an empty page:

Nothing gets dowloading!
---
I even tried to replace default smilies export call with my own line:
Same result... Working for smilies, showing empty page for my heroes.
I am learning how to export things in XenForo: trying to export my test "heroes" entities.
That is how my
actionExport
looks like:
PHP:
public function actionExport()
{
$heroes = $this->finder('ExportImport:Hero');
return $this->plugin('XF:Xml')->actionExport($heroes, 'ExportImport:Hero\Export');
}
Next, I created a class called
Export
inside ExportImport\Service\Hero
folder:
PHP:
<?php
namespace ExportImport\Service\Hero;
use XF\Mvc\Entity\Finder;
use XF\Service\AbstractXmlExport;
class Export extends AbstractXmlExport
{
public function getRootName()
{
return 'heroes_export';
}
public function export(Finder $finder)
{
$document = $this->createXml();
$rootNode = $document->createElement($this->getRootName());
$document->appendChild($rootNode);
return $document;
}
}
The problem is that the XML code itself is not generated. Clicking on "Export" button redirects me to an empty page:

Nothing gets dowloading!
---
I even tried to replace default smilies export call with my own line:
PHP:
$this->plugin('XF:Xml')->actionExport($smilies, 'ExportImport:Hero\Export');
Same result... Working for smilies, showing empty page for my heroes.
Last edited: