@macstainless
Ok, let’s try to figure this out.
LSC will run same optimizations in admin area comparing to frontend. There are a few things that will be active but should not interfere with admin area.
Have you tested disabling other plugins? Maybe test by disabling: wp-asset-clean-up
Looking over report I think your htaccess need to be updated.
I kept the plugin disabled via the Toolbox setting. Now after seeing your reply, I re-enabled and everything is fine. I know that’s temporary as I think re-enabling flushes the cache. As soon as it triggers again, I’ll try disabling asset cleanup. Just know I’ve used that plugin for nearly 2 years (all the while with Lightspeed) and never has this issue come up.
Also, can you elaborate on the htaccess file? I know changes need to be made at times, but I try not to mess with it too much. Guidance on what edits are needed is appreciated.
Thanks. I’ll reply back the next time I get the CSS issue.
@macstainless
Allright, that will clear: wp-asset-clean-up
What is your hosting? Did some changes happen on server side? Did you activated some cache on hosting level?
I checked this morning and it’s happening. I went and disabled Asset Cleanup and there’s no change. My “edit post” page looks just like the screen shot in my first post.
My hosting is on NameCheap. The LS cache plugin (I believe) integrates with their server side caching that’s part of the service.
I’ve made no changes to my hosting, sans creating a staging instance that has all plugins disabled on it.
Plugin Support
qtwrk
(@qtwrk)
I don’t see anything from our plugin would cause thing like this
what do you see in browser dev tool on these JS/CSS request ?
any error ? 403 error or something ?
On my Edit Post page, here’s some items from the console I think may be helpful. I’ve redacted some of the values that come before the .html listings:
[Error] Refused to apply a stylesheet because its hash, its nonce, or ‘unsafe-inline’ does not appear in the style-src directive of the Content Security Policy. (controller-with-preconnect-{REDACTED}.html, line 1)
[Error] TypeError: null is not an object (evaluating ‘styleElement.sheet.insertRule’)
applyCss
applyAdvancedBlockingData
handleMessage
handleMessage (advanced-script.js:262)
[Error] Refused to execute a script because its hash, its nonce, or ‘unsafe-inline’ does not appear in the script-src directive of the Content Security Policy. (m-outer-{REDACTED}.html, line 0)
[Error] [Report Only] Refused to execute a script because its hash, its nonce, or ‘unsafe-inline’ does not appear in the script-src directive of the Content Security Policy. (m-outer-{REDACTED}.html, line 0)
[Error] [Report Only] Refused to apply a stylesheet because its hash, its nonce, or ‘unsafe-inline’ does not appear in the style-src directive of the Content Security Policy. (m-outer-{REDACTED}.html, line 1)
[Error] TypeError: null is not an object (evaluating ‘styleElement.sheet.insertRule’) — hidden:151
handleMessage (advanced-script.js:262)
[Error] Failed to load resource: You do not have permission to access the requested resource.
[Error] Refused to execute a script because its hash, its nonce, or ‘unsafe-inline’ does not appear in the script-src directive of the Content Security Policy. (inner.html, line 0)
[Error] Refused to apply a stylesheet because its hash, its nonce, or ‘unsafe-inline’ does not appear in the style-src directive of the Content Security Policy. (inner.html, line 1)
[Error] TypeError: null is not an object (evaluating ‘styleElement.sheet.insertRule’) — hidden:151
handleMessage (advanced-script.js:262)
[Error] Failed to load resource: You do not have permission to access the requested resource.
Plugin Support
qtwrk
(@qtwrk)
okay , looks like something with CSP
please try remove this line in your htaccess file Header set Content-Security-Policy .....
you have huge duplication on your .htaccess, I’d suggest to clean it up a bit first
-
This reply was modified 11 months, 1 week ago by
qtwrk.
-
This reply was modified 11 months, 1 week ago by
qtwrk.
Thanks. I’ll try removing that line and see what happens. In addition, I’ll look into cleaning up the file. I don’t go in there too often, so I have to see what’s going on and figure things out.
Okay, so right now things are working with a re-done .htaccess file, but until I take a deeper dive into the site, I won’t know if everything is 100%.
I created a new .htaccess file, populated it with WordPress defaults, and copied individual sections from the old file into this one. I took care not to duplicate anything. I then went into LSC’s dashboard and did a Save on its presets and that populated the file too.
Right now the cache is on and the pages in wp-admin look okay. I will have to give it some time and see if the issue crops up. I’ll also have to explore parts of my site to see if anything else is not working. I did move the content security policy code in the new file in order to determine if the duplications or that was the issue.
I’ll update this when I know more. Thank you.
-
This reply was modified 11 months, 1 week ago by
macstainless. Reason: clarification
Plugin Support
qtwrk
(@qtwrk)
okay , thanks, if it ever happens again , please remember check the dev tool , see if there is any error message or something.
Just following up on this that I’ve not encountered further issues since cleaning my .htaccess file. I made no other changes, so it looks like that was it. I’m really unsure how so much duplication took place, but all seems to be good. Thank you for your help!