Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemap broken #24

Open
anibalsolon opened this issue Jan 11, 2022 · 0 comments
Open

Sitemap broken #24

anibalsolon opened this issue Jan 11, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@anibalsolon
Copy link
Member

Describe the bug
The endpoint for indexers to retrieve the sitemap is broken, showing the exception:

Internal Server Error: /sitemap.xml
Traceback (most recent call last):
  File ".../site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File ".../site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File ".../site-packages/django/contrib/sitemaps/views.py", line 16, in inner
    response = func(request, *args, **kwargs)
  File ".../site-packages/django/contrib/sitemaps/views.py", line 70, in sitemap
    urls.extend(site.get_urls(page=page, site=req_site,
  File ".../site-packages/django/contrib/sitemaps/__init__.py", line 112, in get_urls
    urls = self._urls(page, protocol, domain)
  File ".../site-packages/django/contrib/sitemaps/__init__.py", line 121, in _urls
    loc = "%s://%s%s" % (protocol, domain, self.__get('location', item))
  File ".../site-packages/django/contrib/sitemaps/__init__.py", line 69, in __get
    return attr(obj)
  File ".../site-packages/django/contrib/sitemaps/__init__.py", line 76, in location
    return obj.get_absolute_url()
AttributeError: 'Profile' object has no attribute 'get_absolute_url'

To Reproduce
Access /sitemap.xml

Expected behavior
Render a XML with the site content

@anibalsolon anibalsolon added the bug Something isn't working label Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant