Deleted the automated job, sitemap.xml

Permalink
Hello, can anyone tell me how I undo my mistake? I went into Optimization>Automated Jobs and accidentally removed the generate sitemap.xml.

I have no idea how to bring that back and I've just launched a site. Does anyone know how to help?

View Replies: View Best Answer
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Try to create a page called sitemap.xml & put in into your root directory. After that go to automated jobs & run it again. Though I'm not sure about it, but you can have a try.

Rony
jinkym replied on at Permalink Reply
Sorry Ronny I tried that but it didn't work I'm afraid.

Thanks anyway.
julia replied on at Permalink Best Answer Reply
julia
Here's a how to about how to restore the sitemap job:
http://www.concrete5.org/documentation/how-tos/developers/restore-t...

I hope this does the trick.
jinkym replied on at Permalink Reply
Thanks Julia, that is indeed the answer I was looking for. The only problem is that I'm not sure how to do it. When I go to phpMyAdmin and these choose Query I'm taken to a page that I don't understand. I'm a bit frightened in case I break something. If you can give me a brief idea of what to do I would be very grateful.
mkly replied on at Permalink Reply
mkly
Hi @jinkym,
In phpmyadmin, it might be simpler to click the "SQL" box at the top. This will give you a large box. If there is any text in there just clear it out. Then copy that query into the box
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 );

Then Click "Go" and you should see a confirmation message that it ran.
From there close phpmyadmin and check the Jobs section of your site to see if the job is back.

Don't worry, there isn't too much that can go wrong with the query above. If something gets input wrong it will probably just throw and error and not run at all. The only thing to check is to make sure you are in the correct database.

Best Wishes,
Mike
DBKG replied on at Permalink Reply
Ever run into this? I tried this via phpMyAdmin and and got a

# 1142 - INSERT command denied to user xxxxx for table 'Jobs'

I went back and double-checked to make sure my user setup had the privileges to INSERT, which was set up with the original installation. Yes.

Double-checked to make sure username was correct. Yes.

Double-checked to make sure I was trying to insert into the right database. Yes.

A bit stymied. Any help from anyone who has run across this and solved it would be appreciated.
ScottSandbakken replied on at Permalink Reply 1 Attachment
ScottSandbakken
Try this. Just install it and your sitemap should be restored.
DBKG replied on at Permalink Reply
Awesome. Thanks. Errrr... You don't happen to have something to also restore the "Remove Old Pages" job, by any chance.... (Yes, I have deleted that on another site and got the same message when trying to restore via phpMyAdmin--different site, same server).
ScottSandbakken replied on at Permalink Reply 1 Attachment
ScottSandbakken
I have a package in the PRB right now for this. However, the attached file will do this for you.
DBKG replied on at Permalink Reply
Just now getting back to stuff. Thanks so much. I really do appreciate it.

TIm
web089 replied on at Permalink Reply
web089
HI Scott,
does this job also run with 5.6.3.1 ?

G.
gocabraless replied on at Permalink Reply
gocabraless
Hi everyone:
The concept in your sql it´s ok, in my case the table structure for Jobs it´s quite different. Was necesary add jID, in structure and values. It works with the correct table structure (Concrete 5.6.1.2)
arlenesey replied on at Permalink Reply
arlenesey
Does anyone have an updated version of this for 5.7?

I accidentally pushed the trash can button on the "create sitemap.xml" job.
Thanks!
edbeeny replied on at Permalink Reply
edbeeny
Try this
INSERT INTO `Jobs` (`jID`, `jName`, `jDescription`, `jDateInstalled`, `jDateLastRun`, `pkgID`, `jLastStatusText`, `jLastStatusCode`, `jStatus`, `jHandle`, `jNotUninstallable`, `isScheduled`, `scheduledInterval`, `scheduledValue`) VALUES
(4, 'Generate the sitemap.xml file', 'Generate the sitemap.xml file that search engines use to crawl your site.', '2015-09-21 15:27:25', NULL, 0, NULL, 0, 'ENABLED', 'generate_sitemap', 0, 0, 'days', 0);
hutman replied on at Permalink Reply
hutman
You should be able to do exactly the same thing as the tutorial linked above, the table structure is the same.
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
I will get this on my schedule to update for Concrete5.7. However, it will likely be the end of next week before I will get to it. Sorry for the delay. However, the posts above should work for you.
arlenesey replied on at Permalink Reply
arlenesey
No stress!
Thanks everyone for the quick replies.
How did I ever manage to do such a ditzy thing in the first place? It's a comfort though, to know that I'm not alone.