APIs & Integrations

mbork
Member

Problems with updating a page using API and widget containers

Hello,

I am trying to use the update page API endpoint. It works apart from the "widget_containers" element, which does not appear at all.

I am fairly sure that it is correct. I couldn't find its documentation anywhere, but I just copied it from another page. My use case is creating a translation of a service to another language. There are more than a hundred pages on the website, and I wanted to automate the process. So, I downloaded all pages using the API "list pages" endpoint, changed the texts into translations and tried uploading with the "update page" endpoint. Unfortunately, widget_containers disappeared.

Any ideas?

Edit: I tried to manually edit this page. I clicked "edit modules" and then "Left column -> rich text" (see the first image), and I got this (see the second image) on the browser console.edit-modules.pngconsole-errors.png

0 Upvotes
3 Replies 3
DShah3
Member

Problems with updating a page using API and widget containers

@mbork @Derek_Gervais how did you overcome the issue. I am facing issue of when i am updating some text content of page it is getting updated but one background image is removed while i haven't done any changes to that. Also when i tried to look into response of update api call i found that my "row_meta_data" field is coming empty and i found that the image which was missing its information about image_url was placed in that row_meta_data and now it is coming empty so my image is removed. Are you aware how can avoid row_meta_data from being empty.

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Problems with updating a page using API and widget containers

Hey @mbork ,

 

Can you give me the link(s) to the page(s) in your account for which you're seeing this issue? I want to dig into the page(s) in question for more information.

 

Also, just to make sure that we're on the same page, you're seeing `widget_containers` field when GETing a page, but it's disapearing when PUTing to another page, despite including it in the request?

0 Upvotes
mbork
Member

Problems with updating a page using API and widget containers

Hi @Derek,

 

and thanks for replying. (Sorry it took me so long.) Unfortunately, I can't give you the link - I used my free account to perform experiments, and my trial ended before you replied. Today I tested my workflow on a production account (carefully, so that I didn't break any existing pages), and everything seemed to work. I think that within a few weeks I will be uploading a lot of pages, and if this (or another) poblem pops up, I will definitely let you know.

 

Thanks,