Generate the sitemap file: array_key_exists() expects parameter 2 to be array, null given

Permalink
Trying to generate the sitemap file for the first time and I get the following error:
array_key_exists() expects parameter 2 to be array, null given

Other automated jobs run fine. I'm running 8.5.0 (was recently upgraded from 8.4.5). Has anyone else come across this and / or got any advice?

Thanks!

View Replies:
baysmedia replied on at Permalink Reply 1 Attachment
Command line also fails to generate it:

# bin/concrete5 c5:job generate_sitemap
[generate_sitemap] Job Failed

Also attached is the screenshot from the Dashboard.
baysmedia replied on at Permalink Reply
Narrowed this problem down to the Devoda SEO add-on.
JohntheFish replied on at Permalink Reply
JohntheFish
Contact the developer through the Get Help link on the addon's marketplace page.
baysmedia replied on at Permalink Reply
Sorry, I should have said that I've already raised a support request with the developer - I just thought it best to update this thread in case anyone else encounters this problem.
ramonleenders replied on at Permalink Reply
ramonleenders
I'm using this piece of code:

Events::addListener('on_sitemap_xml_ready', function ($event) {
            /* @var $event \Symfony\Component\EventDispatcher\GenericEvent */
            if ($event->hasArgument('xmlDoc')) {
                // Blabla
            }
        });


For some reason, this event has no arguments anymore since version 8.5.0. So this check fails within the symfony class, since the $arguments variable isn't even an array (hence the array_key_exists error). In the release notes I see mlocati and a3020 worked on this "topic". Can one of both perhaps explain how this changed, so what to do now? I also used to get the xmlDoc using this:

$event->getArgument('xmlDoc')


I see a "getDocument" function now (concrete/src/Page/Sitemap/Event/XmlReadyEvent.php:44), but that returns $this->element? Anyways, bit confused, love to know what to do instead.