Skip to content

Statamic 4.51.0 introduces issues with locale selector #9651

Closed

Description

@axelferdinand

Bug description

Updating from 4.50.0 to 4.51.0 causes my locale selector to not work in my multisite. The localized pages still work, but my locale selector didn't show any other language than the default lang after update.

<div class="locale" data-ng-controller="locale" data-ng-class="{'locale--expanded': locale}">
    <button class="locale__item locale__item--toggle" type="button" data-ng-click="toggleLocale();">
        <span class="locale__item__flag locale__item__flag--{{ locales }}{{ if is_current }}{{ locale:name }}{{ /if }}{{ /locales }}"></span>
    </button>
    <nav class="locale__selector">
        {{ locales }}
        {{ if is_current }}
        <button class="locale__item locale__item--active" type="button" data-ng-click="toggleLocale(); disableMenu(); disableNoScroll();">
            <span class="locale__item__flag locale__item__flag--{{ locale:name }}"></span>
            <span class="locale__item__name">{{ locale:name }}</span>
        </button>
        {{ else }}
        <a class="locale__item" href="{{ url }}">
            <span class="locale__item__flag locale__item__flag--{{ locale:name }}"></span>
            <span class="locale__item__name">{{ locale:name }}</span>
        </a>
        {{ /if }}
        {{ /locales }}
    </nav>
</div>

How to reproduce

Update from 4.50.0 to 4.51.0

Logs

No response

Environment

Environment
Application Name: NAC
Laravel Version: 10.46.0
PHP Version: 8.3.3
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
URL: nac.proto
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: postmark
Queue: sync
Session: file

Statamic
Addons: 3
Antlers: runtime
Sites: 3 (Norsk, English, Deutsch)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.50.0 PRO

Statamic Addons
aryehraber/statamic-captcha: 1.10.0
doublethreedigital/duplicator: 4.0.1
mitydigital/sitemapamic: 2.3.9

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

Activity

  1. Sm1lEE commented on Mar 4, 2024

    @Sm1lEE

    This could be the same reason as described in Issue 9631.

  2. chopperoon commented on Mar 4, 2024

    @chopperoon

    I'm seeing the same on two sites updated from 4.50.0 to 4.51.0. The same impact on the multisite locales selector and the same issues as described in 9631.

  3. Sm1lEE commented on Mar 4, 2024

    @Sm1lEE

    After downgrading to Statamic 4.50.0 the problem was gone. I assume something in 4.51.0 broke the Stache behavior.

  4. axelferdinand commented on Mar 4, 2024

    @axelferdinand
    Author

    That is my experience, too!

  5. duncanmcclean commented on Mar 4, 2024

    @duncanmcclean
    Member

    This seems to be the same issue as reported in #9631. I'm going to close this issue and discussion and continue there. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions