Support » Plugin: Location "Nav Menu" for ACF » Plugin not working with latest ACF update

  • Resolved dmpinder

    (@dmpinder)


    Hi there,

    The plugin seems to be causing a fatal error when the latest ACF Pro (5.6.0) is active:

    2017/07/25 08:09:41 [error] 5901#5901: *54807 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot declare class acf_location_nav_menu, because the name is already in use in /home/forge/domain.co.uk/default/public/content/plugins/location-nav-menu-for-acf/acf_location_nav_menu.php on line 0" while reading response header from upstream, client: 86.186.80.127, server: domain.co.uk, request: "GET /wp/wp-admin/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "domain.co.uk"

    Disabling the plugin fixes the site. Using ACF Pro 5.5.14 also works.

    Many thanks!

    Darren

Viewing 6 replies - 1 through 6 (of 6 total)
  • The issue is in the acf_location_nav_menu.php file. Rename line 8 to

    class acf_location_nav_menu_class extends acf_location

    and line 244 to

    new acf_location_nav_menu_class();

    *For some reason the newest version of ACF is using the acf_location_nav_menu so the name in this plugin has to be updated. The plugin author will have to make an update to the plugin or this fix will be overwritten via future updates.

    • This reply was modified 4 years, 2 months ago by Lucas Cobb. Reason: missformatted code
    Thread Starter dmpinder

    (@dmpinder)

    Thanks for the reply @lucascobb, I’ll test this fix and report back if there are issues.

    Do you know if the plugin author checks the support forum, and is likely to see this bugfix?

    Not a problem at all @dmpinder.

    I’ve seen the plugin author reply to other threads on this board so I’m certain they will implement this fix or a similar fix quickly.

    Thread Starter dmpinder

    (@dmpinder)

    Just checked and it appears ACF Pro has implemented similar functionality and used the same classname, so the simplest solution would be to use ACF Pro on its own in future.

    Thanks for your help!

    thank you @lucascobb your fix is working.

    Also interested to know when the plugin is updated to fix this issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin not working with latest ACF update’ is closed to new replies.