fsbraun / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

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 3 weeks ago

MacLake commented 3 weeks ago

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.

fsbraun commented 1 week ago

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