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

Articles (Blog Posts) that don’t exist in the selected language are not shown in the fallback language, even if configured like that #8

Open
MacLake opened this issue Oct 29, 2024 · 1 comment

Comments

@MacLake
Copy link

MacLake commented Oct 29, 2024

Description

We have a multi-lingual site (https://outphit.eu/)

Steps to reproduce

Multilingual site with language config like so:

LANGUAGES: list = [
    ('bg', gettext('Bulgarian')),
    ('de', gettext('German')),
    ('el', gettext('Greek')),
    ('en', gettext('English')),
    ('es', gettext('Spanish')),
    ('fr', gettext('French')),
    ('nl', gettext('Dutch')),
]
CMS_LANGUAGES: dict = {
    7:
        [
            {
                'code': 'en',
                'public': True,
                'name': gettext('English'),
            },
            {
                'code': 'bg',
                'public': True,
                'name': gettext('Bulgarian'),
            },
            {
                'code': 'de',
                'public': True,
                'name': gettext('German'),
            },
            {
                'code': 'el',
                'public': True,
                'name': gettext('Greek'),
            },
            {
                'code': 'es',
                'public': True,
                'name': gettext('Spanish'),
            },
            {
                'code': 'fr',
                'public': True,
                'name': gettext('French'),
            },
            {
                'code': 'nl',
                'public': True,
                'name': gettext('Dutch'),
            },
        ],
    'default':
        {
            'fallbacks': ['en'],
            'redirect_on_fallback': False,
            'public': True,
            'hide_untranslated': False,
        },
}

PARLER_LANGUAGES = {
    7:
        (
            {
                'code': 'en',
            }, {
                'code': 'bg',
            }, {
                'code': 'de',
            }, {
                'code': 'el',
            }, {
                'code': 'es',
            }, {
                'code': 'fr',
            }, {
                'code': 'nl',
            }
        ),
    'default':
        {
            'fallbacks': ['en'],
            'hide_untranslated':
                False,  # the default; let .active_translations() return fallbacks too.
        }
}

PARLER_DEFAULT_LANGUAGE_CODE = 'en'
PARLER_SHOW_EXCLUDED_LANGUAGE_TABS = True

Publish a blog post in English and German, look at Greek or other language versions in which the articles were not published

Versions

Python 3.11
Django 5.1.2
djangocms-blog @ git+https://github.com/fsbraun/djangocms-blog.git@4efe3ba11ca9f6ff8943a8482359a9e2b2a17288

Expected behaviour

The blog posts should be shown in English like before with django-cms 3.11 and -djangocms-blog 2.0.7

Actual behaviour

No article found on the home page in the latest posts plugin. and on the apphook page.

@MacLake MacLake changed the title Articles (Posts) that don’ŧ exist are not shown in the fallback language Articles (Blog Posts) that don’t exist are not shown in the fallback language Oct 29, 2024
@MacLake MacLake changed the title Articles (Blog Posts) that don’t exist are not shown in the fallback language Articles (Blog Posts) that don’t exist in the selected language are not shown in the fallback language, even if configured like that Oct 29, 2024
@fsbraun
Copy link
Owner

fsbraun commented Nov 11, 2024

(@MacLake Do you know if this worked with django CMS 3?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants