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

Kirki Asset URLs Include Server Absolute Path on Azure, Causing 404 and MIME Errors in Customizer #2542

Open
PatrikFAS opened this issue Dec 15, 2024 · 0 comments

Comments

@PatrikFAS
Copy link

Issue description:
When accessing the Customizer, Kirki attempts to load its CSS/JS from incorrect URLs that include the server’s absolute file system path. Instead of normal plugin asset URLs like https://findasail.com/wp-content/plugins/..., Kirki tries to load from https://findasail.com/home/site/wwwroot/wp-content/plugins/kirki/.... This results in MIME type errors and 404s for the Kirki assets, preventing the Customizer from functioning properly.

Example Errors:

Refused to apply style from 'https://findasail.com/home/site/wwwroot/wp-content/plugins/kirki/kirki-packages/control-base/dist/control.css?ver=1.0.4' because its MIME type ('text/html') is not supported.
GET https://findasail.com/home/site/wwwroot/wp-content/plugins/kirki/kirki-packages/control-base/dist/control.js?ver=1.0.4 net::ERR_ABORTED 404 (Not Found)

All other plugins load their assets correctly at https://findasail.com/wp-content/plugins/... without the absolute server path. The issue appears unique to Kirki’s asset URLs.

I’ve tried:

Reinstalling and updating Kirki.
Confirming correct WP_HOME, WP_SITEURL, and WP_CONTENT_URL settings.
Deactivating all non-essential plugins.
Checking file permissions and clearing caches.
Using the same codebase on a staging environment (test.findasail.com) works fine, only the production Azure App Service environment exhibits this issue.
No other errors appear, and the test environment (with identical code) does not append the server path.

Version used:
5.1.0

Console:
image

image

I noticed that someone had a similar problem 6 years ago...
#2312

Any guidance on how to ensure Kirki uses the correct, domain-only URLs (without the server’s absolute path) would be greatly appreciated - thank you!

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

1 participant