Skip to content

Crawler view: an image for topics whose first post is only videos - #453

Merged
TripleU613 merged 2 commits into
mainfrom
seo/video-post-image
Nov 28, 2026
Merged

TripleU613 merged 2 commits into
mainfrom
seo/video-post-image

Conversation

@TripleU613

Copy link
Copy Markdown
Owner

Summary

Google Search Console flagged topic 10419 with "Either text, image, or video should be specified" (DiscussionForumPosting). Its first post is two uploaded videos and nothing else. Core cooks each video into a .video-placeholder-container div that only the browser turns into a player, so in the crawler view the item's text is empty and there's no image or video. Core links Post#image_url as the image, but a video's thumbnail never becomes one (image_upload_id is nil here).

This adds <link itemprop="image"> with the first video's thumbnail inside the DiscussionForumPosting, through the core server:topic-show-before-posts outlet. It only applies when the first post has no image of its own, and it's behind jtech_video_post_schema_image (on by default). On prod this matches 2 topics, and 10419 is the only one with no text at all.

Affected module(s)

  • Shared (plugin.rb, settings, locales, docs, lint/CI)

Test plan

  • spec/requests/video_post_schema_spec.rb crawls a topic as Googlebot and checks:
    • the thumbnail is linked once;
    • nothing is added when the post already has an image, has no videos, or its thumbnail isn't an http(s) URL;
    • nothing is added when the setting is off.
  • Ran the module read-only against topic 10419 on prod. It returns the first video's thumbnail.
  • After deploy: fetch the topic as Googlebot, then "Validate fix" in Search Console.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs

Core cooks an uploaded video into a placeholder div that the browser turns
into a player, so in the crawler view a first post made only of videos gives
the DiscussionForumPosting no text, no image and no video. Google Search
Console rejects it ("Either text, image, or video should be specified"), as it
did for topic 10419. Core links Post#image_url as the image, but a video's
thumbnail never becomes one, so we link the first video's thumbnail instead,
behind jtech_video_post_schema_image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T07:06:53.331512Z 1627ebf PR opened
🔒 Security Review ✅ Completed 2026-11-26T07:07:57.084828Z 1627ebf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TripleU613
TripleU613 merged commit 91d4684 into main Nov 28, 2026
8 checks passed
@TripleU613
TripleU613 deleted the seo/video-post-image branch November 28, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant