layers-wp / layerswp

Layers WordPress theme by Obox
http://www.layerswp.com
Other
23 stars 10 forks source link

Advanced Custom Fields & WP 4.7+ & Layers #400

Open BobIMG opened 7 years ago

BobIMG commented 7 years ago

Since WP 4.7, Advanced Custom Fields does not play well with Layers. When we try to update site to 4.7 we are unable to edit the ACF fields. Saving a newly created field (or editing an existing field) causes everything to disappear on the back end and the front end of the site. We are only seeing this behavior with Layers ... not with other themes. This nasty bug has us stuck with a slew of sites on older versions of WP and unable to update. Hopefully, this can be addressed on the newest version of Layers when it releases.

vailjoy commented 7 years ago

Hi there! We currently use ACF and WP 4.7 on Layers here without issue: http://docs.layerswp.com Please troublehsoot conflicts by deactivating other plugins you may be running temporarily, and if using a child theme you may need to make code changes to accomodate the new ACF version

BobIMG commented 7 years ago

We have done some more testing on this issue to help narrow the variables. Despite my earlier comments ... this is not a WP Core conflict. Apologies!

In two test sites, we removed all Plugins with the exception of ACF Version 4.4.11 (the latest version).

When using and older version of Layers (1.5.6) everything worked as designed. BUT, if we used the latest version of Layers (1.6.5) whenever we try to adjust fields in ACF and click SAVE all of the fields are deleted. Here is a video of the behavior:

https://www.dropbox.com/s/9ivef51f1eofl8p/ACF-Layers-WP.webm?dl=0

BobIMG commented 7 years ago

I reached out to ACF regarding this issue. They did some testing and Elliot reported this Layers bug that is causing the issue (see his email below):

I've done some local testing with the 'layers' theme and found the issue. When this theme is active, the 'save_post' action is triggered multiple times during a 'post publish action'.

I'm attaching 2 screenshots to demonstrate the issue.

screen shot 2017-03-31 at 1 35 51 pm screen shot 2017-03-31 at 1 36 12 pm
BobIMG commented 7 years ago

Hi Team. We just ran a test on the most recent version of Layers 2.0.4 and can report that simply hitting SAVE on ACF's still deleted all saved fields. This nasty bug is still ever-present. We hope that it will get solved soon.

marcperel commented 7 years ago

Thanks @BobIMG for the field-testing, we'll have to check into this and see what solution we can come up with.

dcolumbus commented 6 years ago

The customizer won't work at all with ACF activated. If I try and access it, I'm just redirected back to the page I was on. This is a huge issue because without ACF, Layers becomes worthless to us.

marcperel commented 6 years ago

@BobIMG @dcolumbus I'm running a site on Layers 2.0.5 and ACF 4.4.11. Both issues do not seem to be an issue for me:

WordPress typically runs the save_post function twice, that's expected behaviour (I've had this problem when I developed the original Obox Themes).

Can you report on what versions you're running? WP, LayersWP& ACF?

Thanks

BobIMG commented 6 years ago

@marcperel Thank you Marc or weighing in. I am not seeing the issue @dcolumbus is seeing, but I still seeing the issue we've discussed with ACF deleting fields as soon as we hit save while having Layers installed. I'd love to be wrong about this, but as you can see in this video I just took, we're running:

VIDEO: https://www.dropbox.com/s/h8garaqai2d060m/Layers-ACF-Bug-Git.webm?dl=0

Please help me to understand what is different about your and my setup that could be causing this nasty bug.

dcolumbus commented 6 years ago

WordPress: 4.8.2 Layers Theme: 2.0.1 Layers Pro: 2.0.1 ACF: 5.6.3

Specifically the "Edit Your Page" button within the Pages edit screen, all this button does it execute the update. You can actually see the "Update" button fire ...