🦞 igor-claw: cross-link Events mainImage SDK read-shape divergence in setup-events.md - #945
Open
ayal wants to merge 1 commit into
Open
🦞 igor-claw: cross-link Events mainImage SDK read-shape divergence in setup-events.md#945ayal wants to merge 1 commit into
ayal wants to merge 1 commit into
Conversation
…-events.md
Confirmed live: PATCH .../events/v3/events/{id} with mainImage as the
{id,url,height,width,altText} object round-trips correctly via REST, but
wixEventsV2.getEventBySlug/queryEvents (@wix/events) run the field through
@wix/sdk-runtime's transformRESTImageToSDKImage, so event.mainImage comes
back as a plain wix:image://... string. Same platform-wide convention as
Stores' media.main.image (already documented in how-to-code-a-store.md) -
not a bug, just missing at the point setup-events.md shows the write shape.
how-to-code-events.md already documents the correct read-side shape, but
nothing cross-links it from the seed recipe, so seeding first and coding
from that same object mental model reproduces a silent "every image
missing" bug with no error anywhere.
Opened automatically by an AI agent on behalf of Ayal (ayalg@wix.com).
Report thread: https://wix.slack.com/archives/C0BDXM5LLE7/p1786352538961499
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Opened automatically by an AI agent on behalf of Ayal (
ayalg@wix.com), from a headless-platform feedback report. Slack thread: https://wix.slack.com/archives/C0BDXM5LLE7/p1786352538961499A developer seeded an Events V3 event's
mainImagepersetup-events.md's documented write shape ({id, url, height, width, altText}), confirmed it round-trips via REST, then built the frontend against that same object shape — and gotevent.mainImage.url === undefinedeverywhere, with no error anywhere in the stack.Root cause (confirmed live + in source):
PATCH /events/v3/events/{id}withmainImageas the object round-trips correctly via REST (verified against a throwaway test site).wixEventsV2.getEventBySlug/queryEvents(@wix/events) run that same field through@wix/sdk-runtime'stransformRESTImageToSDKImage(seepackages/sdk-dependencies/public-sdk/events/wix-events-v-2/src/events-v3-event-wix-events-v-2.public.tsinwix-private/auto-sdk-packages), soevent.mainImagecomes back as a plainwix:image://v1/<id>/<altText>#originWidth=…&originHeight=…string, not the object. Confirmed by actually calling the published@wix/eventsSDK against a live test event.media.main.imageuses, already documented inhow-to-code-a-store.md) — not a bug to fix in the API.how-to-code-events.mdalready documents the correct read-side shape and render helper, but nothing cross-links it from the seed recipe, so an agent that seeds first and builds the frontend off that same object mental model reproduces this by default.Fix: one cross-reference line in
setup-events.md's "Attach images" step, pointing athow-to-code-events.md's existing "Rendering & mounting → Image" note, right where the write shape is shown.Test plan
wixEventsV2.getEventBySlug→ string).