Copying an Image to a new TextWebPart causes SharePoint to mess up the lay-out?

Copper Contributor

Dear,

 

I created a Logic App that is able to translate SharePoint pages through the DeepL API. To do this, I use GraphAPI. I'm getting the canvasLayout, translate every WebPart in there and update the translated page to the new page.

 

Everything goes well, but images in TextWebParts. The canvasLayout recognized two WebParts, where the image is a separate standard (Image) WebPart. They are connected by an ID in the HTML of the TextWebPart. See the picture below. Left is the original document, right is the translated document.

MikeLimburg_0-1677854272926.png

 

When going in edit mode, the SharePoint page looks like this.

MikeLimburg_1-1677854311631.png

 

I checked both pages, comparing them using a GET method on both canvasLayouts of the pages.

There is no difference in between those (I translated from CS to CS, so that's fine). Attached are the canvasLayouts of the pages.

MikeLimburg_2-1677854578180.png

 

I am puzzled in how SharePoint has different behaviour in similar code and would appreciate any explanation or solution.

 

Yours,

Mike

 

0 Replies