Support

Account

Home Forums Bug Reports Gallery clone field bug

Helping

Gallery clone field bug

  • Hello.
    I’m encountering a strange behaviour using a Gallery Field and a Clone Field of that gallery.

    I’m using WP 4.8, fresh installation on a new DB, default theme (twentyseventeen) and only ACF PRO v5.6.0 installed. Everything is pristine, brand-new and updated. I haven’t edit functions.php.

    I’ve created 2 pages: TEST1 and TEST2.
    I’ve create 2 fields group: FIELDS1 (linked to page TEST1) and FIELDS2 (linked to page TEST2).
    Inside the first field group (FIELDS1) I’ve created a Gallery field named “my_gallery” (without the quotes).
    Inside the second field group (FIELDS2) I’ve create a Clone field also named “my_gallery” (without the quotes) that clones “my_gallery” from the other field group (FIELDS1).

    If I edit the page TEST1 (using WP backend) the gallery fields works correctly: I can upload images and after saving I can see them in this Gallery field.
    Unfortunately TEST2 (the page with the cloned field) doesn’t seem to work. I can see the empty gallery field, then I choose/upload some files but after saving this page the cloned gallery field is empty.

    Inside page.php I’ve written:
    print_r(get_field('my_gallery'));

    TEST1, using the original Gallery field “my_gallery”, outputs correctly:
    Array ( [0] => Array ( [ID] => 10 [id] => 10 [title] => 1 [filename] => 1.png [url] => http://.....)

    TEST2, using the clone field “my_gallery”, outputs:
    Array ( [my_gallery] => )

    This last array is empty.

    Why doesn’t the cloned gallery store the chosen image? Am I doing something wrong?

    Thanks so much

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.