Support

Account

Home Forums Search Search Results for 'save limit'

Search Results for 'save limit'

topic

  • Solved

    One of my field groups won't save anything

    I have a field group with 57 inputs and I was trying to add some more but it won’t save any pass 57, Also if I update anything on that field group like the Location, or any of the Options nothing will save when I update the field group.

    I have numerous field groups that I”m using for the site and this one is the largest with 57 fields in it and all the other ones seem to be working fine so I”m not sure why this one isn’t. Is there a limit to the amount of fields you can have per field group?

  • Solved

    Option Fields not saving within Flexible Content

    Hi @elliot,

    Just encountered a bug when saving values within a 2x repeaters and flexible content field. It says it saves fine, and appears to have saved. But then I left the options page (after saving), and then re-entered, and it didn’t actually save it.

    Using Options, Flexible Content and Repeater plugins. Have tried disabling other plugins, just having ACF by itself – but didn’t change anything.

    I’ve also tried flushing out post revisions, still no luck.

    I’ve tried changing the PHP settings, including all of the below:

    max_input_vars = 3000;
    max_input_nesting_level = 128;
    max_input_time = 300;
    max_execution_time = 300;
    post_max_size = 32M;
    memory_limit = 300M;

    But didn’t fix it unfortunately.

    I will attach a private login example, so you can check it out.

    Does anybody know a fix for this?

    Kind Regards,
    Matt

  • Solved

    Memory Exhausted at 256M -> 30s Timeout at 1024M

    I’ve been trying to setup some product data using ACF.

    I created a custom product post type, and then created the ACF fields I’d need. In total, it’s about 20 fields, though 4 of those are repeaters (1 image, 1 file & 1 test repeater).

    Everything works fine, until I actually try to input data and save a custom post. Sometimes saving a post works, but then only the 1st custom field loads when I try and edit the post.

    I traced this down to a PHP memory error:

    [Tue Jan 21 15:40:50 2014] [error] [client 50.37.134.13] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 128 bytes) in /var/www/wp-content/plugins/advanced-custom-fields/core/fields/text.php on line 231

    So, I upped my php memory limit to 1024M (out of 2GB available). That almost worked, but then led to a max execution time error:

    [Tue Jan 21 16:01:07 2014] [error] [client 50.37.134.13] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php on line 119

    At that point, I gave up on PHP, and figured Nginx might fare a bit different. After moving everything over to a Nginx server, I tried the same process, and got the same result.

    So – am I simply overwhelming what ACF can handle, or is there some other solution that I should try before I give in?

  • Solving

    problems with post edit/add

    Hi I have read articles
    1)http://www.advancedcustomfields.com/resources/tutorials/using-acf_form-to-create-a-new-post/
    2)http://www.advancedcustomfields.com/resources/tutorials/creating-a-front-end-form/

    From what i understood there is provision for creating an HTML form to edit and add posts enhanced with field groups that match rules you have created at the custom fields GUI.

    However I did not achive to get it to work.The only thing that shows is the submit button.I will now enumerate steps taken.please verify – add missing actions.

    1.I made two new php empty template files.I copied <?php code in both one for create from the first article &one for editing giving different template names
    2)I added ‘acf/pre_save_post’ and ‘my_deregister_styles()’ to functions.php of the theme including the add_action and add_filter (which I do no yet know their functionality)
    3)I created two new pages selecting templates and
    …nothing happened
    I freaked out and started trying adding titles of fieldgroups in quotes in an array to both pages
    changed post_ID to some given post for edit,still no results
    copied $options and $args to be set within the new pages,still nothing

    Can you help?Am i missing a step or any code needed(ie some other acf plugin?).Is there another route for creating front-end (ie a php submit snippet)? Please contribute…I have limited time to research wordpress development.

  • Solved

    Limited to 70 fields?

    I have a mega options page that has 70 fields and works fine. When I added 2 more fields (72 total) I started getting the “No Custom Field Group found for the options page.” message. Despite there being a group assigned 2 seconds earlier.

    Creating a new fields group assigned to the Options page removed the error, but the large group didn’t show — so I tracked it. Still no luck.

    Re-saved the group, changed the location options, saved, changed them back, no luck.

    Removing 2 items from the large group restored the option page functionality.

    I get that there has to be some limit, but 70 seems a bit arbitrary and more like a bug than a performance issue? 😉

  • Helping

    Limit on Repeater Rows

    I currently have a custom field group with three different repeaters. They are being grouped using tabs to give a clean interface. We have been having this issue for a while but it seems that after about 150 repeater rows across all three repeaters it doesn’t allow you to add any more. If you add new rows it does nothing, additionally if I have a ton of repeater rows and I try to make updates to the fields the changes don’t save.

    I am guess this is a GET/POST issue with the ACF meta box not passing the info to the server.

    Below is the export of the field group. Thoughts?

    
    /**
     *  Install Add-ons
     *  
     *  The following code will include all 4 premium Add-Ons in your theme.
     *  Please do not attempt to include a file which does not exist. This will produce an error.
     *  
     *  All fields must be included during the 'acf/register_fields' action.
     *  Other types of Add-ons (like the options page) can be included outside of this action.
     *  
     *  The following code assumes you have a folder 'add-ons' inside your theme.
     */ 
    
    // Fields 
    add_action('acf/register_fields', 'my_register_fields');
    
    function my_register_fields()
    {
    	include_once('add-ons/acf-repeater/repeater.php');
    	include_once('add-ons/acf-gallery/gallery.php');
    	include_once('add-ons/acf-flexible-content/flexible-content.php');
    }
    
    // Options Page 
    include_once( 'add-ons/acf-options-page/acf-options-page.php' );
    
    /**
     *  Register Field Groups
     *
     *  The register_field_group function accepts 1 array which holds the relevant data to register a field group
     *  You may edit the array as you see fit. However, this may result in errors if the array is not compatible with ACF
     */
    
    if(function_exists("register_field_group"))
    {
    	register_field_group(array (
    		'id' => '52a5f75506608',
    		'title' => 'Manage Planroom Files',
    		'fields' => 
    		array (
    			0 => 
    			array (
    				'key' => 'field_39',
    				'label' => 'Project Specs',
    				'name' => 'project_specs',
    				'type' => 'tab',
    				'order_no' => 0,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-project_specs',
    				'class' => 'tab',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    							'value' => '',
    						),
    					),
    					'allorany' => 'all',
    				),
    			),
    			1 => 
    			array (
    				'key' => 'field_35',
    				'label' => 'Project Specs',
    				'name' => 'drawings',
    				'type' => 'repeater',
    				'order_no' => 1,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-drawings',
    				'class' => 'repeater',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    						),
    					),
    					'allorany' => 'all',
    				),
    				'sub_fields' => 
    				array (
    					'1369418367790' => 
    					array (
    						'key' => '1369418367790',
    						'label' => 'Division',
    						'name' => 'division',
    						'type' => 'select',
    						'order_no' => 0,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-division',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'Division 2 – Site' => 'Division 2 – Site',
    							'Division 2 - Demolition' => 'Division 2 - Demolition',
    							'Division 3 – Concrete' => 'Division 3 – Concrete',
    							'Division 4 – Masonry' => 'Division 4 – Masonry',
    							'Division 5 – Structural Steel' => 'Division 5 – Structural Steel',
    							'Division 5 – Misc. Metal' => 'Division 5 – Misc. Metal',
    							'Division 6 – Millwork' => 'Division 6 – Millwork',
    							'Division 7 – Thermal & Moisture Protection' => 'Division 7 – Thermal & Moisture Protection',
    							'Division 8 – Glass and Glazing' => 'Division 8 – Glass and Glazing',
    							'Division 8 – Doors, Frames & Hardware' => 'Division 8 – Doors, Frames & Hardware',
    							'Division 9 – Finishes' => 'Division 9 – Finishes',
    							'Division 10 – Specialties' => 'Division 10 – Specialties',
    							'Division 11 – Dock Equipment' => 'Division 11 – Dock Equipment',
    							'Division 11 - Racking' => 'Division 11 - Racking',
    							'Division 12 – Furnishings' => 'Division 12 – Furnishings',
    							'Division 13 – Low Temp' => 'Division 13 – Low Temp',
    							'Division 14 - Elevator' => 'Division 14 - Elevator',
    							'Division 15 – Plumbing' => 'Division 15 – Plumbing',
    							'Division 15 – HVAC' => 'Division 15 – HVAC',
    							'Division 15 – Fire Protection' => 'Division 15 – Fire Protection',
    							'Division 15 – Refrigeration' => 'Division 15 – Refrigeration',
    							'Division 15 – Misc.' => 'Division 15 – Misc.',
    							'Division 16 - Electrical' => 'Division 16 - Electrical',
    						),
    						'column_width' => '',
    						'default_value' => '',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1363624758174' => 
    					array (
    						'key' => '1363624758174',
    						'label' => 'Drawing Number',
    						'name' => 'drawing_number',
    						'type' => 'text',
    						'order_no' => 1,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_number',
    						'class' => 'text',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '20',
    						'default_value' => '',
    						'formatting' => 'html',
    					),
    					'1363624788244' => 
    					array (
    						'key' => '1363624788244',
    						'label' => 'Drawing Type',
    						'name' => 'drawing_type',
    						'type' => 'select',
    						'order_no' => 2,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_type',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'---' => '---',
    							'Progress Print' => 'Progress Print',
    							'Permit Issue' => 'Permit Issue',
    							'Construction Issue' => 'Construction Issue',
    						),
    						'column_width' => '20',
    						'default_value' => '---',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1363624837322' => 
    					array (
    						'key' => '1363624837322',
    						'label' => 'Revision Date',
    						'name' => 'revision_date',
    						'type' => 'date_picker',
    						'order_no' => 3,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-revision_date',
    						'class' => 'date_picker',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '15',
    						'date_format' => 'mmddyy',
    						'display_format' => 'mm/dd/yy',
    					),
    					'1363624905583' => 
    					array (
    						'key' => '1363624905583',
    						'label' => 'File Upload',
    						'name' => 'upload_file',
    						'type' => 'file',
    						'order_no' => 4,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-upload_file',
    						'class' => 'file',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '20',
    						'save_format' => 'url',
    					),
    					'1363624933673' => 
    					array (
    						'key' => '1363624933673',
    						'label' => 'Archive',
    						'name' => 'archive',
    						'type' => 'true_false',
    						'order_no' => 5,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-archive',
    						'class' => 'true_false',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '5',
    						'message' => '',
    						'default_value' => '0',
    					),
    				),
    				'row_min' => '0',
    				'row_limit' => '',
    				'layout' => 'table',
    				'button_label' => 'Add Spec',
    			),
    			2 => 
    			array (
    				'key' => 'field_40',
    				'label' => 'Plans (PDF)',
    				'name' => 'plans_(pdf)',
    				'type' => 'tab',
    				'order_no' => 2,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-plans_(pdf)',
    				'class' => 'tab',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    							'value' => '',
    						),
    					),
    					'allorany' => 'all',
    				),
    			),
    			3 => 
    			array (
    				'key' => 'field_36',
    				'label' => 'Plans (PDF)',
    				'name' => 'general',
    				'type' => 'repeater',
    				'order_no' => 3,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-general',
    				'class' => 'repeater',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    						),
    					),
    					'allorany' => 'all',
    				),
    				'sub_fields' => 
    				array (
    					'1369418763363' => 
    					array (
    						'key' => '1369418763363',
    						'label' => 'Discipline',
    						'name' => 'discipline',
    						'type' => 'select',
    						'order_no' => 0,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-discipline',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'01 Civil' => '01 Civil',
    							'02 Architectural' => '02 Architectural',
    							'03 Structural' => '03 Structural',
    							'04 Fire Protection' => '04 Fire Protection',
    							'05 Plumbing' => '05 Plumbing',
    							'06 Mechanical' => '06 Mechanical',
    							'07 Industrial Refrigeration' => '07 Industrial Refrigeration',
    							'08 Electrical' => '08 Electrical',
    							'09 Material Handling' => '09 Material Handling',
    							'10 Process' => '10 Process',
    							'11 Energy Management' => '11 Energy Management',
    						),
    						'column_width' => '',
    						'default_value' => '',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1364932029906' => 
    					array (
    						'key' => '1364932029906',
    						'label' => 'Drawing Number',
    						'name' => 'drawing_number',
    						'type' => 'text',
    						'order_no' => 1,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_number',
    						'class' => 'text',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '20',
    						'default_value' => '',
    						'formatting' => 'html',
    					),
    					'1364932064902' => 
    					array (
    						'key' => '1364932064902',
    						'label' => 'Drawing Type',
    						'name' => 'drawing_type',
    						'type' => 'select',
    						'order_no' => 2,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_type',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'---' => '---',
    							'Progress Print' => 'Progress Print',
    							'Permit Issue' => 'Permit Issue',
    							'Construction Issue' => 'Construction Issue',
    						),
    						'column_width' => '20',
    						'default_value' => '---',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1364932091012' => 
    					array (
    						'key' => '1364932091012',
    						'label' => 'Revision Date',
    						'name' => 'revision_date',
    						'type' => 'date_picker',
    						'order_no' => 3,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-revision_date',
    						'class' => 'date_picker',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '15',
    						'date_format' => 'mmddyy',
    						'display_format' => 'mm/dd/yy',
    					),
    					'1364329261714' => 
    					array (
    						'key' => '1364329261714',
    						'label' => 'Upload File',
    						'name' => 'upload_file',
    						'type' => 'file',
    						'order_no' => 4,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-upload_file',
    						'class' => 'file',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '',
    						'save_format' => 'url',
    					),
    					'1364932129217' => 
    					array (
    						'key' => '1364932129217',
    						'label' => 'Archive',
    						'name' => 'archive',
    						'type' => 'true_false',
    						'order_no' => 5,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-archive',
    						'class' => 'true_false',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '5',
    						'message' => '',
    						'default_value' => '0',
    					),
    				),
    				'row_min' => '0',
    				'row_limit' => '',
    				'layout' => 'table',
    				'button_label' => 'Add New File',
    			),
    			4 => 
    			array (
    				'key' => 'field_41',
    				'label' => 'Plans (CAD)',
    				'name' => 'plans_(cad)',
    				'type' => 'tab',
    				'order_no' => 4,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-plans_(cad)',
    				'class' => 'tab',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    							'value' => '',
    						),
    					),
    					'allorany' => 'all',
    				),
    			),
    			5 => 
    			array (
    				'key' => 'field_37',
    				'label' => 'Plans (CAD)',
    				'name' => 'autocad',
    				'type' => 'repeater',
    				'order_no' => 5,
    				'instructions' => '',
    				'required' => '0',
    				'id' => 'acf-autocad',
    				'class' => 'repeater',
    				'conditional_logic' => 
    				array (
    					'status' => '0',
    					'rules' => 
    					array (
    						0 => 
    						array (
    							'field' => 'null',
    							'operator' => '==',
    						),
    					),
    					'allorany' => 'all',
    				),
    				'sub_fields' => 
    				array (
    					'1364932249173' => 
    					array (
    						'key' => '1364932249173',
    						'label' => 'Division',
    						'name' => 'division',
    						'type' => 'select',
    						'order_no' => 0,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-division',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'---' => '---',
    							'Existing Conditions' => 'Existing Conditions',
    							'Concrete' => 'Concrete',
    							'Masonry' => 'Masonry',
    							'Metals' => 'Metals',
    							'Woods, Plastics, Composites' => 'Woods, Plastics, Composites',
    							'Thermal & Moisture Protection' => 'Thermal & Moisture Protection',
    							'Openings' => 'Openings',
    							'Finishes' => 'Finishes',
    							'Specialties' => 'Specialties',
    							'Equipment' => 'Equipment',
    							'Furnishings' => 'Furnishings',
    							'Lo Temp' => 'Lo Temp',
    							'Mechanical' => 'Mechanical',
    							'Electrical' => 'Electrical',
    						),
    						'column_width' => '20',
    						'default_value' => '',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1364932273370' => 
    					array (
    						'key' => '1364932273370',
    						'label' => 'Drawing Number',
    						'name' => 'drawing_number',
    						'type' => 'text',
    						'order_no' => 1,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_number',
    						'class' => 'text',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '20',
    						'default_value' => '',
    						'formatting' => 'html',
    					),
    					'1364932294925' => 
    					array (
    						'key' => '1364932294925',
    						'label' => 'Drawing Type',
    						'name' => 'drawing_type',
    						'type' => 'select',
    						'order_no' => 2,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-drawing_type',
    						'class' => 'select',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'choices' => 
    						array (
    							'---' => '---',
    							'Progress Print' => 'Progress Print',
    							'Permit Issue' => 'Permit Issue',
    							'Construction Issue' => 'Construction Issue',
    						),
    						'column_width' => '20',
    						'default_value' => '---',
    						'allow_null' => '0',
    						'multiple' => '0',
    					),
    					'1364932310112' => 
    					array (
    						'key' => '1364932310112',
    						'label' => 'Revision Date',
    						'name' => 'revision_date',
    						'type' => 'date_picker',
    						'order_no' => 3,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-revision_date',
    						'class' => 'date_picker',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '15',
    						'date_format' => 'mmddyy',
    						'display_format' => 'mm/dd/yy',
    					),
    					'1364329423992' => 
    					array (
    						'key' => '1364329423992',
    						'label' => 'Upload File',
    						'name' => 'upload_file',
    						'type' => 'file',
    						'order_no' => 4,
    						'instructions' => '',
    						'required' => 0,
    						'id' => 'acf-upload_file',
    						'class' => 'file',
    						'conditional_logic' => 
    						array (
    							'status' => 0,
    							'allorany' => 'all',
    							'rules' => 0,
    						),
    						'column_width' => '',
    						'save_format' => 'url',
    					),
    				),
    				'row_min' => '0',
    				'row_limit' => '',
    				'layout' => 'table',
    				'button_label' => 'Add CAD',
    			),
    		),
    		'location' => 
    		array (
    			'rules' => 
    			array (
    				0 => 
    				array (
    					'param' => 'post_type',
    					'operator' => '==',
    					'value' => 'planroom',
    					'order_no' => 0,
    				),
    			),
    			'allorany' => 'all',
    		),
    		'options' => 
    		array (
    			'position' => 'normal',
    			'layout' => 'default',
    			'hide_on_screen' => 
    			array (
    			),
    		),
    		'menu_order' => 0,
    	));
    }
    
  • Solved

    If there a limit to number of subfields one can have?

    Hi,

    First of all kudos for building such an awesome plugin!

    Right now, I have setup a single field in which I have a lot of sub fields but I have run into a situation where any more changes are not being saved.

    If I try to add more sub-fields, that gets discarded. Even any change to the “Button label” doesn’t work. If I duplicated the field, that doesn’t get saved either. One thing that I found was if I add a subfield in between somewhere and not at the last of all the sub-fields I have, it does get saved but then the very last subfield gets deleted, which makes me think I am running into some kind of limit here.

    Please suggest what to do! I am not using any other plugin other than ACF core + ACF Flexible Content Field on Twenty Twelve theme.

  • Solved

    can't add more to repeater item

    hi,

    I have a repeater type field in my page which includes images, description fields..
    I’ve been adding a list of information about films using thie repeater item without a problem so far.
    But when I add 165th item and save the page, the page doesn’t actually save 165th item.
    And the page gets really slow when it loads all 164 items.
    Is this memory limitation related issue?
    Is there any way I can solve this?
    Thanks!

  • Solved

    Can't add more fields!

    I am unable to add more fields to groups that already have a large number of fields
    .
    I am able to add the field information, but I can’t save it. I found another post here about the same topic – and the solution was to up update php settings to allow more memory. My server (VPS) already allows me to run 128MB of memory. But I still can’t add more fields.

    I get no errors whatsoever. My WP debug is on. I have no PHP memory limit exceeded errors as one usually gets when running into this issue.

    Also, once I click on the update button, the page does reload, and tells me that the group has been updated – but it hasn’t.

    Any ideas on how to solve this issue?

  • Solved

    Group limited to 75 entries??

    Hey there,

    I’m using ACF for a grading system, meaning there several groups, each with allot of fields (text/radiobuttons) and labels.

    It appears though, as if I can’t put more than 75 in a group. When I add more and save the group, they simply disappear without a warning.
    Is this a known limit, a bug, or something I have to change to put that limit to, lets say, 120?

    ___edit

    I saw I had a update available, so I updated to the latest version to see if the problem was solved.

    The result is that I can’t go past 60 rows.. This seems like a set limit. Is this correct?

  • Solved

    Flexible Content Within Flexible Content Within Flexible Content

    I either found a bug or have reached a limit that isn’t possible. I am trying to put a Flexible Content field inside of a Flexible Content field inside of another Flexible Content field.

    When I save it, the third nested Flexible Field inside of the first one gets kicked out and the names/fields do not save (all within ACF admin).

    Can you help?

    I am basically creating an FAQ page, with Category, Sub Category, and Answer/Question. Image attached for what I’m trying to do…

  • Solved

    Javascript populated field not saving data

    Howdy

    I’m currently using a repeater field to dynamically create sidebars. All is working well, except I need a way to assign them unique IDs that don’t change. I figured the best way would be to have a field for the ID, which would be populated and disabled by javascript.

    I can get the field all populating with data, but when I hit save, no data is stored. I’m not quite sure where to go from here, as I would have thought that getting the data in the field would be enough.

    Is there an extra step involved that I am missing?

    Here is the jquery which successfully creates the data. The randString method is just a function I have elsewhere.

    
    jQuery.fn.pdsCustomSidebarID = function ()
    {
        var input = this.find('*[data-field_name="sidebar_id"] input');
    
        if( input.val() == '' ){
            input.prop('disabled', true).val( randString(6) );
        }
    
    //    this.find('*[data-field_name="sidebar_id"] input').prop('disabled', true).val( randString(6) );
    }
    
    jQuery(document).ready(function ($)
    {
        $(document).live('acf/setup_fields', function (e, div)
        {
            $(div).find('#acf-custom_sidebars .row').each(function ()
            {
                $(this).pdsCustomSidebarID();
            });
        });
    });
    

    Here is the field group registration array.

    
    register_field_group(
          array(
                'id'         => 'acf_custom-sidebar-options-sidebars',
                'title'      => 'Custom Sidebar Options',
                'fields'     => array(
                      array(
                            'key'          => 'field_51fcb088cb9eb',
                            'label'        => 'Custom Sidebars',
                            'name'         => 'custom_sidebars',
                            'type'         => 'repeater',
                            'instructions' => 'Manage your custom sidebars here. Add and remove as many as you like, and assign them when creating/editing posts and pages. Setting your own custom sidebars will empower you to display unique sidebar content on any post or page, freeing you of the default single-sidebar in WordPress.',
                            'sub_fields'   => array(
                                  array(
                                        'key'           => 'field_51fcb1efcb9ec',
                                        'label'         => 'Name',
                                        'name'          => 'sidebar_name',
                                        'type'          => 'text',
                                        'column_width'  => 20,
                                        'default_value' => '',
                                        'formatting'    => 'none',
                                  ),
                                  array(
                                        'key'           => 'field_51fcb234cb9ed',
                                        'label'         => 'Description',
                                        'name'          => 'sidebar_description',
                                        'type'          => 'text',
                                        'column_width'  => '',
                                        'default_value' => '',
                                        'formatting'    => 'none',
                                  ),
                                  array(
                                        'key'           => 'field_51fcb2ea21853',
                                        'label'         => 'Style',
                                        'name'          => 'sidebar_style',
                                        'type'          => 'select',
                                        'column_width'  => 12,
                                        'choices'       => array(
                                              'pds-default-style' => 'Grey box',
                                              'pds-plain-style'   => 'Plain',
                                        ),
                                        'default_value' => 'one',
                                        'allow_null'    => 0,
                                        'multiple'      => 0,
                                  ),
                                  array(
                                        'key'           => 'field_57fcb9efcb9ad',
                                        'label'         => 'ID',
                                        'name'          => 'sidebar_id',
                                        'type'          => 'text',
                                        'column_width'  => 10,
                                        'default_value' => '',
                                        'formatting'    => 'none',
                                  ),
                            ),
                            'row_min'      => 0,
                            'row_limit'    => '',
                            'layout'       => 'table',
                            'button_label' => 'Add a new sidebar',
                      ),
                ),
                'location'   => array(
                      array(
                            array(
                                  'param'    => 'options_page',
                                  'operator' => '==',
                                  'value'    => 'custom-sidebars',
                                  'order_no' => 0,
                                  'group_no' => 0,
                            ),
                      ),
                ),
                'options'    => array(
                      'position'       => 'normal',
                      'layout'         => 'no_box',
                      'hide_on_screen' => array(),
                ),
                'menu_order' => 1,
          )
    );
    

