jacksleight / statamic-bard-texstyle

This Statamic addon allows you to add custom element styles to the Bard fieldtype and edit element attributes.
https://statamic.com/addons/jacksleight/bard-texstyle
Other
12 stars 0 forks source link

Pins throw handle() on null error in config fields #78

Open mikemartin opened 3 hours ago

mikemartin commented 3 hours ago

Bug Description

Hey @jacksleight It looks like the workaround you added for https://github.com/jacksleight/statamic-bard-texstyle/issues/74, doesn't work for config fields and throws an error.

Call to a member function handle() on null

This is what returns from $this->options['bard'];:

Screenshot 2024-11-15 at 8 36 58 PM

How to Reproduce

Extra Detail

Environment

jacksleight commented 2 hours ago

Curious, that fix was related to frontend rendering not config fields. Did it work fine in 3.3.0?

Also, just out of interest what's the use case for using pins in a config field? In the CP they'd never be rendered anyway.

mikemartin commented 2 hours ago

Thanks for the quick response. Yes, I've rolled back to 3.3 and it's working.

The use case is for forms rendered on the frontend, with a bard config field used for instructiuons / help text.

jacksleight commented 1 hour ago

A gotcha. Will check it out. What does your pin template look like?