iamntz / carbon-fields-urlpicker

Add an URL Picker field to Carbon
14 stars 18 forks source link

Unknown field type "urlpicker". #20

Open timnolte opened 8 months ago

timnolte commented 8 months ago

So I'm trying to use this along with Carbon Fields as a library in a plugin. I'm getting errors that Carbon Fields can find the Field typo of urlpicker. What is odd is that this appears to work in our plugin's local development WordPress instance as well as in a local environment of our test site. However, this error is happening in our Pantheon testing environment and also in PHPUnit tests, and it's a wp_die() failure being thrown by Carbon Fields. I'm unclear on why this is occurring and why Carbon Fields can't find the library in these cases. I've even gone so far as trying to specifically include the field in a use statement in our plugin where the fields setup is happening as well as specifically including the package file as a require statement in our plugin startup and neither of these resolved the issue.

timnolte commented 8 months ago

Hmm, so, this may be an issue with how we are loading classes/objects in our plugin. Noticed a somewhat similar issue reported here: https://github.com/htmlburger/carbon-fields/issues/912