Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest WP and ACF #11

Open
ermincelikovic opened this issue Aug 16, 2022 · 3 comments
Open

Latest WP and ACF #11

ermincelikovic opened this issue Aug 16, 2022 · 3 comments

Comments

@ermincelikovic
Copy link

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?

@yosefeliezrie-futurecorp

@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.

@mcguffin
Copy link
Owner

@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 :)

@ermincelikovic
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants