I did live chat before on this issue and it came up again. On one of my sites running in a multisite I get this error that happens at random with sitemap generation, rendering the website and its wp-admin area completely unusable to the point I have to network deactivate it.
Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null in /home/user/public_html/wp-includes/link-template.php:357 Stack trace: #0 /home/user/public_html/wp-includes/link-template.php(320): _get_page_link(Object(WP_Post), false, false) #1 /home/user/public_html/wp-includes/link-template.php(144): get_page_link(Object(WP_Post), false, false) #2 /home/user/public_html/wp-content/plugins/wpmu-dev-seo/includes/tools/sitemaps.php(440): get_permalink(Object(WP_Post)) #3 /home/user/public_html/wp-content/plugins/wpmu-dev-seo/includes/tools/sitemaps.php(283): WDS_XML_Sitemap->_load_post_items() #4 /home/user/public_html/wp-content/plugins/wpmu-dev-seo/includes/tools/sitemaps.php(51): WDS_XML_Sitemap->_load_all_items() #5 /home/user/public_html/wp-content/plugins/wpmu-dev-seo/includes/tools/sitemaps.php(35): WDS_XML_Sitemap->generate_sitemap() #6 /home/user/public_html/wp-content/plugins/wpmu-dev-seo/includes/core in /home/user/public_html/wp-includes/link-template.php on line 357
The problem goes away from network deactivate, then I can activate it again. I can manually generate the sitemap and all works fine for a while.
This only happens to one of the sites, not all of them. Even for that site, I deactivated all plugins but it only went away when I disable SmartCrawl. I have a cron set to run wp-cron every hour.
Any help / fix would be appreciated, thanks.
Last time it worked from deactivating and activating SmartCrawl Pro, this time however, the error came back as soon as it was activated again.