reply

  • It would be more complicated than that and using a user would be of limited use.

    Let’s say that you want a page separate from the user profile page to store additional user values. You could dynamically set the user where the values are save to for an options page based on the currently logged in user. Only one such page would ever be available and only the currently logged in user would be able to view or edit the values.

    I haven’t got a clue what use case would involve saving values to specific term.

    However, getting values from meta is generally faster than getting values from options unless you have the options set to autoload.

    I generally use the last option. This allows me to keep different options for different options pages separated in the options table and allows me to have the same field names used on multiple options pages because the option_name value varies by option page.

  • Adding terms to a taxonomy requires the WP manage_categories permission.

    Your choices are limited.

    You could edit roles and give everyone this permission, but that’s probably not a good choice.

    I might be possible to give this permission temporarily when viewing a specific page. I’m now 100% sure about this or how it can be done.

    And the last choice is to include a separate text field that is only shown when a user does not have the correct permission using the acf/prepare_field filter and then adding an acf/save_post filter that will add the term to WP and then set it as a post term.

  • I assume you mean if you have a taxonomy under WooComm, you are saying that you have a product post type with a new taxonomy of Brand, right? And then each term in that taxonomy (Brand A, Brand B, Brand C) has a field that has a shipping time associated with it. And that you have found some way (there are a few methods) to limit each product to a single brand term. Yes?

    Then I am not sure why you would want to copy this field elsewhere – would you not just use it in the original location? (Having the same data in 2 places just invites it to be wrong somewhere.) You can pull out the information using this:
    https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/

    If you really want it in 2 places, you can also use that method to pull out the taxonomy term field value and stuff it into an update_field on the acf/save_post hook.
    https://www.advancedcustomfields.com/resources/acf-save_post/
    See the “applied after save” section and then
    https://www.advancedcustomfields.com/resources/update_field/

  • You cannot add WYSIWYG buttons to that field. This functionality is only available for the WP description field when you view the media library in list view and then edit the image details in the WP admin. This functionality is not available when viewing/editing in grid view and is a limitation of this view in WP. ACF uses the the build in WP image selector and editor for the gallery field for the grid view.

    The value of the description field for attachments is saved in the “post_content” column of the “_posts” table

    You can accomplish this by adding a field group to the media (attachment) post type with a WYSYWYG field with a basic toolbar and then creating an acf/save_post action for attachment post types that copies the value of your custom field to post_content.

  • Seems like this might be limited to textareas on nav menu items. I can save <svg> code just fine if I add it to a textarea in other locations, like on a Post.

  • You are correct. You cannot limit where individual fields are shown, only entire field groups.

    It is possible to limit where a specific field is used by using an acf/prepare_field filter to remove fields that should not be shown. You would need to use the “field key” variant of the filter and you would need to determine for yourself when the field should be shown or not.

    In all likely hood it would mean saving the post to become effective. For example, if a location rule is based on a taxonomy term then the post would need to be saved with that taxonomy term before you would be able to test for that taxonomy in your filter function. The same would apply to any setting that is generally controlled by WP.

    This could be overcome by moving all WP settings into custom fields, you could then use conditional logic based on these new custom fields instead of the above filter. However, this would mean creating an acf/save_post action to convert all of the new controls into WP setting when the post is saved. This may also not be possible in all cases.

  • Hi I will try to explain my proposal
    http://joxi.ru/1A5YVjkUw3vaWA
    I have a problem when a content manager is lazy person and don’t want to write 2-3 paragraphs for short description of post (I made it by ACF field). I want change this problem like a developer. I’m solving this problem, but in a bad way and you could help fix it =)
    Can you please change the field ‘Character Limit’ and make <input type=”range”> instead of <input type=”number”>. If you make a change, it will help users to set not only the upper limit of the available characters, but also the lower limit. This value, in my understanding should have two values, – min value and max value. By default let it be 0 value in both meanings.

    – min value number can’t be more than max value number. (but if max value===0 it’s OK)
    – if field will be Required, person can’t save file if numbers of symbols will be less than the specified value

    I hope you will consider my suggestion and be able to implement it in the next version of the plugin. Thanks

  • Understood, thanks John.

    Would allocating more resources help the server save the data quicker so the timeout doesn’t happen? I can increase the memory and CPU limit of the hosting server.

  • Hi John

    Thankyou for getting back to me. I have read tons of your ACF work and use a couple of your plugins. I’m very grateful to you for posting a reply.

    Yes that is exactly what I’m trying to do; and are well in over my head! I’ve attached a JPG which probably explains it better. The area in blue is the parent “listing” post. In green are related viewing appointment times: “events.” In orange is an ACF form with a “booking” post. Within the booking post in purple is a related “events” field. Purple is supposed to allow the user to choose from the available event times (as seen in green). Purple currently lists all booking times posted for all events.

    At the top you can see a shortcode return: 207 is the ID of the listing (Blue) and the array 3515,4562 are the events times (green). I cannot seem to get the array loaded in the ACF [acf/fields/post_object/query/] filter. The post ID (207) comes back empty when in called inside the filter.

    I’ve tried using a global var to save the ID but this also seems to zero out.

    I’m beyond the limits of my present knowledge on how to fix this.

    Some other files also attached which you can take credit for and use as you see fit 🙂

  • I know this is a bit late but I just had this same issue I was trying to solve. I managed to get a working proof of concept by Frankensteining a number of different tutorials together. I have an ACF field on the custom post type page called ‘homepage_order’ that I can enter data in and if I go to the posts list page I can see that content in a custom column and update the content from the Quick Edit box of each post. I am not a proficient PHP coder so I’m sure there are glaring errors and my security checks are not all there (some of them are causing the update to fail) but hopefully this will help point you in the right direction. If anyone has any comments on how I can make this better, I would be most appreciative.

    
    //Adds the custom column to the exhibits posts list page
    add_filter( 'manage_exhibits_posts_columns', 'heard_filter_posts_columns' );
    function heard_filter_posts_columns( $columns ) {
      $columns['homepage_order'] = __( 'Current Exhibits Order', 'heard' );
      return $columns;
    }
    //Gets the data from the custom field populated in the exhibits post and adds it to the column
    add_action( 'manage_exhibits_posts_custom_column', 'heard_homepageorder_column', 10, 2);
    function heard_homepageorder_column( $column, $post_id ) {
      // Image column
      if ( 'homepage_order' === $column ) {
        echo get_post_meta( $post_id, 'homepage_order', true );
      }
    }
    //Creates a fillable field in the Quick Edit box
    add_action( 'quick_edit_custom_box', 'heard_custom_edit_box_pt', 10, 3 );
    function heard_custom_edit_box_pt( $column, $post_id ){
    
    if($column == 'homepage_order'){
        $html .= '<fieldset class="inline-edit-col-right ">';
            $html .= '<div class="inline-edit-group wp-clearfix">';
                $html .= '<label class="alignleft" for="homepage_order">Current Exhibits Order</label>';
                $html .= '<input type="text" name="homepage_order" id="homepage_order" value="" />';
            $html .= '</div>';
        $html .= '</fieldset>';    
    }
    
    echo $html;
    }
    //Saves any updates to the current exhibit order field in the Quick Edit box
    add_action( 'save_post_exhibits', 'heard_update_custom_quickedit_box' );
    function heard_update_custom_quickedit_box() {
      //There are currently limited security measures in place on this. The quick edit field won't update when I add all of them. Still working on this.    
      //Check user permissions- this works
    if ( 'page' == $_POST['homepage_order'] ) {
            if ( !current_user_can( 'edit_page', $post_id ) )
                return $post_id;
        }
        // save homepage_order updates in Exhibits- custom post type
        if( isset( $_POST['homepage_order'] )) { // where homepage_order is defined in the <input name="homepage_order">
            update_post_meta($_POST['post_ID'], 'homepage_order', $_POST['homepage_order']);
        }
        return; // finish the function call
    }
    
  • I don’t know if this will help you or make your dev process any easier. My goal when I build a site has to do with making things easy for the client and not necessarily making it easier for myself, so when I’m building the admin for the client I don’t even give much thought to how difficult it will be for me to code, I just make sure that it’s something that can be coded. However, I do my best to never code something more than once.

    I build in “modules” I have a field group that has all the settings I need for links, not only the ones you mention but others. I then clone this field group as the only sub field of a “Group Field”, this insures that all fields of my group are always “sub fields” With this in place I have a single template part file that is called to output links.

    
    // something like this goes into my template
    if (have_rows('group_field_name')) {
      // always true for a group field that exists
      while (have_rows('group_field_name')) {
        // always executes once for group fields that exist
        get_template_part('template-parts/components/link);
      }
    }
    

    So I have only coded this once. My group has become quite complicated, but if changes are made I only need to make them in a single file.

    The field group for links can also be cloned as the only sub field in a repeater and the template part file will still work but allow the client to add multiple CTA buttons.

    I actually use a true/false field the new window setting. The label on the true false field is
    – Same Window = false
    – New Window = true
    and the code in my template part for building this part of the link button is

     
    $target = '';
    if (get_sub_field('target')) {
      $target = ' target="_blank"';
    }
    

    and example of my link output

    
    <a href="<?php echo $url; ?>" class="<?php echo implode(' ', $cta_classes) ?>"<?php echo $title.$rel.$target.$onclick; ?>><?php echo $text; ?></a>
    

    Also, when it comes to a URL and the client entering a URL, I do not use a URL field because it is too limiting. For example lets say that you want to allow the client to enter anything other than a URL. My clients and the people I work with want to be able to enter anchor links as well as tel:, mailto:, sms: and ftp: links. So instead of using a URL field I use a text field with custom validation. Building separate fields would increase the code and complicate things for the client. Instead I have a text field that will accept anything that appears to be a valid href value and as part of the client’s instruction when handing over the site they are shown how to use this field and the field has very good instructions to help remind them.

    
    add_filter('acf/validate_value/key=field_XXXXXXXX', 'validate_text_as_href', 20, 4);
    function validate_text_as_href($valid, $value, $field, $input) {
      // this allows links starting with
      // / (site root relative), http://, https://, ftp://, # (anchor), mailto:, tel:, sms:
      if (!$valid) {
        return $valid;
      }
      if (!empty($value)) {
        if (!preg_match('%^(https?\://|ftp\://|/|#|mailto\:|sms\:|tel\:)%', $value)) {
          $valid = 'Enter a Valid HREF Value';
        }
      }
      return $valid;
    }
    

    As to automatically updating or redirection, I have not built anything that will automatically redirect if the slug of a page is changed. I will need to look into that, what I do know is that what is built into WP rarely works as expected.

    As far as automatically updating links when a slug or url changes, you would need to keep some type of history on the slug/url of the page when it is updated. You would need to add a pre_post_update action that somehow checks to see if the url of the page is being changed. If it is then you’d have to figure out how to lookup and changed all of the other posts and pages where there is a link to the page being updated and change them without this process timing out the admin page refresh. This would basically mean that you’d have to record somewhere/somehow all of the places where a link to the page is saved to allow a quicker lookup so that they can be found quickly and updated.

    This brings me back to the automatic redirection because the testing to see if the URL has changed for a page sparked an idea. You could as in the above add a pre_post_update action and if possible record a history of all of the URLs that were ever assigned to this post and then on a 404 you could do a search for posts that have had the missing URL. This isn’t actually a bad idea that I may look into.

  • I would have to agree with @johnbarneson

    You’re talking about rebuilding all of the templates and moving content. It will rarely be cost effective to make the change automatically or creating a import tool to do this when it will happen exactly 1 time. My experience is that it will take longer to build the tool, make sure it work and then use it than it will take so simply update the data manually.

    If I had to do this on a budget and the number of fields was extremely limited I would

    1) Create my new acf field groups.

    2) At each location where a “simple field” was used I would see if the acf field has content and if not then use the existing simple fields code

    
    if (get_field('some-field')) {
      // data exists in the new acf field
    } else {
      // no data in acf field
      // existing simple fields code here
    }
    

    3) The next step I would take is to add an acf/prepare_field filter for every acf field that needed to use the simple fields data. In this field I would test for a value in the field. If there is no value then I would get the simple fields field value. What this does it that it will copy any existing data when and if someone edits an old page.

    4) As an added step I would create an acf/save+post action that deletes all the data stored by simple fields whenever a post us updated.

  • I cannot think of any easy way to do this.

    I would create the CPT and then I would create a function that did this that I would remove when the process is complete.

    I would also set the options page auto_load argument to true and save the options page, this alone might speed up the loading of the options page. But you need ti to auto load for the conversion.

    Next thing is that I would create a new text field in the repeater called “tranfered_to_post” or something like that, name does not really matter. Again, save the options page to and this will make sure the new sub field exists in all of the rows.

    
    add_action('init', 'move_repeater_to_cpt');
    function move_repeater_to_cpt() {
      // set some reasonable limit on the number of posts to create
      // to prevent timeout
      $limit = 20;
      // count of posts created
      $count = 0;
      if (have_rows('repeater', 'options')) {
        while(have_rows('repeater', 'options')) {
          the_row();
          if (!empty(get_sub_field('tranfered_to_post')) {
            // this row already done, move to the next one
            continue;
          }
          // *********************************************
          // create a new post base on row data
          // *********************************************
         
          // mark the row as done
          update_sub_field('tranfered_to_post, 'done');
        } // end while have_rows
      } // end if have_rows
    } // end function
    

    then you just need to keep reloading any page on the site until all of the rows are converted. Then delete the function.

Viewing 25 results - 76 through 100 (of 222 total)