WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#42613 closed defect (bug) (invalid)

Custom CSS with errors before 4.9 upgrade can't be corrected after upgrade

Reported by: hptccharge Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: Customize Keywords:
Focuses: javascript Cc:

Description

My custom CSS had errors in it that I hadn't caught before Wordpress was upgraded to v4.9. The custom CSS checker now points out those errors, but after correcting those errors, the custom CSS won't save. I can even delete all of the custom CSS and Publish is still greyed out.

Same behavior on eight websites that have just been upgraded to Wordpress 4.9, all are using latest Customizr theme.

Attachments (2)

Customizr CSS will not save image.png (75.3 KB) - added by hptccharge 3 years ago.
screen capture shows all CSS removed, still won't save.
Custom CSS with errors Childers.txt (5.8 KB) - added by hptccharge 3 years ago.
Custom CSS with errors that can't be edited/saved after 4.9 upgrade

Download all attachments as: .zip

Change History (20)

@hptccharge
3 years ago

screen capture shows all CSS removed, still won't save.

#1 follow-up: @Clorith
3 years ago

  • Keywords reporter-feedback added

Hi there and welcome to Trac!

I'm afraid I'm not able to reproduce the problems you are experiencing, when starting out with invalid CSS I am presented with a warning stating there are errors, I can then fix the error and save, remove the erroneous piece and save, or tick a checkbox which lets me save even though there are errors, all three are currently functioning for me.

Would you please try the default troubleshooting steps of disabling any plugins and see if the problem still occurs, alternatively try a different theme and see if you are allowed to save then, this will help identify if it's a plugin or your theme being the root cause.

If the problem persists even with things disabled, would you please provide the original CSS you had when first experiencing the problems so that we can see if we can reproduce this?

#2 @Clorith
3 years ago

  • Component changed from General to Customize
  • Focuses javascript added

#3 in reply to: ↑ 1 @hptccharge
3 years ago

Replying to Clorith:
Hi, thanks for the response. I deactivated all plugins and still cannot get the custom CSS to save. One critical note for replicating - that I didn't consider until I read your comments - is that the WP upgrades to 4.9 were all done automatically by the hosting providers, so any warnings about errors weren't seen. At the point I realized the problem, the sites were already upgraded to 4.9 and I was dealing with bad code previously saved in the custom CSS code file. I can cut out all of the code or only a portion - even when I've deleted all of the custom CSS, I cannot save the then-empty file.

I've tried changing themes, and the custom CSS is still there and can't be modified. I'm looking now for a theme that doesn't support custom CSS in hopes that that would cause what is there to be deleted.

Hi there and welcome to Trac!

I'm afraid I'm not able to reproduce the problems you are experiencing, when starting out with invalid CSS I am presented with a warning stating there are errors, I can then fix the error and save, remove the erroneous piece and save, or tick a checkbox which lets me save even though there are errors, all three are currently functioning for me.

Would you please try the default troubleshooting steps of disabling any plugins and see if the problem still occurs, alternatively try a different theme and see if you are allowed to save then, this will help identify if it's a plugin or your theme being the root cause.

If the problem persists even with things disabled, would you please provide the original CSS you had when first experiencing the problems so that we can see if we can reproduce this?

#4 follow-up: @Clorith
3 years ago

Do you still have the original, broken CSS, that you could share with us if the problem persisted even when making the changes above so that we can try to reproduce the issue?

#5 follow-up: @johnbillion
3 years ago

Can you also provide your browser name and version, and your operating system name and version please? It might be a bit specific to a particular environment.

@hptccharge
3 years ago

Custom CSS with errors that can't be edited/saved after 4.9 upgrade

#6 in reply to: ↑ 4 ; follow-up: @hptccharge
3 years ago

Replying to Clorith:

Do you still have the original, broken CSS, that you could share with us if the problem persisted even when making the changes above so that we can try to reproduce the issue?

Yes, I've uploaded one of the files with several errors in it.

#7 in reply to: ↑ 5 @hptccharge
3 years ago

Replying to johnbillion:

Can you also provide your browser name and version, and your operating system name and version please? It might be a bit specific to a particular environment.

Yes, I'm on Windows 10 Home, Version 1703, OS build 15063.726.
Behavior (not being able to edit or save the custom CSS) is consistent on Firefox v57, Chrome Version 62.0.3202.94 (Official Build) (64-bit)and Microsoft Edge 40.15063.674.0.

