Opened 5 years ago

Last modified 5 years ago

#31540 new Bug

A 404 error with “id-” in slug on multilingual website with Indonesian language — at Initial Version

Reported by: osxisl Owned by: nobody
Component: Internationalization Version: 3.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:How to create a pull request

Description

http://example.com/de/id-button/ - 200 OK
http://example.com/id/id-button/ - 200 OK
http://example.com/any-other-slug/ - 200 OK
http://example.com/id-button/ - 404 error:

Using the URLconf defined in example.urls, Django tried these URL patterns, in this order:
id/
The current path, id-button/, didn't match any of these.
urls.py file:
urlpatterns = i18n_patterns(
    path('admin/', admin.site.urls),
    path('', cache_page(cache_homepage)(homepage_views.index), name='index'),
    path('search/', search_views.search, name='search'),
    path('<slug:slug>/', emoji_views.emoji, name='item'),
    prefix_default_language=False,
)

The item have a slug field in DB "id-button". If I rename this to "idbutton": http://example.com/idbutton/ - 200 OK

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top