madewithwagtail icon indicating copy to clipboard operation
madewithwagtail copied to clipboard

Accessing sitemap.xml raises a few errors

Open loicteixeira opened this issue 7 years ago • 3 comments

Key Error

See MADEWITHWAGTAIL-6 and MADEWITHWAGTAIL-7 on Sentry.

In this context, request isn't available here: https://github.com/springload/madewithwagtail/blob/a04a2579f05a89121642cfaf6ef5062a69e78809/core/templatetags/core_tags.py#L31 This should be replaced with `context.get('request')

Note that the template uses the request here https://github.com/springload/madewithwagtail/blob/a04a2579f05a89121642cfaf6ef5062a69e78809/core/templates/core/includes/menu.html#L15 So we probably need to change the condition to {% if not request or not request.path == '/search/' %}

Although to be fair I'm a bit puzzled that this is run when sitemap.xml is requested. Maybe it reached this point as a fallback of the following issue.

TemplateDoesNotExists

See MADEWITHWAGTAIL-5 on Sentry.

The sitemap.xml template is not found.

loicteixeira avatar Jan 31 '18 01:01 loicteixeira

request template context processor is in place. context['request'] shouldn't fail in this configuration.

mojeto avatar Jan 31 '18 01:01 mojeto

Sentry issue: MADEWITHWAGTAIL-6

mojeto avatar Jul 30 '18 21:07 mojeto

Maybe related with: MADEWITHWAGTAIL-Fh

mojeto avatar Jul 30 '18 21:07 mojeto