#8 in reply to: ↑ 6 @hptccharge
3 years ago

Replying to hptccharge:
One more note: one of my websites (cms.linksv.com)does not have this problem, it is the only website that has not been upgraded to 4.9. I've gone through and made sure that there are no errors in the custom CSS on that site, as it will be upgraded later next week.

Replying to Clorith:

Do you still have the original, broken CSS, that you could share with us if the problem persisted even when making the changes above so that we can try to reproduce the issue?

Yes, I've uploaded one of the files with several errors in it.

This ticket was mentioned in Slack in #core-customize by jeffpaul. View the logs.


3 years ago

#10 follow-up: @westonruter
3 years ago

@hptccharge Can you go into your user profile and try turning off “syntax highlighting” to see if the issue is specifically with CodeMirror?

#11 in reply to: ↑ 10 @hptccharge
3 years ago

Replying to westonruter: YES! Turning off syntax highlighting in my user profile allowed me to edit and save the custom CSS. After removing the errors, I confirmed that I could turn syntax highlighting back on and the Custom CSS was now editable and savable.

Thank you!

@hptccharge Can you go into your user profile and try turning off “syntax highlighting” to see if the issue is specifically with CodeMirror?

#12 follow-up: @westonruter
3 years ago

That's strange. I can't reproduce the error you experienced. I tried populating the Customize CSS with your CSS with errors Childers.txt, and I was able to override the error notification to save draft. I was then able to reload the Customizer, with the errored CSS intact, and then I was able to dismiss the error notice (and touch the CSS to trigger dirty state) and save again. I was able to do this all with syntax highlighting (CodeMirror) enabled.

#13 in reply to: ↑ 12 @hptccharge
3 years ago

Replying to westonruter: I never got a chance to paste in and then override an error notification, after WP was updated, the custom CSS wouldn't allow me to save anything, regardless of whether I was editing what was already in there at time of WP upgrade or after deleting everything in the custom CSS file and pasting in new code.

That's strange. I can't reproduce the error you experienced. I tried populating the Customize CSS with your CSS with errors Childers.txt, and I was able to override the error notification to save draft. I was then able to reload the Customizer, with the errored CSS intact, and then I was able to dismiss the error notice (and touch the CSS to trigger dirty state) and save again. I was able to do this all with syntax highlighting (CodeMirror) enabled.

#14 follow-up: @westonruter
3 years ago

There was probably a JS error in the console. If you restore the erroneous CSS and then re-enable syntax highlighting, can you reproduce the issue? If so, are there errors in the JS console?

#15 in reply to: ↑ 14 ; follow-ups: @hptccharge
3 years ago

Replying to westonruter: Sorry for delay in responding, I was out of the office. Yes I was able to restore the bad CSS and as soon as you re-enable syntax highlighting, you lose the ability to edit/save the CSS. Using Firefox developer tools, I did not see any errors in the console. If I'm looking in the wrong place, point me to the tool that I should be looking at. I've left one of my sites "broken" so I can retest this if needed.

Note: my theme developer (Customizr) who I had also reported this problem to, released an update that addresses it.

There was probably a JS error in the console. If you restore the erroneous CSS and then re-enable syntax highlighting, can you reproduce the issue? If so, are there errors in the JS console?

#16 in reply to: ↑ 15 @westonruter
3 years ago

Replying to hptccharge:

Replying to westonruter: Sorry for delay in responding, I was out of the office. Yes I was able to restore the bad CSS and as soon as you re-enable syntax highlighting, you lose the ability to edit/save the CSS. Using Firefox developer tools, I did not see any errors in the console. If I'm looking in the wrong place, point me to the tool that I should be looking at. I've left one of my sites "broken" so I can retest this if needed.

If you are comfortable getting me access to a site to test, you can create an admin user with the email trac-wp-core-42613@xwp.co.

Note: my theme developer (Customizr) who I had also reported this problem to, released an update that addresses it.

So is it a theme compatibility problem with “Customizr” and not a core issue then?

Last edited 3 years ago by westonruter (previous) (diff)

#17 in reply to: ↑ 15 @nikeo
3 years ago

Replying to hptccharge:

Note: my theme developer (Customizr) who I had also reported this problem to, released an update that addresses it.

Yes I confirm that this is not a core issue, the bug has been fixed in the latest version of the Customizr theme.

Last edited 3 years ago by nikeo (previous) (diff)

#18 @westonruter
3 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.