AdvancedCustomFields / acf

Advanced Custom Fields
http://advancedcustomfields.com/
835 stars 170 forks source link

ACF 5.8.0-beta2 Gutenberg acf blocks disappearing #80

Open Toxyc opened 5 years ago

Toxyc commented 5 years ago

Hi,

I was using ACF 5.8.0-beta1 and ran into the problem of Gutenberg not saving ACF fields outside of Gutenberg, so I updated to beta2. Now I run into the issue that the blocks within the Gutenberg editor aren't being displayed anymore. They become invisible for some reason. Anyone else having this issue or is it just me?

Toxyc

Toxyc commented 5 years ago

Also, I don't know where to report these kind of things seeing as I'm using the beta version this might not be the proper location to share my issues. Any advice would be appreciated.

elliotcondon commented 5 years ago

Hi @Toxyc

Thanks for the email, Elliot here - ACF dev​​​.

GitHub is a good place for these kinds of issues. The issue you have found has recently been fixed, and you can find the solution here: https://github.com/AdvancedCustomFields/acf/issues/79

Toxyc commented 5 years ago

Hi @elliotcondon ,

I've tried your solution as mentioned in #79 However this does not fix the issue for me.

elliotcondon commented 5 years ago

Hi @Toxyc

Thanks for the bug report. Can you please check your console log and report nay JS errors that come from the acf JS during page load?

Toxyc commented 5 years ago

Hi @elliotcondon

There are no errors in the console. I feel like this might be a styling issue rather than a JS issue. screenshot 2018-11-06 at 10 17 47 am

Hope this helps to narrow down your search.

elliotcondon commented 5 years ago

Hi @Toxyc

Thanks for the screenshot. It looks like your ACF Block is in "preview" mode, but your preview is not returning any HTML.

Please check your console log to find the AJAX request that fetches the block preview and review the response. If this AJAX call is not returning any HTML, it is most likely you have triggered a PHP error (or similar) within your render_callback / render_template which is terminating the process.

Toxyc commented 5 years ago

Hi @elliotcondon

screenshot 2018-11-07 at 11 35 25 am

I've uploaded a screenshot of the ajax request. This seems to be working properly, although the first time the page loads this script is never called. So that might be the issue, the JS creates the object but the php data is not called till I press preview. When I press preview it calls admin-ajax.php and then the block works.

Is this something you know how to fix?

Also maybe we should reopen this issue till it's actually been resolved :P

elliotcondon commented 5 years ago

Hi @Toxyc

Thanks for the reply. Can you please provide all code required to replicate the issue?

I'll set this up locally and replicate the issue.

kkalvaa commented 5 years ago

I had the same issue, but I managed to find a fix when you said it was in preview mode without any actual preview.

WP 4.9.9-alpha-43656 Gutenberg 4.2 ACF Pro 5.8Beta-2

I updated ACF Pro to the revised Beta 2 without any luck, however some further digging showed that the blocks where there in preview mode without any actual preview. The problem seems to stem from 4.2 which moved the control menu away from the block and up top left. By adding some paragraph blocks around where I knew the blocks where I could arrow up or down to change the blocks to edit mode and bring them back into view.

Perhaps that could help someone.