$ctx is undefined in studio when using props

i’ve been having a $ctx issue starting today. My situation is:

A code component (Shopify.Product), that takes a product handle. This is a cardPicker that fetches all the products via ctx - works great (more card picker options! cardSize pls. also showInput: false doesn’t do anything)

Now I have a component, that has this code component inside of it. I link the handle cardPicker prop - and then I can select it from the parent component.

As of tonight - I can select a product from the code component - but not from the linked prop - $ctx is undefined

my only way around this right now is to use dynamic value and manually type in the string

@yang bumping this - here’s a video.

@yang this seems to be a similar problem. If I expose a property - i can’t access the data from the parent component

Screen Shot 2022-09-13 at 4.30.47 PM.png

Screen Shot 2022-09-13 at 4.31.30 PM.png

cc @samuel @chungwu

Is this one also in mRKWSMy8wyKwe3EjpDLbA somewhere? You mention it’s only when inside a certain component…If you point me to the specific component/location where I can trigger this, then I can dive into it from there

oh! I think I see the issue…

i /think/ it’s not specific to a single component - but where I’m seeing is is a pretty common component.

if it’s helpful to test a given scenario lmk - happy to set anything up. or if you want to screen share

@yang I made a page called _Test2 with a single component inside.

  1. In Product.Template Click handle on the right side and you should see nothing.
  2. Cmd+Enter into Product.Template - select Product layer and click handle there - and you’ll see a list of products
    it’s not just this component - it seems anything with a nested selector exposed via prop - but not sure how to confirm this

Hey Beamer! Are you still seeing this bug? We pushed a fix yesterday evening

ah, it works!! let me reconfigure everything and make sure but seems to work.

@samuel ok i’m not sure if this is related but i’m seeing the same error. check this out - the first component you see is reusable, and the second one is that component in a page

hmm “the same error” being the “accessing a cross-origin frame” error? Could you link me to the project please?


Sorry I’m traveling right now but we’re butting up against a launch

Thanks! I think I understand the problem now; working on a fix!

This should be fixed!

Great thank you. What was it?

Issue on our end when preparing then autocomplete options for the data picker