http://awesomescreenshot.com/0414sdmva8
still doesn’t work. fields saving not correct
ACF Pro
qTranslate – X
ACF Qtranslate
all plugins are latest version
p.s. Sorry for my english
Also try:
[suhosin]
suhosin.request.max_vars = 1000
suhosin.post.max_vars = 1000
one solution, might be getto but that is to have all fields on all templates that will be using custom fields and just have them display:none.
Then just do some checking with jquery on what page template were are on (#page_template) and also check if it changes and just add display:block on field blocks that should be displayed.
Is this really bad? What would the performance be on the dashboard and the db if having let say 90 fields in total.
I think I have to use update_field();
function update_acf_manually() {
var_dump('update_acf_manually');
$args = array(
'orderby' => array('ID' => 'ASC'),
'post_type' => 'member',
'posts_per_page' => '-1',
);
foreach (get_posts($args) as $post) {
$pm = get_post_meta($post->ID, 'join_date', true);
$Y = substr($pm, 0, 4);
$m = substr($pm, 4, 2);
$d = substr($pm, 6, 2);
if ($Y && $m && $d) {
var_dump("$Y-$m-$d");
$pm = "$Y-$m-$d";
update_field('join_date', $pm, $post->ID);
}
}
}
Can you somehow hook into this
if( typeof acf !== 'undefined' ) {
acf.postbox.render({"id":"acf-group_551acc92f306d","key":"group_551acc92f306d","style":"seamless","edit_url":"http:\/\/themefolder\/wp-admin\/post.php?post=235&action=edit","edit_title":"Edit field group","visibility":false});
}
and give the newly visible fields the jquery i have created perhaps?
Can I have your contact email? I have some questions I would like to ask you about ACF, of course paying the disturbance. Is available?
@randomlines Ah brilliant thanks so much, that second idea is just what I was after. I didn’t realise the google API was quite so helpful and easy to use.
Thanks so much
I edited core code to do this, but a better approach might be to use the saved lat/long to query google and get exactly the components you want.
Just send it through this and it’ll give you JSON:
http://maps.googleapis.com/maps/api/geocode/json?latlng=44.4647452,7.3553838
Looks like there’s a GitHub Issue for this too: https://github.com/elliotcondon/acf/issues/377
I made a pull request here that should fix it: https://github.com/elliotcondon/acf/pull/379
It’s quite a simple fix, so please rally with me to pull the change in! 😀
This issue appears to have been reported already (please upvote!): http://support.advancedcustomfields.com/forums/topic/image-upload-button-disappears-after-the-image-gets-deleted-from-media-library/
GitHub Issue: https://github.com/elliotcondon/acf/issues/377
I made a pull request here that should fix it: https://github.com/elliotcondon/acf/pull/379
This issue appears to have been reported already (please upvote!): http://support.advancedcustomfields.com/forums/topic/image-upload-button-disappears-after-the-image-gets-deleted-from-media-library/
GitHub Issue: https://github.com/elliotcondon/acf/issues/377
I made a pull request here that should fix it: https://github.com/elliotcondon/acf/pull/379
I have the same / or a very similar problem: I have a 9 fields with 10 nested repeaters each, all showing up on a page. The fields started saving ok, but after a while wp-admin would start to come up with issues. I have been able to fend these off with define(‘WP_MAX_MEMORY_LIMIT’, ‘-1’); , and the following php.ini entries:
mysql.connect_timeout = 120
expose_php = Off
max_input_time = 42000
allow_url_fopen=1
max_execution_time = 42000
memory_limit = 256M
max_file_uploads = 256M
file_uploads = On
post_max_size = 256M
upload_max_filesize = 256M
max_input_vars = 50000
max_input_nesting_level = 256
However, there page now seems to have reached another ceiling and no matter what I do, it won’t save changes. It times out after 2 mins and goes to a 404 page(/wp-admin/post.php). MySQL has surprisingly appears to have 282359 wp_postmeta entries, which I thought was quite a lot, and the ACF seems to have stopped saving rows half the way through its last save.
Any clues as to what might be causing this limit? Is it a timeout issue? There doesn’t seem to be a problem with the field character size as it’s not that long.
Could anyone think of a reason?
Ok, this is what I mean.
<div class="tabz">
<?php if( have_rows('employees') ): ?>
<ul class="employees">
<?php $count = 1; ?>
<?php while ( have_rows('employees') ) : the_row(); ?>
<li><a href="#employee-<?php echo $count; ?>" style="background-image: url(<?php the_sub_field('photo'); ?>);"><div class="hover"><?php the_sub_field('title'); ?></div></a><strong><?php the_sub_field('name'); ?></strong></li>
<?php $count++; endwhile; ?>
</ul>
<?php endif; ?>
<?php if( have_rows('employees') ): ?>
<?php $count = 1; ?>
<?php while ( have_rows('employees') ) : the_row(); ?>
<div id="employee-<?php echo $count; ?>" class="employee-bio">
<div class="row">
<figure style="background-image: url(<?php the_sub_field('photo'); ?>);"></figure>
<article>
<h2><?php the_sub_field('name'); ?></h2>
<h3><?php the_sub_field('title'); ?></h3>
<?php the_sub_field('biography'); ?>
</article>
</div>
</div>
<?php $count++; endwhile; ?>
<?php endif; ?>
</div>
I want to run both for every 5 rows
Hi @jgraup
Yes, the function contains a loop which would run when the posts__in arg is supplied (this is used by ACF):
// array of post ids
137 // post_parent__in & post_parent__not_in since WP 3.6
138 foreach (array('post__in', 'post__not_in', 'post_parent__in', 'post_parent__not_in') as $key) {
139 $arr = array();
140 if (!empty($qv[$key])) {
141 // post__in used by the 2 functions below
142 // useless to filter them as output is already in the right language and would result in performance loss
143 foreach (debug_backtrace() as $trace)
144 if (in_array($trace['function'], array('wp_nav_menu', 'gallery_shortcode')))
145 return;
146
147 foreach ($qv[$key] as $p)
148 $arr[] = ($tr = pll_get_post($p)) ? $tr : $p;
149
150 $qv[$key] = $arr;
151 }
152 }
I’m not sure what the code does exactly, but it looks to modify the id’s.
I would advise that you debug this function by printing out the $qv
varible before and after this loop. This will show what has changed:
Thanks
E
Thanks for the feature request.
This could be easily done by writing a small amount of JS on the page which simply loops through the flexible content layout divs, and triggers a click on the handle if it is open.
You could run this on doc ready, or just in the footer of the page.
Thanks
E
Hi, I’m also having this issue with v4.4.1. Once an image has been deleted from the ACF, there’s no ‘Add Image’ button. From a quick look in the developer tools, the ‘.acf-image-uploader.active .no-image’ class remains set to ‘display: none’ rather than displaying it.
I’m not using WPML so that plugin doesn’t seem to be connected to the issue.
Check this tutorials:
https://www.youtube.com/watch?v=OZK08xdCQpc
https://www.youtube.com/watch?v=75syTKWngbY
Usage two plugins:
https://wordpress.org/plugins/acf-frontend-display/
https://wordpress.org/plugins/forms-actions
Hi,
Any news of this bug?
I need radio button default to none because in my page is used as conditional, and conditional has required field…
I just fixed the issue on ACF 4.4.1 version
acf not defined…
The problem was in loading the scripts in the correct order.
What I’ve done is:
open “wp-content/plugins/advanced-custom-fields/acf.php” and go and comment the lines from 524 to 528 the init of the input.min.js then open “wp-admin/admin-header.php” and right after the <title></title>
include these 2 scripts:
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src='http://yourdomain.com/wp-content/plugins/advanced-custom-fields/js/js/input.min.js'></script>
*move the input.min.js into new js folder into js to not get conflicts:)
save all the changes and you will see you wouldn’t encounter this issue just reload the CPT add new/edit page and there you go.
Hope this will solve everybody’s issue, it’s only temporary once we get an update from @elliot 🙂 hope the 4.4.2 will fix this issue.
Cheers mates.
I just fixed the issue on ACF 4.4.1 version
acf not defined…
The problem was in loading the scripts in the correct order.
What I’ve done is:
open “wp-content/plugins/advanced-custom-fields/acf.php” and go and comment the lines from 524 to 528 the init of the input.min.js then open “wp-admin/admin-header.php” and right after the <title></title>
include these 2 scripts:
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src='http://yourdomain.com/wp-content/plugins/advanced-custom-fields/js/js/input.min.js'></script>
*move the input.min.js into new js folder into js to not get conflicts:)
save all the changes and you will see you wouldn’t encounter this issue just reload the CPT add new/edit page and there you go.
Hope this will solve everybody’s issue, it’s only temporary once we get an update from @elliot 🙂 hope the 4.4.2 will fix this issue.
Cheers mates.
[LONGSHOT…] Here is the file that may be causing the problem. Do you see any quick fixes at first glance?
https://plugins.trac.wordpress.org/browser/polylang/trunk/frontend/frontend-auto-translate.php
I removed any reference to pre_get_posts the best I could. I’ve made my theme able to drop the multilingual plugin I have activated for testing and I believe I found the issue.
ACF 5.2.X is not compatible with PolyLang Version 1.7.2.
Check out polylang/frontend/frontend-auto-translate.php; PLL_Frontend_Auto_Translate->pre_get_posts($query);
https://wordpress.org/plugins/polylang/
@mohamed, I am experiencing an issues as well since the upgrade. By any chance do you have a multilingual plugin installed? I’m using PolyLang and it definetly modifies queries.
Let me know please.
Thanks,
Jesse
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.