Open blugri opened 8 years ago
Can you please provide examples of URLs that go missing? Are there any URLs that are never missing?
It looks like the root url, about and cookiepolicy are never missing (i.e. the urls without paramaters). All the other type of urls have missing ones.
I cannot find a pattern in it.
It does not change on every request. But from time to time the urls are changing. Without any changes (code and content) to the site I had these results:
monday: 15 urls tuesday: 35 urls wednesdag: 28 urls
Cheers Tom
A few questions to help debug:
Hi,
sorry for the late reply.
`var keystone = require('keystone'); var Types = keystone.Field.Types;
/**
var Post = new keystone.List('Post', { map: { name: 'title' }, autokey: { path: 'slug', from: 'title', unique: true } });
Post.add({ title: { type: String, required: true }, state: { type: Types.Select, options: 'draft, published, archived', default: 'draft', index: true }, author: { type: Types.Relationship, ref: 'User', index: true }, publishedDate: { type: Types.Date, index: true, dependsOn: { state: 'published' } }, image: { type: Types.CloudinaryImage }, content: { brief: { type: Types.Html, wysiwyg: true, height: 150 }, extended: { type: Types.Html, wysiwyg: true, height: 400 } }, categories: { type: Types.Relationship, ref: 'PostCategory', many: true } });
Post.schema.virtual('content.full').get(function() { return this.content.extended || this.content.brief; });
Post.defaultColumns = 'title, state|20%, author|20%, publishedDate|20%'; Post.register();`
Cheers Tom
I can confirm that this is happening indeed. A lot. Had to switch back to static sitemap because can't afford to have 70% of the urls missing randomly.
Strangely that only happening in production. For example,
filters: {
'Page': function(page) {
console.log('page', page.title.en, 'state:', page.state, 'returning', page.state == 'published');
return page.state == 'published';
}
}
The console.log
was never called in production, though some of the Page related urls were processed.
I also confirm. But in my case, all the dynamic URL's are missing, excepting one. I can assure I followed the guidelines. To get sitemap ok again, i have to restart server, but after some time the problem comes back.
Unfortunately, I can't recommend this Library. Instead, use npm sitemap and add your urls manually.
The sitemap generated by keystone-express-sitemap is alway missing random urls. The urls that are missing changes over time.
Used implementation: