I too have a very slow edit page. However, I am NOT using repeater plugin on this page. I am using the flexible content though. Also, it gets worse and worse the more flexible content I add.
BTW, I do have the repeater plugin installed. Also, i’m on WordPress 3.8
/* After a little bit of debugging in Chrome code inspector */
Looks like there is a bunch of Garbage Collection that occurs during my 7 second freeze. Here is a screenshot: https://www.dropbox.com/s/43esgobg2jmzquq/Screenshot%202014-02-25%2009.29.37.png
Here is the timeline output for the event:
https://dl.dropboxusercontent.com/u/643924/TimelineRawData-20140225T092639.json
So what I did was click on “add new layout” for my flexible content, then choose one from the list and then it freezes. I also get lags in scrolling and just general stuff. Anything else I can do to help,just let me know.
I do have the latest versions:
ACF Version 4.3.4
ACF Repeater Field Version 1.1.1
Wordpress Version 3.8.1
I replicated my setup and I think I found the issue. I actually have conditional logic in the tabs that triggers from the checkbox field above. It is somehow affecting the whole issue.
See here: http://www.screenr.com/eQNN
Are you running latest versions of WordPress, ACF and ACF Repeater?
I did a short screencast replicating your setup, in Chrome: https://cloudup.com/i40qPzswRh1
Thanks for the response @matiasvad
However, I’ve tested this on both Chrome and Firefox but the issue still persists.
Here’s a Screenr I made: http://www.screenr.com/fQNN
If you notice in the video, the custom fields are located in the User’s profile. I don’t know if it is related to the issue.
Is it still a problem in ACF 4.3.4?
One of the bugs fixed in the new version reads:
“Post Object field: Fixed get_pages bug cuasing ‘pages’ to not appear”
ACF doesn’t save data about the Field Group, only fields inside of it.
Read on for a solution that you could use (Stack Overflow), and a statement from Elliot
Thank you @elliot for the quick reply.
Before the update to acf or wp the prepend would display on the front end. E.g. If I had “Title: ” in the prepend and “WordPress 101” in the input field. The front end would display “Title: WordPress 101”.
The displaying of the prepend of the input field is no longer happening. The “Title: ” is not displaying on the front end, just the value put in the field input.
Thanks Elliot.

Hi @uakz
Creating a checkbox input is very similar to creating a radio input. Please checkout some online tutorials to learn more about this.
I would love to help, but this question is far from a support issue, so I am unable to pride any support for this.
Good luck creating your custom page, and please feel free to ask any specific ACF related questions.
Thanks
E

Hi @bjtalbot
I’m not sure if this will work, but I have a feeling that WP replaces the curly quotes when you output the content like so the_content().
If this is true (most likely), then you can get WP to format your custom field in the same way like this:
$value = get_field('field_name');
echo apply_filters('the_content', $value);
let me know if that works.
Thanks
E

Hi @phil.owen
Please review the docs here: http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
You can see that a value does not have to be exact, you can compare EXISTS which I believe will help you out.
Thanks
E

Thanks for the attachment.
Yes, the issue is definitely related to the size of the flexible content field.
The current ACF data architecture does not allow for such massive field sizes, so I am unable to help fix this issue in ACF4.
In ACF5, this will no longer be an issue, as each sub field is saved as a unique entry to the DB. This will prevent the flexible content field from becoming so big that it can’t save.
Sorry to not provide a solution as yet, but please wait for v5 to use a flexible content field at this size.
perhaps a temporary solution is to increase your server’s max_vars setting + PHP memory – http://www.advancedcustomfields.com/faq/limit-number-fields/
Thanks
E

Hi @Kevin
Perhaps the issue is that you are running a version of WP that ACF does not support.
ACF requires at lease WP 3.5 or later, and you are using 3.4.2
Can you please update WP. I believe this will fix the issue.
Thanks
E
I kinda figured this out. I added a new True/False custom field to my ‘speakers’ custom post type. Now if the box is checked, then that speaker shows up (in a separate page template for Workshop speakers). I added this to my loop:
'meta_query' => array(
array (
'key' => 'is_workshop_speaker',
'value' => '1',
'compare' => '=='
)
)
Now, only the True/False (checked) speakers are showing on my ‘Workshop Speakers‘ page which is perfect but those that are checked are still showing on my ‘Conference Speakers‘ page as well. Now my question is, how to exclude those that are checked as Workshop Speaker from my Conference Speakers page?
Thanks
Hi Elliot,
Sorry for the confusion. I was trying to say that I think the the wp object error was related to the fact that the field (in our case) never finished processing. I concluded this based on the fact that we were seeing the same result before and after the wp object fix you implemented. Once I limited the scope of the posts that field was trying to query against I wasn’t getting the wp object error and the rest of the edit page was being processed appropriately.
Hi,
yes, I’m ok, this was more of a bug-report. I think the best solution would be to filter out these characters on the automatic js filling of the field (where you lowercase, replace spaces etc.). I would never intentionally use foreign characters in a field name, but when I’m filling the fields quickly I don’t always remember to check the generated field name.
I have a script for my cms that does it while preserving the most common european characters – I’m attaching it.
Thanks for your help!
Jure

Hi @Vasili
Can you please remove any variables from the equation completely?
You can do this by harcoding the $post_id parameter of the get_field function like so:
$value = get_field('field_name', 123);
Where 123 is the post ID where you want to load the data from.
If ACF can’t load data like this, then the chosen post does NOT contain the data you expect and you will need to double check all your field names / post ID’s are correct.
Thanks
E

Hi @cinq75
This is getting quite advanced and I am unable to provide support for this custom query.
Please debug the SQL which is being generated by your WP_Query object. This will show you where any SQL logic errors are occurring.
Thanks
E

Hi @phil.owen
Your meta_query arrays are missing the value piece
Thanks
E

Hi @tarun5585
Thanks for the info.
The above is quite complicated and you will have to code this by hand.
It is possible to hook in and modify a select field’s choices. This means you CAN modify the ‘cat’ sub field to reflect all the categories added on the chosen hotel.
Please look into the acf/load_field filter (see docs) to learn how this is possible. There is also a tutorial (on the docs) that explains how to modify a select field’s choices.
If you want, you can take it a step further and write some jQuery that listens to a change on the hotel select, and then updates the sub fields via AJAX.
I won’t be able to provide any code / help with the above as it is far to custom for this free support forum.
Good luck with the docs,
Thanks
E

Hi @jasonlosito
Querying sub field values requires a little more code:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/#example-5
Please take note of the extra filter needed.
Thanks
E

Hi @physalis
Sorry mate, the above will require quite a lot of time to demonstrate the PHP needed to accomplish the task. Perhaps you could hire a web developer and brief them on the task?
Thanks
E
Hi Elliot
It does not make a difference, the function still returns an error.
The echo $post->ID; returns an ID of the current single post i’m viewing.
I had and idea of making a field, true/false maybe, and assign it to post edit page with location rule. As soon as the post is selected in the Relationship field and page is updated, this true/false is getting the “true” value. Then in the widget, i can use this field in WP_Query as meta_key parameter. The schema looks like this:
Relationship fields in Flexible Content (Page) → True/False field (Post) → Widget.
Do you think something like this is possible using Filters?
I just don’t have another ideas how to sort out the situation.
Thanks again for your help.
Hi I’ve been trying to get run a query from a repeater field with radio buttons in an option page. I’ve tried this code, but no joy:
<?php if(get_field('funders', 'option')): ?>
<?php if(get_sub_field('partner_type', 'option') == 'travel'): { ?>
<h4 class="section-header">Travel Partners</h4>
<?php while(has_sub_field('partner_type', 'option') == 'travel'): ?>
<?php the_sub_field('partner_name'); ?>
<?php endwhile; ?>
<?php } endif; ?>
<?php endif;?>
I’m not exactly sure how to run this query any hints are welcome.
Thanks
And one more question. If i do it like this:
$agency = get_field('agency');
How can I display it’s value?
Quite right, thanks for having a look at the code for me.
I modified it to use traditional syntax : rather than {} and added the endforeach but it was still limiting to current month only.
I modified the loop to output month and one entry, and then kept the else statement the same. It not outputs month name, and all entries in chronological order. I’m not 100% sure this is the best way to achieve this, but it appears to work on the front end and doesn’t throw and php errors on the back end.
Code:
<?php
$repeater = get_field('races');
foreach( $repeater as $key => $row ) :
$column_id[ $key ] = $row['race_date'];
endforeach;
array_multisort( $column_id, SORT_ASC, $repeater );
$currMonth = "start";
foreach( $repeater as $row ) :
$date = DateTime::createFromFormat('Ymd', $row['race_date']);
if ($currMonth != $date->format('F'))
:
echo '<tr class="month"><td><h2>' . $date->format('F') . '</h2></td></tr><br>';
$currMonth = $date->format('F');
echo '<tr class="race">';
echo '<td class="cell">' . $date->format('m/d') . '</td>';
echo '<td class="cell"><h2>' . $row['race_name'] . '</h2></td>';
echo '<td class="cell">' . $row['race_location'] . '</td>';
echo '<td class="cell">' . $row['race_gender'] . '</td>';
echo '</tr>';
else :
echo '<tr class="race">';
echo '<td class="cell">' . $date->format('m/d') . '</td>';
echo '<td class="cell"><h2>' . $row['race_name'] . '</h2></td>';
echo '<td class="cell">' . $row['race_location'] . '</td>';
echo '<td class="cell">' . $row['race_gender'] . '</td>';
echo '</tr>';
endif;
endforeach;
?>
Thanks for starting this thread, super helpful!
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.