statamic / cms

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

On 4.49, mod+S save shortcut isn't working in Pages Collection #9558

Closed tenmillionteeth closed 8 months ago

tenmillionteeth commented 8 months ago

Bug description

Updated to 4.49, which fixed a previous issue we were having. In the Pages collection, the mod + S shortcut for saving doesn't do anything, but it does still save the page in other collections. On this particular site, that collection only has a homepage in case that's helpful. Nothing in the logs.

In the console, there is one null error in a file called lockdown-install.js, somewhere around here:

const ourConsole = "unsafe" === consoleTaming ? originalConsole : makeCausalConsole(originalConsole, loggedErrorHandler)
              , globalProcess = globalThis.process || void 0;
            if ("none" !== errorTrapping && "object" == typeof globalProcess && "function" == typeof globalProcess.on) {
                let terminate;
                if ("platform" === errorTrapping || "exit" === errorTrapping) {
                    const {exit: exit} = globalProcess;
                    "function" == typeof exit || failFast("missing process.exit"),
                    terminate = ()=>exit(globalProcess.exitCode || -1)
                } else
                    "abort" === errorTrapping && (terminate = globalProcess.abort,
                    "function" == typeof terminate || failFast("missing process.abort"));
                globalProcess.on("uncaughtException", (error=>{
                    ourConsole.error(error),
                    terminate && terminate()
                }
                ))
            }
            if ("none" !== unhandledRejectionTrapping && "object" == typeof globalProcess && "function" == typeof globalProcess.on) {
                const h = makeRejectionHandlers((reason=>{
                    ourConsole.error("SES_UNHANDLED_REJECTION:", reason)
                }
                ));
                h && (globalProcess.on("unhandledRejection", h.unhandledRejectionHandler),
                globalProcess.on("rejectionHandled", h.rejectionHandledHandler),
                globalProcess.on("exit", h.processTerminationHandler))
            }
            const globalWindow = globalThis.window || void 0;
            if ("none" !== errorTrapping && "object" == typeof globalWindow && "function" == typeof globalWindow.addEventListener && globalWindow.addEventListener("error", (event=>{
                event.preventDefault(),
                ourConsole.error(event.error),
                "exit" !== errorTrapping && "abort" !== errorTrapping || (globalWindow.location.href = "about:blank")
            }
            )),

How to reproduce

Update to 4.49, try using the shortcut in the Pages collection.

Logs

No response

Environment

Environment
Application Name: 
Laravel Version: 10.45.0
PHP Version: 8.2.6
Composer Version: 2.6.5
Environment: local
Debug Mode: ENABLED
URL: 
Maintenance Mode: OFF

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

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

Statamic
Addons: 6
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.46.0 PRO

Statamic Addons
4rn0/statamic-image-optimizer: 1.1.1
mitydigital/statamic-two-factor: 1.1.4
rias/statamic-redirect: 3.6.2
ryanmitchell/statamic-translation-manager: 1.4.1
statamic/collaboration: 0.8.1
stillat/antlers-layouts: 2.0.0

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

Runtime (default)

Additional details

No response

duncanmcclean commented 8 months ago

This seems to be working fine for me, on the latest version.

Can you share a screenshot of the error you're running into?

tenmillionteeth commented 8 months ago

Yes, let me jump back into the repo. Oh, seems to be working now. I did run composer update a second time in the interim, so I don't know what it was, but we'll call that solved.