GoogleForCreators / web-stories-wp

Web Stories for WordPress
https://wp.stories.google
Apache License 2.0
768 stars 178 forks source link

Carousel / Saved Templates: Poster generation not working #12513

Closed swissspidy closed 2 years ago

swissspidy commented 2 years ago

Bug Description

While looking at #12512 I noticed that the poster images for saved templates are no longer generated/uploaded.

Expected Behaviour

When saving a page as template, we ought to take a poster image and upload that to WP. But this doesn't seem to be happening anymore.

Code in question:

https://github.com/GoogleForCreators/web-stories-wp/blob/896cfe750bf1e596c77e8b1ca7ba6143180e7f83/packages/story-editor/src/components/library/panes/pageTemplates/savedPageTemplate.js#L130-L176

Steps to Reproduce

  1. Save current page as template
  2. Notice lack of network requests to upload poster image
  3. Check DOM to see that no image has been uploaded

Screenshots

Screenshot 2022-10-19 at 21 21 59

Additional Context

swissspidy commented 2 years ago

This seems to hang somewhere in storyPageToDataUrl, with the htmlToImage.toJpeg call seemingly never resolving.

I noticed that this issue not only affects saved templates, but also the carousel in the workspace. No images are ever created.

Screenshot 2022-10-24 at 14 50 13

merapi commented 2 years ago

Fix is already on main, tested on local env and staging.