Support

Account

Home Forums Add-ons Gallery Field gallery.php interferes with files of the same name

Unread

gallery.php interferes with files of the same name

  • Just thought I’d post a quick note on something I discovered in the gallery plugin for ACF.

    In my setup I have a gallery.php that I serve compiled JSON data from (in a directory from within my theme — it’s a custom php that loads the WordPress core)

    I noticed when I activated the Gallery add-on for ACF, something weird started happening that errored out my scripts.

    I realised on testing that it was down to ACF invoking my gallery.php file, which by the looks is because the plugin itself is loading its own gallery.php file and the way the plugin is setup it seems wires get crossed and it inadvertently used my file vs the one contained within the plugin.

    Anyway, once I realised, in my case all I needed to do was to rename my gallery.php to something else and that resolved the issue, but I just thought I should highlight it here!

    TL;DR having a file in the theme called gallery.php results in that file attempting to be used by the plugin, causing unexpected results, even though it’s in a different location.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.