Skip to content

Media 1202#16

Merged
protitude merged 10 commits into
1.2.xfrom
media-1202
Mar 25, 2026
Merged

Media 1202#16
protitude merged 10 commits into
1.2.xfrom
media-1202

Conversation

@protitude
Copy link
Copy Markdown
Collaborator

@protitude protitude commented Mar 23, 2026

Describe context / purpose for this PR

News Images - Rework

Issue link

#1202

Any other related PRs?

Link to MultiDev instance

http://md-1202-ucbsub-oit.pantheonsite.io

Checklist for PR author

  • I have checked that the PR is ready to be merged
  • I have reviewed the DIFF and checked that the changes are as expected
  • I have assigned myself or someone else to review the PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks how “news” hero images are handled by migrating from a direct file field to a media reference, and updates token/meta-tag generation to use the new media-backed hero image plus a dedicated Open Graph image style.

Changes:

  • Removes a previous news form validation tied to the old front image field.
  • Adds a new [oittoken:og_image] token and updates token/meta-tag image generation to use a hero media field (including social_share style for OG).
  • Adds a deploy hook to migrate existing field_news_front_image files into news_images media entities and populate field_media_hero_image.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
oit.module Adds OG token + switches token/meta-tag image sourcing to a new hero media field via oit_get_hero_image_fid().
oit.deploy.php Adds a batch deploy hook to migrate existing news hero images into media entities and set the new media reference field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread oit.module Outdated
Comment thread oit.module Outdated
Comment thread oit.module Outdated
Comment thread oit.module Outdated
protitude and others added 3 commits March 23, 2026 10:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@protitude protitude mentioned this pull request Mar 23, 2026
3 tasks
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

@protitude I've opened a new pull request, #17, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 25, 2026 16:19
Fix entity reference field key and add null safety for taxonomy term loading
@protitude protitude merged commit 8d7c4f0 into 1.2.x Mar 25, 2026
1 check passed
@protitude protitude deleted the media-1202 branch March 25, 2026 16:34
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.

3 participants