acf-customizer icon indicating copy to clipboard operation
acf-customizer copied to clipboard

Latest WP and ACF

Open ermincelikovic opened this issue 3 years ago • 3 comments

I'm not sure on which version exactly it stopped working, but it seems like Customizer is not showing up in the Field Group location rules any longer. Does anyone else have this issue?

ermincelikovic avatar Aug 16 '22 16:08 ermincelikovic

@mcguffin Do you have any idea what may be causing this? If you cant update right now but could point me in the right direction I can probably fix it.

@yosefeliezrie-futurecorp Thanks, really appreciated! I just released 0.3.1 adressing a PHP compatibility issue. This might or might not be the cause of your issue. I just tested with ACF Pro 6.0.0, WP 6.0.2 and PHP 8.0 using the 2021 theme. Worked for me...

The ACF Location rule is defined here: https://github.com/mcguffin/acf-customizer/blob/master/include/ACFCustomizer/Compat/ACF/Location/Customizer.php

… and registered during the acf/include_location_rules hook: https://github.com/mcguffin/acf-customizer/blob/master/include/ACFCustomizer/Compat/ACF/ACF.php#L35 https://github.com/mcguffin/acf-customizer/blob/master/include/ACFCustomizer/Compat/ACF/ACF.php#L140-L145

It's all very ACFish, so I don't really know where to look further. Possibly acf/include_location_rules has already been fired during plugin init. This could happen in a theme-bundled plugin.

You can start a testing mode by appending include_once __DIR__ . DIRECTORY_SEPARATOR . 'test/test.php'; to index.php (in a cloned repo) You should see some additional panels in customizer then … grafik

... and a few new customizer locations: grafik

On a linuxoid system like macos or ubuntu you can start testing (and realtime-compile assets) through npm. Clone the repo, into wp-content/plugins/, activate the plugin, run npm install and npm run dev-test in the plugin dir. Hitting ^C will stop the testing mode.

Happy Bug hunting :)

mcguffin avatar Sep 28 '22 11:09 mcguffin

@yosefeliezrie-futurecorp I don't wanna stress you out - I was just wondering if you managed to solve it for yourself? :)

ermincelikovic avatar Oct 12 '22 15:10 ermincelikovic