I can’t click on the image with URL on the frontend.
https://ibb.co/zHY0Jjr
Hey there!, I have the ACF Photo gallery field embedded in an ACF Form. Since a while there is no way to add images on the frontend of the website within the form. By clicking the ” Add images” button, nothing happens. Any ideas? Thanks a lot!
]]>Hello,
I have tried your plugin but for different reasons, decided to uninstall it and use ACF pro.
I have problems with the ACF gallery + Elementor carousel. It is not displaying frontend.
Is your plugin making any change to the core of WordPress and/or Elementor that we should be aware of?
Thank you in advance for your reply.
]]>Following error crashes both Gutenberg editor and Elementor Gallery in frontend.
Fatal error: Uncaught Error: array_keys(): Argument #1 ($array) must be of type array, null given
in?/var/www/vhosts/leader.lu/httpdocs/web/wp-content/plugins/navz-photo-gallery/includes/acf_photo_gallery.php?on line?26
I fixed it by adding following condition :
if ( $meta_data['sizes'] && is_array($meta_data['sizes']) ) {
foreach (array_keys($meta_data['sizes']) as $size) {
$meta_data['sizes'][$size]['source_url'] = wp_get_attachment_image_url($image->ID, $size);
}
}
It only happened on one post for me. Gallery contains 2 JPG images. Please let me know if you want me to enquire further.
I’d like to help improve this plugin because I think it is pretty damn cool.
]]>Hi. I am really enjoying using this plugin. I am not so familiar with code therefore I used elementor dynamic tags to insert the ACF photo gallery. It worked well but when I started deleting images it is not updating on the front page. I think this may be because the dynamic tag is set to “post image attachments” instead of ACF. But there is no ACF in the dropdown. Please advise me. Thank you!
]]>I want to know if we can export the data of this field from one website to another website.
]]>Title is self explanatory. When trying to configure graphQL in ACF’s “Edit Field Group” it shows only:
“Not supported in the GraphQL Schema
The “photo_gallery” Field Type is not set up to map to the GraphQL Schema. If you want to query this field type in the Schema, visit our guide for?adding GraphQL support for additional ACF field types.”
The mentioned guide link is broken and doesnt take me anywhere
Is there a way to do this?
]]>Am I correct for thinking theres’s no support for ACF taxonomy’s? I have a gallery I want to show in my Woocommerce product categories. But it doesn’t save. I guess that’s because only pages are supported?
]]>Thank you for the great plugin. I would also need to have a gif file in gallery, but unfortunately, the gif file is not animating after adding to gallery.
Are gif file supported? Or will be?
Thank you
“Url” and “open in new tab” fields do not save.
version: 2.9
Reason: assets/js/acf-photo-gallery-field.js (lines 161-167):
var form = $(this).serializeArray();
...form.push({name: "acf_field_name", value: acf.getField(form.acf_field_key).data.name});
serializeArray()
creates indexed, not associative array, so form
array does not have acf_field_key
property, form.acf_field_key
is undefined,acf_field_name
field in ajax request gets incorrect value and url/target saves incorrectly.
Possible fix:
replace lines 161-167 with:
var form = $(this).serializeArray();
var post_id = acf.get('post_id');
var attachment_id = form.find(x => x.name === "attachment_id")?.value;
var acf_field_name=acf.getField(form.find(x => x.name === "acf_field_key")?.value).data.name; //change
form.push({name: "action", value: "acf_photo_gallery_edit_save"});
form.push({name: "post_id", value: post_id});
form.push({name: "nonce", value: apgf_nonce});
form.push({name: "acf_field_name", value: acf_field_name}); //change
Hello.
Has anyone used this plugin with Bricks Builder?
I want to use the ACF Photo Gallery to feed images to the Nestable Slider element. I am new to bricks but the query loop system is pretty powerful so I am sure there is a way, however I have not found it (yet…)
Any tips?
Hi, Navneil.
I get the following error in my server logs, and the error is constant:
2024/02/15 21:11:07 [error] 85256#85256: *56083 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “nonce” in /www/example_424/public/wp-content/plugins/navz-photo-gallery/includes/acf_photo_gallery.php on line 52″ while reading response header from upstream, client: 11.11.111.11, server: https://www.example.co.uk, request: “GET /wp-admin/admin-ajax.php?action=apgf_update_donation HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php8.1-fpm-example.sock:”, host: “www.example.co.uk:64187”, referrer: “https://www.example.co.uk/wp-admin/users.php?delete_count=2&update=del”
(Please note the real website address and IP have been redacted.)
There is no fatal error, but it would be good to resolve this if possible.
I’ve also tested with PHP 8.2, and the issue still occurs.
Thank you, and I hope this information is helpful.
Best wishes,
Simon
I know alot of people are not able to get the plugin ACF Photo Gallery Field – work including me, for uploading images at the backend.
I found a solution and its only for sometime till updates by author, simple javascript code editing – hope the author of the plugin takes this into consideration – for today and we us as community can contribute and live by it forever.
Current live site: – https://coolstufftobuyinc.com
WordPress – WordPress Version 6.4.3
Active plugins :-
ACF Photo Gallery Field – Version 2.5
Advanced Custom Fields – Version 6.2.5
WordPress jQuery v3.7.1
Problem :-
/wp-content/plugins/navz-photo-gallery/assets/js/acf-photo-gallery-field.js
Console error :-
acf-photo-gallery-field.js?ver=2.5:104 Uncaught TypeError: Class constructor xn cannot be invoked without ‘new’
at HTMLButtonElement. (acf-photo-gallery-field.js?ver=2.5:104:25)
at HTMLDocument.dispatch (jquery.min.js?ver=3.7.1:2:40035)
at v.handle (jquery.min.js?ver=3.7.1:2:38006)
Solution:-
EDIT the file
/wp-content/plugins/navz-photo-gallery/assets/js/acf-photo-gallery-field.js
Author Code – Line 103 to 141 to be changed –
if(typeof apgf_show_donation !== 'undefined' && apgf_show_donation){
swal({
title: 'Donation!',
html: 'I apologize for the inconvenience, but the ACF Photo Gallery Field plugin is requesting donations to enhance the future development of this plugin.<br/><br/>Would you like to donate?',
type: 'question',
confirmButtonText: 'Submit',
showCancelButton: true,
showCloseButton: true,
input: 'select',
inputOptions: {
"yes": "Yes, I want to donate",
"already": "I have already donated",
"later": "Maybe later",
"no": "No"
}
}).then((result) => {
if (result.value === 'yes') {
window.open("https://www.buymeacoffee.com/navzme", "_blank");
apgf_open_media_lib();
} else {
$.ajax({
method: "GET",
url: acf.get('ajaxurl'),
data: {
action: "apgf_update_donation",
option: result.value
}
});
apgf_open_media_lib();
}
});
} else {
apgf_open_media_lib();
}
return false;
});
}
};
}
Code to change :-
if(typeof apgf_show_donation !== 'undefined' && apgf_show_donation){
Swal.fire({
title: 'Donation!',
html: 'I apologize for the inconvenience, but the ACF Photo Gallery Field plugin is requesting donations to enhance the future development of this plugin.
Would you like to donate?',
type: 'question',
confirmButtonText: 'Submit',
showCancelButton: true,
showCloseButton: true,
input: 'select',
inputOptions: {
"yes": "Yes, I want to donate",
"already": "I have already donated",
"later": "Maybe later",
"no": "No"
}
}).then((result) => {
if (result.value === 'yes') {
window.open("https://www.buymeacoffee.com/navzme", "_blank");
apgf_open_media_lib();
} else {
$.ajax({
method: "GET",
url: acf.get('ajaxurl'),
data: {
action: "apgf_update_donation",
option: result.value
}
});
apgf_open_media_lib();
}
});
} else {
apgf_open_media_lib();
}
return false;
});
}
};
}
The only change as off now is to edit :-
swal({
title: 'Donation!',
html: 'I apologize for the inconvenience, but the ACF Photo Gallery Field plugin is requesting donations to enhance the future development of this plugin.<br/><br/>Would you like to donate?',
type: 'question',
confirmButtonText: 'Submit',
showCancelButton: true,
showCloseButton: true,
input: 'select',
inputOptions: {
"yes": "Yes, I want to donate",
"already": "I have already donated",
"later": "Maybe later",
"no": "No"
}
To the following: –
Swal.fire({
title: 'Donation!',
html: 'I apologize for the inconvenience, but the ACF Photo Gallery Field plugin is requesting donations to enhance the future development of this plugin.<br/><br/>Would you like to donate?',
type: 'question',
confirmButtonText: 'Submit',
showCancelButton: true,
showCloseButton: true,
input: 'select',
inputOptions: {
"yes": "Yes, I want to donate",
"already": "I have already donated",
"later": "Maybe later",
"no": "No"
}
Line 104 to 117.
swal({
to
Swal.fire({
It will work.
Live website post :- https://coolstufftobuyinc.com/est-18-in-1-ultimate-multi-tool-shovel/
Cheers.
Sg
]]>Patchstack is reporting a vulnerability with the plugin:
WordPress ACF Photo Gallery Field plugin <= 2.5 – Broken Access Control vulnerability
https://patchstack.com/database/vulnerability/navz-photo-gallery/wordpress-acf-photo-gallery-field-plugin-2-5-broken-access-control-vulnerability?_a_id=431
Can you please share your ETA for a fix?
Thanks!
PTaubman
]]>When I click on Add Image button, console error seems like “Class constructor wn cannot be invoked without ‘new'”. Pls help
]]>Hi, tip for development – see inspiration https://jeroensormani.com/how-to-include-the-wordpress-media-selector-in-your-plugin/ ??
]]>Hi everybody!
I’ve got WordPress 6.4.1 and ACF Photo Gallery Field 2.5, Advanced Custom Fields 6.2.4 . I’ve created a “Photo gallery” field, but when I try to upload an external image,nothing happens
The error that I see in the Chrome console is this:
https://….com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.telegraph.co.uk%2Fcontent%2Fdam%2FTravel%2FDestinations%2FEurope%2FSpain%2FIbiza%2FCala-Conta-ibiza-beaches.jpg 404 (Not Found)
And If I open the link, I’ve got this error:
{“code”:”rest_forbidden”,”message”:”You do not have permission to make oEmbed requests via proxy.”,”data”:{“status”:401}}
What I’m wrong?
]]>I’m using this plugin on a website together with Ninja Forms. I have a recaptcha v2 installed, but every time I load the page, the recaptcha puzzle is shown. When I disable the ACF Photo Gallery Field plugin, this problem does not occur.
]]>I noticed yesterday that the ‘add images’ button wasn’t working. I have installed the latest Version 2.5.
Note that previously added galleries are showing up just fine, with no error. I just can’t add new ones. Screenshot: https://tinyurl.com/yp8r8k3w
]]>Elementor 3.16 seems to break functionality with dynamic tags. Elementor can’t see this plugin as an option in dynamic tags, all it sees is the default “ACF Gallery Field” not “ACF Photo Gallery”.
]]>Just realized I had alt text that was pulling from the title in the media library. I checked out the docs to find a quick solution and it looks like a roundabout way of creating your own alt text instead of using the media library. Been using this plugin for awhile before I purchased ACF pro and thought I would give someone help on grabbing alt text quickly in the loop.
Just need this code:
where $id equals image id
$alt = get_post_meta($id, ‘_wp_attachment_image_alt’, TRUE);
alt=”‘ . $alt . ‘”
Hi
I’m using Frontend Admin by DynamiApps to create a frontend form. When I use the gallery field it’s not even opening in frontend.
]]>PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /nas/content/live/laundryladistg/wp-content/plugins/navz-photo-gallery/includes/render_field.php:45#012Stack trace:#012#0 /nas/content/live/laundryladistg/wp-content/plugins/navz-photo-gallery/includes/render_field.php(45): explode(‘,’, Array)#012#1 /nas/content/live/laundryladistg/wp-content/plugins/navz-photo-gallery/fields/acf-photo_gallery-v5.php(85): include(‘/nas/content/li…’)#012#2 /nas/content/live/laundryladistg/wp-includes/class-wp-hook.php(308): acf_field_photo_gallery->render_field(Array)#012#3 /nas/content/live/laundryladistg/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)#012#4 /nas/content/live/laundryladistg/wp-includes/plugin.php(565): WP_Hook->do_action(Array)#012#5 /nas/content/live/laundryladistg/wp-content/plugins/advanced-custom-fields/includes/acf-hook-functions.php(113): do_action_ref_array(‘acf/render_fiel…’, Array)#012#6 /nas/content/live/laundryladistg/wp-includes/class-wp-hook.php(308): _acf_apply_hook_variations(Array)#012#7 /nas/content/live/laundryladistg/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)#012#8 /nas/content/live/laundryladistg/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#9 /nas/content/live/laundryladistg/wp-content/plugins/advanced-custom-fields/includes/acf-field-functions.php(807): do_action(‘acf/render_fiel…’, Array)#012#10 /nas/content/live/laundryladistg/wp-content/plugins/advanced-custom-fields/includes/acf-field-functions.php(763): acf_render_field(Array)#012#11 /nas/content/live/laundryladistg/wp-content/plugins/advanced-custom-fields/includes/acf-field-functions.php(616): acf_render_field_wrap(Array, ‘div’, ‘label’)#012#12 /nas/content/live/laundryladistg/wp-content/plugins/advanced-custom-fields/includes/forms/form-post.php(224): acf_render_fields(Array, 250, ‘div’, ‘label’)#012#13 /nas/content/live/laundryladistg/wp-admin/includes/template.php(1445): ACF_Form_Post->render_meta_box(Object(WP_Post), Array)#012#14 /nas/content/live/laundryladistg/wp-admin/edit-form-advanced.php(688): do_meta_boxes(Object(WP_Screen), ‘normal’, Object(WP_Post))#012#15 /nas/content/live/laundryladistg/wp-admin/post.php(206): require(‘/nas/content/li…’)#012#16 {main}#012 thrown in /nas/content/live/laundryladistg/wp-content/plugins/navz-photo-gallery/includes/render_field.php on line 45
]]>Hi There!
First of all: Amazing plugin! Very helpful, when working on no-budget websites where ACF Pro is not an option.
Currently I have an issue with the rest api. For whatever reason I can see default acf fields in my GET request of a custom post type, but the photo_gallery field is missing completely. I can see that the IDs of the images selected on a test post are written to the database, but they won’t be shown in the rest api (/wp-json/wp/v2/reference) where reference is the name of my custom post type.
]]>Hello Support,
I am facing following error in my site:
-------------------------------------------------------------------------
In this case, WordPress caught an error with one of your plugins, ACF Photo Gallery Field.
Error Details
=============
An error of type E_ERROR was caused in line 102 of the file /home/u671143295/domains/solarsyncindia.com/public_html/wp-content/plugins/navz-photo-gallery/navz-photo-gallery.php. Error message: Uncaught Error: Call to undefined function acf_get_field_groups() in /home/u671143295/domains/solarsyncindia.com/public_html/wp-content/plugins/navz-photo-gallery/navz-photo-gallery.php:102
Stack trace:
#0 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/class-wp-hook.php(308): acf_plugin_photo_gallery->rest_prepare_post()
#1 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(2010): apply_filters()
#3 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569): WP_REST_Posts_Controller->prepare_item_for_response()
#4 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(1181): WP_REST_Posts_Controller->get_item()
#5 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request()
#6 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api.php(535): WP_REST_Server->dispatch()
#7 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/rest-api.php(2889): rest_do_request()
#8 [internal function]: rest_preload_api_request()
#9 /home/u671143295/domains/solarsyncindia.com/public_html/wp-includes/block-editor.php(634): array_reduce()
#10 /home/u671143295/domains/solarsyncindia.com/public_html/wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload()
#11 /home/u671143295/domains/solarsyncindia.com/public_html/wp-admin/post.php(187): require('/home/u67114329...')
#12 {main}
thrown
-------------------------------------------------------------------------
Please check and let me know how this can be solved.
Thanks
]]>
I am trying to resize the images to 1000px width without changing the height and keep the proportions.
In the Aqua resizer docs it says you can only give a width without height. But if i am doing this:
$resize_image_url = acf_photo_gallery_resize_image($full_image_url, 1000)
i get images that are 1000px wide and 150px in height.
When configuring a new photo gallery field, or editing an existing one, I’m seeing several PHP warnings similar to this:
Warning: Undefined array key “fields[my_gallery” in \wp-content\plugins\navz-photo-gallery\includes\v5\render_field_settings.php on line 17
Warning: Trying to access array offset on value of type null in \wp-content\plugins\navz-photo-gallery\includes\v5\render_field_settings.php on line 23
This is the case across several sites using the plugin. It looks like ACF 6 has made some changes to the way settings fields are handled: https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/#upgrade-existing-field-settings
It doesn’t seem to affect functionality of the settings for the fields, so it’s not really an issue on production sites with error reporting turned off, but it may be a good idea to take a look before future changes make it a problem.
]]>Hello,
I’m trying to get the plugin to work, I added a gallery and filled it with pictures but when trying to display it in the front end all I get is an empty array.
Here is the code I’m using to retreive the pictures:
? <?php
? ? $id = get_the_ID();
? ? $images = acf_photo_gallery('gallerie_photo', $id);
? ? if( count($images) ):
? ? ? ? foreach($images as $image):
? ? ? ? ? ? $full_image_url= $image['full_image_url'];
? ? ? ? ? ? ?>
? ? ? ? ? ? <li class="splide__slide " >
? ? ? ? ? ? ? ? <img src="<?php echo $full_image_url; ?>" alt="photos <?php the_title(); ?>" class="imgSlideLoc">
? ? ? ? ? ? </li>
? ? <?php endforeach; endif;
? ? ?>
I verified I’m getting the id correctly. Any idea on what I’m doing wrong ?
]]>Hey,
I discovered this issue, where the backdrop stays after I try to close the editing Window (closing the dialog with the “x” in the top right or adding an image to the gallery) when the Edit modal is set to “Native”. This is a bit annoying, since I have to refresh the browser window to be able to interact with the backend again. When the Edit modal is set to “Default”, the backdrop behaves as expected and closes with the dialog window.
The backdrop has the class of “acf-gallery-backdrop”. I am using Version 1.8.0 of your Plugin, version 6.0.7 of ACF and version 6.1.1 of WordPress. Tested on Firefox, Edge and Chrome.
]]>How to put links to different urls in gallery images?
]]>