Custom CSS & HTML Save Changes button has broken
-
When I click the save changes button in the custom CSS & HTML section nothing happens. It doesn't redirect me anywhere or do anything at all. It get errors in the console that relate to the name of some of the elements in the form are not focusable.
It's definitely a problem in the Custom HTML at top form, the two invalid controls that arre throwing up the error don't show up in the editable box but they do show up in the code if you click the admin.php? link on the right in the console like so:
If I edit the theme and delete the highlighted code from the css_html_options.php file I can save the custom HTML & CSS section again but it removes the ability to add any custom HTML which is definitely not ideal.
I there a way to reset the custom HTML? I have no idea why this seems to have broken. I tried swapping themes to see if that would reset things but to no avail, is it best just to delete laytheme and reinstall it? Will I need to rebuild my pages if I do that?
-
Okay, so I managed to fix the saving problem by editing the theme in css_html_options.php and removing the '.$html_content.' code from line 113 below so it wouldn't return the broken code and I could save it as a blank again.
After some experimentation I've discovered that it breaks every time I use the <textarea> html tag. Is it related to the fact that line 113 is a text area and my code is interacting with what is being echoed in the php? I can put the code into the page but I guess it's interesting that the textarea tag breaks the custom html boxes.
-
Dear @DavidProjects
Great Inspection and isolation of problem
I will add this to the Development notes so that we can have a closer look!Thank you for using Lay Theme and making the Forum stronger :)
Sincerely
Richard -
can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it