sanity-io / sanity-plugin-markdown

Markdown support in the Sanity Studio
MIT License
50 stars 8 forks source link

Plugin crashes Sanity Studio UI with new theming UI #90

Closed patrulea closed 8 months ago

patrulea commented 9 months ago

Attempting to render the Markdown field causes the content tool UI to crash with a message that reads:
undefined is not an object (evaluating 'theme.sanity.color.selectable.primary')

image

This is probably related to the new, undocumented theming API introduced in sanity@3.23.0, released yesterday (December 19, 2023).

blimey85 commented 9 months ago

I'm getting this same issue. Were you able to find a solution?

patrulea commented 8 months ago

I ended up not needing the plugin so I uninstalled it. But you can downgrade your Sanity version in the meantime.

liznelson commented 8 months ago

Any recommendation on appropriate package versions would be helpful. I am hitting dependency issues left and right trying to find the best sanity configuration to keep using the markdown plugin.

patrulea commented 8 months ago

In their changelog they recommend v3.22.0.

manaskhandelwal commented 8 months ago

I have created a pull request (#92) to fix this.

drewlyton commented 8 months ago

I have created a pull request (#92) to fix this.

Would love to see this get merged soon!

pedrobonamin commented 8 months ago

Thanks for reporting, a fix is in progress and will be released in the new sanity version tomorrow.

robinpyon commented 8 months ago

A new version of this plugin (4.1.1) has been released which correctly checks for the existence of theme.sanity.color.selectable before accessing, which will address this issue directly if you need a fix right now.

As mentioned above, the next Studio release will ensure the correct value is provided. The absence of selectable in the theme object was a recent regression. Thanks for your patience here.

robinpyon commented 8 months ago

This should be fixed as of Sanity Studio 3.25.0 – please shout if you're still seeing issues here!