kapt-labs / django-check-seo

Django Check SEO will check the SEO aspects of your site for you, and will provide advice in case of problems. Compatible with Django & Django-CMS!
GNU General Public License v3.0
154 stars 12 forks source link

Failed parse #42

Closed ilamarche closed 3 years ago

ilamarche commented 3 years ago

Describe the bug Failed requests.exceptions.InvalidURL: Failed to parse: http://127.0.0.1:8000b'/fr/'

To Reproduce Django<3.1 django-cms>=3.7,<3.8 django-check-seo==0.3.6

Expected behavior Expected http://127.0.0.1:8000/fr/

Desktop :

Temporary Fix Override IndexView and add at line 30 :

        page = self.request.GET.get("page", None)
        page = page[2:(len(page) - 1)]
        full_url = (
                protocol
                + Site.objects.get_current().domain
                + page
        )
corentinbettiol commented 3 years ago

@ilamarche I will investigate this, thank you.

This is the current code:

full_url = (
    protocol
    + Site.objects.get_current().domain
    + self.request.GET.get("page", None)
)

This is your code:

page = self.request.GET.get("page", None)
page = page[2:(len(page) - 1)]
full_url = (
    protocol
    + Site.objects.get_current().domain
    + page
)