Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Not working in Gutenberg? #12

Closed
ajuliano opened this issue Oct 14, 2019 · 3 comments
Closed

Not working in Gutenberg? #12

ajuliano opened this issue Oct 14, 2019 · 3 comments

Comments

@ajuliano
Copy link

I can't get the field to work in Gutenberg. The value/icon is not loaded after saving a post and reloading the edit screen.

I've added the field to a block that's been registered with acf_register_block_type (https://www.advancedcustomfields.com/resources/acf_register_block_type/).

@davidallenlewis
Copy link

Same issue. I've looked at the code to attempt to fix it with no luck.

@houke
Copy link
Owner

houke commented Oct 21, 2019

Haven't tested it in Gutenberg so far, looking at a simple field from ACF itself (https://github.com/AdvancedCustomFields/acf/blob/master/includes/fields/class-acf-field-text.php) I see some changes there compared to this plugins field, so it is best to start looking there.

Two differences I see worth looking into: using initialize() instead of __construct() and acf_register_field_type($class) instead of new Class().

I have this issue on my radar, but not sure yet when I'll follow up on this one.

@tlewap
Copy link
Contributor

tlewap commented Dec 19, 2019

This pull request fix that #17

houke added a commit that referenced this issue Dec 20, 2019
@houke houke closed this as completed Dec 20, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants