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

Admin cannot complete page saving when Xdebug enabled #2401

Open
yankl opened this issue Mar 12, 2024 · 2 comments
Open

Admin cannot complete page saving when Xdebug enabled #2401

yankl opened this issue Mar 12, 2024 · 2 comments

Comments

@yankl
Copy link
Contributor

yankl commented Mar 12, 2024

When I try to save a page in my local development environment from the admin plugin, I see that the page file does actually get updated, but the browser doesn't refresh, and everything on localhost stops responding until I reset Apache. I can see in the Task Admin that Apache is using CPU, and it can continue doing so indefinitely.
Disabling all other plugins didn't help, but I noticed that disabling Xdebug did. It doesn't seem to matter which particular module is enabled -- setting either xdebug.mode to debug or coverage causes the issue -- but if xdebug.mode is set to nothing (xdebug.mode = ), then the problem resolves, even if Xdebug itself is still enabled (zend_extension = xdebug).

I'm on Windows 10 using Laragon, Apache 2.4.58, PHP 8.3.0, Xdebug 3.3.1, Grav 1.7.44, Admin 1.10.44

@rhukster
Copy link
Member

From what you describe it does sound like an issue somewhat related to xdebug.. However I use xdebug every day and have never had an issue. Can you confirm you have no JavaScript errors on the page (via the console in your browsers dev tools). This might help isolate the root cause.

Also can you test with a bare-bones Grav+Admin installation on your setup? It could be an issue with the theme's blueprints that is causing things to get in a loop and therefore choke xdebug.

@yankl
Copy link
Contributor Author

yankl commented Mar 13, 2024

I tried it on a fresh install of Grav from the zip file with Grav+Admin, and confirm that there is the same issue.

I see no Javascript errors on either install when editing the page.

However, I have been getting an error each time I log-in to admin, and I see it's also happening on the fresh install. It might very well be related because I see that it also only happens when I have xdebug enabled. The error message pops up and then fades out on the interface, but also appears in the console as so:

admin.min.js?309a05fb26:848 Failed to fetch at TypeError: Failed to fetch
    at request (http://fresh-grav.test/user/plugins/admin/themes/grav/js/admin.min.js?309a05fb26:886:10)
    at Feed.fetch (http://fresh-grav.test/user/plugins/admin/themes/grav/js/admin.min.js?309a05fb26:1763:7)
    at Feed.refresh (http://fresh-grav.test/user/plugins/admin/themes/grav/js/admin.min.js?309a05fb26:1791:14)
    at HTMLDocument.<anonymous> (http://fresh-grav.test/user/plugins/admin/themes/grav/js/admin.min.js?309a05fb26:1826:15)
    at e (http://fresh-grav.test/system/assets/jquery/jquery-3.x.min.js?309a05fb26:2:30158)
    at t (http://fresh-grav.test/system/assets/jquery/jquery-3.x.min.js?309a05fb26:2:30460)

And I've been getting more or less the same error message on my local dev site, though for whatever reason there the bottom of the stack points to lines in jquery-2.x.min.js instead of 3.x.

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