Support

Account

Forum Replies Created

  • PROBLEM SOLVED! It was MY code. I missed the “=”. So I hade “max_input_vars 5000” when it should have been “max_input_vars = 5000”

    Plugin is now showing Field limit: 5000 and I a can save the nested repeater.

  • So yesterday, I added the max_input_vars to my .htaccess file. No change. I then contacted my host about adding it to my php.ini file. Which is only accessible via SSH. Something I don’t work in. After much hand holding from my host’s tech support, I was able, through Mac Terminal to get into the php.ini file and change the commented out max_input_vars to uncommented and changed the 1000 to 5000. After all that, the plugin still says the max vars is 1000 and my ACF repeater will not save. Not sure what else to do. Not sure if rebuilding my ACF form in a different way would make a difference. For instance, I could make the parent repeater, not a repeater and instead make each of those individual repeaters. So that their is no nesting. But they are still all on the same page. It might make fewer vars but I think I would still hit 1000 pretty quickly.

  • I installed it. It says the “Field limit: 1000” next to “Deactivate” in the list of plugins. I do not see a way to increase that number via the plugin.

    So this plugin is a warning? Meaning it does not change the max number but lets you know “This isn’t going to work” before submitting and I will need to change that limit elsewhere?

    When I attempt to add another item to my nested repeater with this plugin active I get this warning:

    “This form has too many fields (1017) for the server to accept (max 1000). Data maybe lost if you submit. Are you sure you want to go ahead?”

    I have not clicked OK.

  • That plugin hasn’t been updated in 3 years. Thanks though. I increased the vars in the PHP, but it still is stuck. Increased time limits and just about everything. And, we restarted Apache. No dice. First time since I have been using ACF that this has happened. Running out of ideas. What else would cause the system to stop saving content fields in ACF?

  • Anybody? Thoughts? I am hesitant to build this a different way for fear of it crapping out at 32 entries.

  • The above question is the perfect example of why working till 1:30 in the morning is NOT a good idea. A tired brain does STUPID things. As I was drifting off to sleep it realized since it is in a repeater it is not get_field but get_sub_field. Yeah, DUMB. Anyway disregard this message.

  • By the way, I tried Select and Radio Buttons too. They aren’t working in a repeater either. Baffled by this. I have done this before for other projects without issue.

  • When I put define('WP_DEBUG', true); in wp-config.php. And have this in my functions.php file:

    function my_acf_load_value( $rows ) {
    	foreach ( $rows as $key => $row ) {
    		$column_id[ $key ] = $row[ 'field_593c04d244712' ];
    	}
    	array_multisort( $column_id, SORT_ASC, $rows );
    	return $rows;
    }

    I get the following errors on the front end:

    Warning: Invalid argument supplied for foreach() in functions.php on line 110
    
    Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in functions.php on line 113

    Line 110:
    foreach ( $rows as $key => $row ) {

    Line 113:
    array_multisort( $column_id, SORT_ASC, $rows );

    Not sure how to keep this filter functional AND prevent these Warnings. What do I need to do to prevent them?

  • Thanks! That works perfectly!

  • I implemented [email protected] change and it works well. My question is whether ACF will be updated to fix this issue and if this change does anything to hurt Divi’s functionality.

  • ACF needs to turn off the “There’s a new version” so more people don’t install v 5.5.4

  • I am doing so. Unfortunately, I have to do this to many sites. Ugh.

  • I am experiencing this too on ALL sites using ACF. Need a solution, and fast!

  • Sorry I didn’t write that as clearly as I meant to. How do I export a file from a field group?

  • How do I share an export file from a field group? Can I share the files privately?

  • I lose the alt tag info with this fix, but it’s better than not showing the image.

  • I tried DEBUG and nothing significant came up.

    I also tried the

    <?php 
    
    $image = get_field('image');
    
    echo '<pre>';
    	var_dump( $image );
    echo '</pre>';
    
    ?>

    But nothing happened there either. Was some text supposed to show on the page? I haven’t used

     before.
    
    I tried changing it to this:
    
    <?php $Member = get_field('image');
    						echo '<p class="Test">&nbsp;';
    	var_dump($Member);
    echo '</p>';?>

    Interesting thing is that I do not see <p class="test"> </p> when I view source. It's like that php isn't happening.

    While I have the code asking for only the ['url'], it gives me the entire array. It's very confusing.

    I tried rebuilding a fresh page using the template, but the error continues. Not sure why one page it works and the other it doesn't.

    BUT I FIXED IT. It makes no sense, but it works. Since I was getting nowhere on the one page I went to the other page and I changed this:
    <img src="<?php echo $SingleMember['url']; ?>" alt="<?php echo $SingleMember['alt']; ?>"/>

    to this:

    <img src="<?php the_field('image'); ?>" alt="<?php echo $SingleMember['alt']; ?>"/>

    And now it works on both pages. The setting in ACF is now Return Value: "Image URL"

  • The image field is on a single post. That post is pulled to a couple pages. I just deleted the image and reconnected it. No dice. Still not working. Very weird.

  • Maybe something is up with my template for this page.

    <?php
    /**
     * Template Name: Schedule Page
     *
     */
    get_header();
    
    $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
    
    ?>
    
    <div id="main-content">
    
    <?php if ( ! $is_page_builder_used ) : ?>
    
    	<div class="container">
    		<div id="content-area" class="clearfix">
    			<div id="left-area">
    
    <?php endif; ?>
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    				<div class="entry-content">
                    <!-- START Schedules Content -->
    					<div class="et_pb_section  et_pb_section_0 et_section_regular">
    				
    				
    					
    					<div class=" et_pb_row et_pb_row_0">
    				
    				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0">
    				<div id="SchedulePageTopContainer">
    				<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left  et_pb_text_0">
    				<?php $image = wp_get_attachment_image_src(get_field('side_image'), 'full'); ?>
    <!-- START Page Image -->
    <div class="ScheduleLeft"><img class="size-full ScheduleImage" src="<?php echo $image[0]; ?>" alt="<?php echo get_the_title(get_field('side_image')) ?>" /></div>
    <!-- END Page Image -->
    
    <div class="ScheduleRight">
    <!-- START Page Title -->
    <?php
    if(get_field('page_title'))
    {
    	echo '<h1 class="ScheduleHeadline">' . get_field('page_title') . '</h1>';
    }
    ?>
    <!-- END Page Title -->
    <!-- START Day Hours -->
    <?php
    if(get_field('day_hours'))
    {
    	echo '<p class="ScheduleHours"><img class="alignleft size-full wp-image-159 ScheduleIcon" src="http://camelotshowbar.com/wp-content/uploads/2015/09/DayKeyIcon1.png" alt="DayKeyIcon" width="170" height="50" />' . get_field('day_hours') . '</p>';
    }
    ?>
    <!-- END Day Hours -->
    <!-- START Night Hours -->
    <?php
    if(get_field('night_hours'))
    {
    	echo '<p class="ScheduleHours"><img class="alignleft size-full wp-image-159 ScheduleIcon" src="http://camelotshowbar.com/wp-content/uploads/2015/09/NightKeyIcon1.png" alt="DayKeyIcon" width="170" height="50" />' . get_field('night_hours') . '</p>';
    }
    ?>
    <!-- END Day Hours -->
    <!-- START Page Title -->
    <?php
    if(get_field('weekly_shoutout'))
    {
    	echo '<h2 class="ScheduleShout">' . get_field('weekly_shoutout') . '</h2>';
    }
    ?>
    <!-- END Page Title -->
    </div>
    
    			</div> <!-- .et_pb_text -->
    </div><!-- /SchedulePageTopContainer -->
    <div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left  et_pb_text_1">
    				
    <div id="ScheduleHeader">
    <table id="TableHeader">
    <tbody>
    <tr>
    	<td class="column-1">&nbsp;</td><td class="column-2"><span class="Mon"></span></td><td class="column-3"><span class="Tue"></span></td><td class="column-4"><span class="Wed"></span></td><td class="column-5"><span class="Thu"></span></td><td class="column-6"><span class="Fri"></span></td><td class="column-7"><span class="Sat"></span></td><td class="column-8"><span class="Sun"></span></td>
    </tr>
    </tbody>
    </table>
    </div><!-- /ScheduleHeader -->
    
    <div id="Schedule">
    <?php 
    
    // get repeater field data
    $repeater = get_field('employee_schedule');
    
    // vars
    $order = array();
    
    // populate order
    foreach( $repeater as $i => $row ) {
    	
    	$order[ $i ] = $row['name'];
    	
    }
    // multisort
    array_multisort( $order, SORT_ASC, $repeater );
    
    // loop through repeater
    if( $repeater ): ?>
    
    	<table id="ScheduleTable">
    
    	<?php foreach( $repeater as $i => $row ): ?>
    
    		<tr>
            <td class="column-1"><?php echo $row['name']; ?></td>
            <!-- START MONDAY -->
            <td class="column-2">
    		<?php $field = $row['monday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
    
    		</td>
            <!-- END MONDAY -->
            <!-- ------------------------ -->
            <!-- START TUESDAY -->
            <td class="column-3"><?php $field = $row['tuesday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END TUESDAY -->
            <!-- ------------------------ -->
            <!-- START WEDNESDAY -->
               <td class="column-4"><?php $field = $row['wednesday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END WEDNESDAY -->
            <!-- ------------------------ -->
            <!-- START THURSDAY -->   
            <td class="column-5"><?php $field = $row['thursday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END THURSDAY -->
            <!-- ------------------------ -->
            <!-- START FRIDAY -->
            <td class="column-6"><?php $field = $row['friday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END FRIDAY -->
            <!-- ------------------------ -->
            <!-- START SATURDAY -->
            <td class="column-7"><?php $field = $row['saturday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END SATURDAY -->
            <!-- ------------------------ -->
            <!-- START SUNDAY -->
            <td class="column-8"><?php $field = $row['sunday']; ?>
            <?php if( in_array('Day', $field) && in_array('Night', $field)) {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/DayNight.png"; 
    			$ImageIconAlt ="Day and Night"; 
    		} elseif (in_array('Day', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Day.png"; 
    			$ImageIconAlt ="Day"; 
    		} elseif (in_array('Night', $field)){
    			$ImageIcon ="/wp-content/themes/Divi-child/images/Night.png"; 
    			$ImageIconAlt ="Night"; 
    		} else {
    			$ImageIcon ="/wp-content/themes/Divi-child/images/spacer.gif"; 
    			$ImageIconAlt ="Off";
    		}
    		?>
    			
               <img src="<?php echo $ImageIcon; ?>" class="DayNightCircle" alt="<?php echo $ImageIconAlt; ?>"/>
               </td>
            <!-- END SUNDAY -->
    
            </tr>
    
    	<?php endforeach; ?>
    
    	</table>
    
    <?php endif; ?>
    </div>
    
    			</div> <!-- .et_pb_text -->
    			</div> <!-- .et_pb_column -->
    					
    			</div> <!-- .et_pb_row -->
    				
    			</div> <!-- .et_pb_section -->
    					</div> <!-- .entry-content -->
    
    				</article> <!-- .et_pb_post -->
    
    			<?php endwhile; ?>
    
    <?php if ( ! $is_page_builder_used ) : ?>
    
    			</div> <!-- #left-area -->
    
    			<?php get_sidebar(); ?>
    		</div> <!-- #content-area -->
    	</div> <!-- .container -->
    
    <?php endif; ?>
    
    </div> <!-- #main-content -->
    
    <?php get_footer(); ?>
  • We are narrowing the issue down. This will be a last ditch effort to alleviate the problem.

    The issue is that browsers are caching the page. So instead of showing an updated page, it shows an old schedule. Google Chrome is the biggest culprit. Still working around it’s issues.

  • Thanks John, for the help and the understanding of those “doh!” moments.

  • Yeah, I’m an idiot. I actually had that exact code in there an nothing showed up. Why? Because I failed to SAVE the content I entered in the Option Page area. Stupid. Thanks. It is working perfectly.

  • I figured it out. I was trying to draw the front-end field name. I needed to go into SQL and get the correct row used there.

    add_filter('acf/load_value/name=employee_schedule', 'my_acf_load_value', 10, 3); //repeater_name
    function my_acf_load_value( $rows)
    {
     foreach( $rows as $key => $row ) {
      $column_id[ $key ] = $row['field_5625599634aa1'];
     }
     
     array_multisort( $column_id, SORT_ASC, $rows );
     return $rows;
    }
  • I’ve tried many things now. Nothing is sorting the repeater in the backend. Any help would be greatly appreciated. My repeater:

    Field Group: Schedules

    Repeater Label: Employee Schedule
    Repeater Field Name: employee_schedule

    (Sub-Field to Sort By) Field Label: Name
    (Sub-Field to Sort By) Field Name: name

    Sub-Field Checkbox(same for each day of week with just different day) Field Label: Mon
    Sub-Field Checkbox(same for each day of week with just different day) Field Name: monday
    Sub-Field Checkbox Mon Choices:
    Day : Mon DAY
    Night : Mon NIGHT

  • Here is my current code in functions.php:

    add_filter('acf/load_value/name=employee_schedule', 'my_acf_load_value', 10, 3); //repeater_name
    function my_acf_load_value( $rows)
    {
     foreach( $rows as $key => $row ) {
      $thename = $row['name']; //Field You Want To Sort By
      $column_id[ $key ] = strtotime($thename);
     }
     array_multisort( $column_id, SORT_ASC, $rows );
     return $rows;
    }
Viewing 25 posts - 1 through 25 (of 30 total)