statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.02k stars 528 forks source link

ReferenceError: showLoginModal is not defined #10615

Closed maher-jaouadi-tb closed 2 months ago

maher-jaouadi-tb commented 2 months ago

Bug description

When I recently upgraded statamic from version 3.4 to version 4.58, I got an error in the console in one of the custom built pages of my control panel. In this page, I'm using some states used by statamic such as the showLoginModal variable. Previously, everything worked fine.

I cleared all caches and tried the php artisan statamic:install as suggested in some similar threads, but nothing seems to have solved the problem.

How to reproduce

The code snippet causing the issue:

<v-portal to="modals" v-if="showLoginModal">
                <login-modal
                      email=""
                      @closed="showLoginModal = false"
                ></login-modal>
            </v-portal>

Logs

No response

Environment

Environment
Application Name: ---
Laravel Version: 10.48.20
PHP Version: 8.2.21
Composer Version: 2.7.7
Environment: development
Debug Mode: ENABLED
URL: localhost:8000
Maintenance Mode: OFF

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

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

Statamic
Addons: 4
Antlers: regex
Sites: 2 (-----)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.58.2 PRO

Statamic Addons
doublethreedigital/runway: 5.6.1
joetannenbaum/antlers-stack-tags: 0.1.0
jonassiewertsen/statamic-livewire: 2.12.0
octoper/statamic-blade-components: dev-main

Installation

Existing Laravel app

Additional details

No response

maher-jaouadi-tb commented 2 months ago

the showLoginModal variable seems to be located in the app.js and app.js.map files in vendor/statamic/cp/js . After the upgrade these files did not change. I m wondering whether this may be the issue, meaning I still have the old files?

jasonvarga commented 2 months ago

Just remove that snippet. It was removed in v4.