how to ADD back "Generate Sitemap File" ?

Permalink
Accidentaly I've clicked remove under "Generate Sitemap File" in Scheduled Jobs/Installed jobs.
Now I don't see it as job any more.

How to reinstall this feature ?

 
kiil replied on at Permalink Reply
kiil
I too have deleted the generate_sitemap job from the Job page and would like to add the functionality back. Any tips anyone?
ryan replied on at Permalink Reply
ryan
I you accidentally remove your "generate sitemap" job, you can restore it by running this query in phpMyAdmin or whatever tool you use to access your database:
INSERT INTO `Jobs` (`jName`,`jDescription`,`jDateInstalled`,`jDateLastRun`,`pkgID`,`jLastStatusText`,`jLastStatusCode`,`jStatus`,`jHandle`,`jNotUninstallable`)
VALUES ('Generate Sitemap File','Generate the sitemap.xml file that search engines use to crawl your site.','',NULL,0,NULL,0,'ENABLED','generate_sitemap',0);
ryan replied on at Permalink Reply
ryan
I you accidentally remove your "generate sitemap" job, you can restore it by running this query in phpMyAdmin or whatever tool you use to access your database:
INSERT INTO `Jobs` (`jName`,`jDescription`,`jDateInstalled`,`jDateLastRun`,`pkgID`,`jLastStatusText`,`jLastStatusCode`,`jStatus`,`jHandle`,`jNotUninstallable`)
VALUES ('Generate Sitemap File','Generate the sitemap.xml file that search engines use to crawl your site.','',NULL,0,NULL,0,'ENABLED','generate_sitemap',0);
tcmfan replied on at Permalink Reply
tcmfan
But I'd just suggest to replace the last zero with a 1 to make the job uninstallable to prevent the issue happening again :-)

INSERT INTO `Jobs` (`jName`,`jDescription`,`jDateInstalled`,`jDateLastRun`,`pkgID`,`jLastStatusText`,`jLastStatusCode`,`jStatus`,`jHandle`,`jNotUninstallable`)
VALUES ('Generate Sitemap File','Generate the sitemap.xml file that search engines use to crawl your site.','',NULL,0,NULL,0,'ENABLED','generate_sitemap',1)
kiil replied on at Permalink Reply
kiil
Thanks, that did the trick!
tcmfan replied on at Permalink Reply
tcmfan
Just move the 'generate_sitemap.php' file from '/concrete/jobs/' to '/jobs/' (which is empty by default). Then you'll see the job with Install button in the dashboard.
eOne replied on at Permalink Reply
Thank you ppl. mysql solution was OK for me.

c/p into jobs throw this error:

Fatal error: Cannot redeclare class GenerateSitemap in /home/***website***.com/public_html/concrete/jobs/generate_sitemap.php on line 104
tcmfan replied on at Permalink Reply
tcmfan
Not copy, but MOVE. It would work.:-)
eOne replied on at Permalink Reply
oic tnx :)
Abs0lute replied on at Permalink Reply
Abs0lute
Be sure to move it back after restoring the job. . . in case you have to do it again sometime.
Sitemap generator was taking an unusually long time, so I removed it and reinstalled. Works fine now. Then I moved the generate_sitemap file back into concrete/jobs.