Custom Code Just Not Saving Reliably - Reopening

I originally opened the following issue but was not able to get back to it in time before it was auto closed:

Please review that short thread for context and the secure note you need to gain access to the specific site in question.

Now, to summarize the issue:

  1. I have a Raw Content element (or any element, that doesn’t matter) that uses a shortcode from a plugin to display a widget of some kind
  2. The Raw Content can not be previewed in the builder so I must view it in the front end
  3. I want to write some CSS for that widget
  4. I open the Custom Code editor and write some CSS that addresses my needs
  5. The builder can not show it to me so I load it in the front end
  6. I find that my CSS was not saved to the DB and therefore has no effect on the front end
  7. I prove this by reloading the builder and verifying that my new code has not been saved properly
  8. Try again and save frantically until the system decides to save it at arbitrary times

This situation has been happening to me a lot lately and it is unpredictable. @ruenel, I know you already went in there and tried to reproduce the problem but… if it decided to behave at that moment, you wont see it. I actually go into the same page you created to show you the problem in the very simple example of border colors and max-width.

I have made the video below to show it rather than explain it… it is much easier to understand it this way.

Please watch it in full to understand what I am talking about and see the issue happen several times intermittently.

Thank you for taking a thorough look at this because it is really in the way at this point… its been happening consistently enough that is is significantly slowing down my process almost every work day.

Thank you!

Hello @simeoned,

Thanks for reaching out.

Is this only happening when you quickly save the page using shortcuts such as Command + S on Mac or Ctrl + S on Windows? Does it happen when you use the mouse to manually click the save button? This is probably happening because there’s a short delay, around half a second, before the editor updates the actual value of the code editor. This delay or deferring function is added to prevent the editor from updating the page immediately while typing or using the keyboard. To avoid the issue, try to make your changes, wait at least a second or two before saving the page. This gives the editor time to update itself and sync the editor state.

Hope this helps.

Best regards,
Themeco

@Ismael,

Thank you for your response and the suggestion. However, the issue I’m experiencing with custom CSS not saving isn’t limited to using keyboard shortcuts like Command + S. As shown in the video I provided (e.g., at the 1:50–2:00 mark), I manually click the Save button after making changes, with more than a second’s delay, and the CSS still doesn’t save to the database. This is consistent whether I use shortcuts or the mouse, as demonstrated throughout the video.

I kindly ask that you review the full video, which clearly illustrates the intermittent nature of this issue across multiple attempts. The secure note with site access details is also included in my original post for further investigation.

This problem is significantly impacting my workflow, so I’d greatly appreciate a deeper look into what might be causing it. Please let me know if you or a colleague (@ruenel?, @charlie?) can investigate further or if there’s anything else I can do to assist.