# KRB 31 existing hero image repair v2

Generated: 2026-06-24T01:14:38.493729+00:00

## Input used

- `/Users/iggy/.hermes/profiles/ignite_team/outbound/krb-missing-hero-live-asset-audit-v1.csv`

## Scope

This is a narrow Design API Playground / Code Lab script for the **31 pages** where the read-only audit found:

- a `Section / Hero` component,
- the Webflow hero Image prop was empty at audit time,
- the live WordPress page had a `.page-header` hero image,
- the matching asset already exists in the KRB Webflow asset library.

It does **not** touch the 6 pages where the asset was missing, or the 11 pages where no live hero/source page was detected.

## Safety defaults

- `CONFIG.dryRun: true`
- `CONFIG.runMode: 'current-page'`
- v2 current-page mode does **not** require `webflow.getAllPages()` / `webflow.getPages()`; this fixes the fatal error from v1.
- No publish, delete, component insert, component removal, global style/site/redirect changes.
- It only attempts to set the `Image` prop on exactly one detected `Section / Hero` per target page.
- `requireEmptyImageBeforeWrite: true` skips a page if the hero image has already been populated since the audit.

## How Sylvain can run

1. Open one target page in Webflow Designer / Iggy app Code Lab.
2. Paste/run the script as-is for a dry-run on the current page.
3. Check `KRB_31_HERO_IMAGE_REPAIR_V2_RESULT` for one proposed change.
4. For live one-page testing: set `dryRun: false`, keep `runMode: 'current-page'`.
5. For the full batch after the one-page test: set `dryRun: false`, set `runMode: 'all-pages'`. v2 tries `webflow.getAllPagesAndFolders()` first; if the app still has no pages API, run page-by-page in `current-page` mode.
6. Send the result JSON/log back so Hermes can run page-client readback verification.

## Target count

31 pages.

## Targets

- Wagga Wagga Virtual Afternoon Tea `/wagga-wagga-afternoon-tea` — asset `Property-1KRB-Website-090621_187-e1632120537463.png` (`6a34f201f2e1779f1e0a4caa`), match `filename-key`
- Thank You - Senior School `/booking-thank-you-senior-school` — asset `KRB-Yr-12-Learning-Hub-080219_303-1.jpg` (`6a34f00d5fa5bc2dd8fd41c8`), match `filename-key`
- Thank You `/benefits-coeducation-thank-you` — asset `KRB-Website-Promo-May-2021_659-21-scaled.jpg` (`6a34efddfc8e0a8975b0a523`), match `filename-key`
- Term Dates `/term-dates` — asset `G2A9745_jp.jpg` (`6a34ec3d0daf73761740daf2`), match `filename-key`
- Sutherland Shire Bus Service `/sutherlandshire` — asset `header_resized-1.jpg` (`6a34f2d1902cc86d23b47fec`), match `filename-key`
- Support KRB `/support` — asset `support__kincoppal2_099.jpg` (`6a34e45bc5f6e79588161362`), match `loose-name`
- Sacred Heart Schools Conference 2026 `/2026shschoolsconference` — asset `Original58180437-1-scaled.jpg` (`6a34f1f8f2e1779f1e0a4596`), match `filename-key`
- Review of Environmental Factors - Hughes Centre 2024 `/review-of-environmental-factors-hughes-centre-2024` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- Privacy Policy `/privacy-policy` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- Strategic Direction: 2026 and Beyond `/our-vision/strategic-plan` — asset `Kincoppal_4-scaled.jpg` (`6a34eebf5fa5bc2dd8fcb246`), match `filename-key`
- Junior School Masterplan `/our-vision/masterplan` — asset `KRB-Yr-7-2026-Experience-Day_647-scaled-e1747621399575.jpg` (`6a34f0326cd91cb6026e149e`), match `filename-key`
- Our Vision `/our-vision` — asset `KRB-Yr-7-2026-Experience-Day_647-scaled-e1747621399575.jpg` (`6a34f0326cd91cb6026e149e`), match `filename-key`
- Co-curricular Program `/our-approach/ignite-co-curricular-program` — asset `KRB-JPARK-60029-scaled.jpg` (`6a34ef19b838e59a94b8bc4f`), match `filename-key`
- Orange Community Lunch Registration `/orange-community-lunch-registration` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- North Shore `/northshore` — asset `header_resized-1.jpg` (`6a34f2d1902cc86d23b47fec`), match `filename-key`
- Newsletter `/newsletter` — asset `KRB-Chapel-Concert-2019_252-scaled.jpg` (`6a34eecac5f6e7958819d396`), match `filename-key`
- Learning `/learning` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- KRB Bus Services `/krb-bus-services` — asset `202301113-kincoppal-004-1-e1751329749197.jpg` (`6a34eb64f829ac7e5e3b581e`), match `filename-key`
- Information Morning Form `/information-morning-form` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- Contact Us `/contact` — asset `KRB-Boarders-Return-2024_233-scaled.jpg` (`6a34eebb6cd91cb6026d5065`), match `filename-key`
- Booking Thank You `/booking-thank-you` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- Activities `/boarding/activities` — asset `KRB-promo-261120_254-scaled.jpg` (`6a34f0648360e1ed0c855ec5`), match `filename-key`
- Annual Report `/annual-report` — asset `KRB-General-promo-photos-March-2023_119.jpg` (`6a34eee6dd046706045144ef`), match `filename-key`
- Virtual Tours `/admissions/virtual-tours` — asset `privacy-policy__G2A1085-1.jpg` (`6a34e45464bb1bc69e041e74`), match `loose-name`
- Scholarships & Bursaries `/admissions/scholarships-bursaries` — asset `G2A1073-1.jpg` (`6a34ec11ceef631e24b526a8`), match `filename-key`
- Fees `/admissions/fees` — asset `G2A9388-1-scaled.jpg` (`6a34ec20206247d3c7bda998`), match `filename-key`
- Enrolment `/admissions/enrolment` — asset `wagga-wagga-afternoon-tea__kincoppal2_130.jpg` (`6a34e46642f56dbdada509b0`), match `loose-name`
- Discovery Tours `/admissions/discovery-mornings` — asset `G2A9622-1.jpg` (`6a34ec30ceef631e24b54596`), match `filename-key`
- Book a Call with Admissions `/admissions/book-a-call-with-admissions` — asset `G2A9622-1.jpg` (`6a34ec30ceef631e24b54596`), match `filename-key`
- Admissions Enquiry `/admissions/admissions-enquiry` — asset `G2A9388-1-scaled.jpg` (`6a34ec20206247d3c7bda998`), match `filename-key`
- Admissions `/admissions` — asset `KRB22750c-scaled.jpg` (`6a34f0dbe07184bf714c33c1`), match `filename-key`

## v2 fix

Sylvain reported v1 failed with `No pages API found: expected webflow.getAllPages() or webflow.getPages()` because v1 loaded the page list before current-page mode. v2 fixes this by using the current page directly in `current-page` mode, and only requiring a pages API for `all-pages` mode. It also adds `getAllPagesAndFolders()` support for all-pages mode.
