Streaming live at 10am (PST)

Issue with CMS Code Embeds Not Saving

Hey y’all!

I’ve been having some issues with embeds not saving in CMS items. Simply put, I have a CMS collection of “courses” that has a rich-text field where I go in and add a code snippet. The code snippet I’m adding is a simple Paypal button widget from Elfsight.

The first time around I just threw the same snippet in for all of them to test the button. Now, prices have been set for every course, so I created widgets for each one and went into each collection item and updated the code snippets from elfsight. However, when I went on the frontend to test the new buttons I noticed all the items in the collection still had the same snippet. I went back into Webflow, pasted all of them over again for each item and ran into the same issue. That’s when I realized that the snippet I was pasting simply wasn’t saving (even when I repeatedly hit “save and close”). Even more strange, when I went to add a new CMS item, I pasted the respective code snippet in and had the same issue, it just wasn’t saving any of the code I entered, the embed editor coming up blank each time I reopened it.

Hoping someone has an idea of what might be happening, and why my snippets aren’t saving. Any help would be greatly appreciated!

I’m not sure whether I understand your problem correctly, but this seems like a problematic behaviour - you can’t edit CMS items separately from each other. One template rules them all. So if you paste one snippet into that template, every single page coming out of it will have this snippet.

I’ve never used the Elfsight widgets, but what I would expect it to be is some portion of code which is the same in every single button you have there, and some sort of an ID, which tells the original Elfsight website which widget was actually clicked as they have a lot of them on a lot of websites.

What you can try to do is to make a CMS field for this ID and then create an Embed in Webflow designer where you will paste the code and connect the ID to that CMS field.

Maybe paste the snippet here, so we can have a look at it if you need some more help.

1 Like

Thanks for the reply!

So I think I do have it set up similar to what you are describing. Currently, I’m not trying to change the snippet manually in the CMS template itself, I understand that would just duplicate across all items. I’ve actually made a rich-text field for the embed in the collection so that when I go to create an item I can just paste the unique snippet into that field via an embed. Here’s a screenshot of what that looks like.

The issue I ran into was that whenever I’d go into the CMS item to update the field my changes wouldn’t save. No matter how many times I opened the code editor and hit save it would just disappear when I went to publish or reopened it.

However, I think your solution is a lot smarter as Elfsight widgets are the same snippet but with a different id for the specific button. Using your method, I won’t have to worry about putting an embed into a rich-text field each time I create/update an item.

Thank you!

I’m experiencing the exact same problem. And I just noticed it yesterday. It was working well two days ago.
I try to embed very simple Acast (podcast) code - that I already have in other articles - and it’s not working. It’s like it’s not even saving… When I type the code and click on save it’s there. But if I open the source again, it’s missing. I suppose it’s something you guys have done (maybe to fix a bug) but I can’t go around it.

The editor it’s not working only in CMS or Ecommerce pages . If inserted directly from add components tab, works perfect.

Experiencing the same thing today. Anything I enter into a Custom Code block within a Custom Field on an eCommerce Product isn’t getting saved.

Bug has been reported here: HTML Embed Code Editor not working in collection Rich Text editor