Looks like right now in my forums I have hundreds or thousands of blank posts or posts just missing youtube videos and the reason seems to be that baked post content looks like this:
<div class="cooked"> <div class="lazyYT" data-youtube-id="WJxSNbAer9M" data-youtube-title="Starset - Die For You (Official Audio)" data-width="480" data-height="270" data-parameters="feature=oembed&wmode=opaque"> </div> </div>
If I rebuild HTML YouTube videos are cooked correctly using lazy-video-wrapper.
I did some digging and seems that this problem maybe related to this PR: DEV: Remove lazy-yt and replace with lazy-videos by jancernik · Pull Request #20722 · discourse/discourse · GitHub For some reason after this change not all posts got rebaked. I’m not a SQL or Discourse guy so I’m not sure if the problem is in migration script it self or in that it failed at some point.
class RebakeLazyYtPosts < ActiveRecord::Migration[7.0] def up execute <<~SQL UPDATE posts SET baked_version = 0 WHERE cooked LIKE '%lazyYT-container%' SQL end
Seems that I need to rebake a couple of thousand posts with youtube links in them. How should I go about doing it?