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

page_language_url returns wrong slug when in edit mode #6656

Open
wullerot opened this issue Mar 21, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@wullerot
Copy link

commented Mar 21, 2019

Summary

{% page_language_url %} returns wrong slug when in edit mode
i checked the code on the page model and it seems that there is a problem with self.title_cache
as it contains only the current language what leads to _get_title_cache always getting the slug of the current language instead of the given one.

Expected behaviour

url = /en/contact/?edit
{% page_language_url 'de' %} -> /de/kontakt/

Actual behaviour

url = /en/contact/?edit
{% page_language_url 'de' %} -> /de/contact/

Environment

  • Python version: 2.7.16
  • Django version: 1.11
  • django CMS version: >=3.5

settings.py

LANGUAGES = [
    ('de', 'Deutsch'),
    ('en', 'English'),
]
CMS_CACHE_DURATIONS = {
    'content': 0,
    'menus': 0,
    'permissions': 0,
}
CMS_LANGUAGES = {
    1: [
        {
            'code': 'de',
            'name': _('Deutsch'),
            'fallbacks': ['en'],
        },
        {
            'code': 'en',
            'name': _('English'),
            'fallbacks': ['de'],
        },

    ],
    'default': {
        'fallbacks': ['de', 'en'],
        'redirect_on_fallback': True,
        'public': True,
        'hide_untranslated': True,
    },
}

@wullerot wullerot changed the title page_language_url returns wrong slug page_language_url returns wrong slug when in edit mode Mar 21, 2019

@Foobartender

This comment has been minimized.

Copy link

commented Mar 27, 2019

I think this is related to #6622.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.