Jump to content

MediaHub 1.22.31 : Replace file polish, and 70+ changelog items


Recommended Posts

Posted

Hi everyone. I've just released MediaHub 1.22.31 (Beta).

While the focus started with Replace file polish, the final release is much broader. It tightens Import by URL, fixes crops inside repeaters, standardises permissions, and improves the Replace file workflow that arrived in 1.22.30 (Beta).

 mediahub-replace-asset-desk.thumb.png.8990853dc7df3786c5450b00bd9da8a7.png

It also includes a large code review resulting in a changelog that lists 70+ improvements across security, permissions, Replace file, crops, page fields, import, the library, rich text, and admin, with every line spelled out in full.

But first, a big thank you to Kevin Stieglitz and the team at JamBit. They put Replace file through the works, caught bugs early, and filed feedback on MediaHub-Issues in a way that was organised, reproducible, and genuinely helpful. Exactly the kind of testing Replace file needs before it graduates from beta. Grateful for the patience and attention to detail.

Before you upgrade...

1. Import by URL: security fix
Setup → Media Hub → Import → By URL now accepts normal web addresses (http:// / https://) and YouTube or Vimeo links only. Paths to files on your server are refused, with a message pointing to Scan & Import (images already on the site) or Upload (everything else). If your editors use Import by URL in production, plan an upgrade promptly. Without this fix, a Media Hub user could pull in files from the server that were never meant to be in the library, including sensitive paths you did not intend to expose through Import.
Issue: https://github.com/PeterKnightDigital/MediaHub-Issues/issues/190

2. Permission renamed: media-hub-admin → mediahub-admin
All MediaHub permissions now start with mediahub-. The rename happens automatically on upgrade and roles keep their access. Nothing to reassign in the admin.
Custom code only: if your templates, hooks or modules still check for media-hub-admin, update them to mediahub-admin. Until you do, that check fails for everyone except superusers.

3. Optional mediahub-import-screen permission
The Setup → Media Hub → Import screen was not gated by its own permission before. mediahub-import-screen is new and optional. Until you create it under Access → Permissions → Add New, nothing changes. Once it exists, only superusers and roles you grant can open that Import screen. Import page images in page fields is not affected.

4. Crops inside Repeater and Repeater Matrix items
Crops saved from a crop badge inside a repeater item now belong to that item, so the site and the badge stay in sync after reload. Crops saved that way before 1.22.31 are not moved automatically. You can re-crop by hand, or follow the docs: Repair crops saved in repeaters. The repair script is not in the zip; contact support if you need the CLI helper.
Issue: https://github.com/PeterKnightDigital/MediaHub-Issues/issues/173

Replace file polish: confirmation UI

Replace file appeard in 1.22.30 (Beta). 1.22.31 is mostly what you see around the swap: clearer confirmation, optional cache-busting below, and Run again when a staged job was interrupted.

After you pick a replacement, the dialog shows Old and New side by side with format, dimensions, size, and date.

Changes, Rich text, and Filename group what happens next. Rich-text fields keep their saved width and height; the dialog lists tracked uses and links to Check usage when you need to review pages manually. When the shape changes, Changes and Rich text warn you and point you at Check usage. Usage counts refresh when you pick the file, so they stay accurate if someone embedded the asset while you had the page open.

mediahub-replace-asset.thumb.jpg.d030364bcdd9acc4926007b31bb42784.jpg

More detail: Replace file

Replace file polish: cache busting

Replacing an asset in place keeps the same library ID and often the same filename. That is what you want for references, but it is also where caching can catch you out: the library looks updated while visitors still serve old bytes. Especially on CDN sites and Cloudflare, I found caching (even without ProCache) to be particularly stubborn to clear.

1.22.31 introduces optional Cache-bust replaced files and lives under Modules → MediaHub → Replacing files and is off by default. When you turn it on, MediaHub adds a small version tag to that asset’s URLs in the HTML visitors receive, for example photo.jpg?mhv=20261120150645 (mhv = MediaHub version: the UTC date and time of the replacement). Visitors get a fresh fetch. Editors still see normal URLs in the admin. Nothing is written into page content, and any mhv pasted into a field is stripped on save. It does not replace your own ?v= query strings and it leaves signed CDN or S3 URLs alone.

Logged-in front-end editors are the deliberate exception. If you are signed in and can edit the page on the front end (PageFrontEdit), MediaHub does not add mhv to the HTML you see. A front-end save would otherwise write those versioned URLs into your fields. After you replace a file, check what visitors get in a private window, another browser, or while logged out. The admin and rich-text editors always show plain URLs.

Usage is optional. Turn it on when the library shows the new file but the front end still looks stale. Leave it off if you already version URLs in templates or purge cache by hand after every swap.

When ProCache is installed, MediaHub can search cached HTML for those addresses and clear matching pages, including template listings the Usage table never knew about.

Logged-in users get an X-MediaHub-Cachebust header (and superusers a short HTML comment) so you can verify visitors get versioned URLs. See Configuration → Replacing files.

Everything else in brief

1.22.31 also fixes interrupted Replace file jobs (Run again), import matching and failed-import cleanup, page-field and crop scoping, the Unused utility filter, TinyMCE MediaHub buttons in secondary editors, bundled admin translations on newer screens, and more. Again, the changelog has the full list.

Cheers. 
P

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...