Support

Account

Home Forums Search Search Results for 'save limit'

Search Results for 'save limit'

reply

  • Hi @greenish

    Thanks for the info.
    May I ask what edit screen you are saving the data on? On a normal post / page, or a taxonomy, user, options page?

    The issue is either 1 of 2 things:
    1. Running out of PHP memory or hitting a max vars limit during the save – easiest way to solve this is check your server error logs and increase the available vars / memory
    2. Your field names are too long to save into the DB – this an happen when saving to a taxonomy, user or options page as these tables have different character limits on the meta_key value

    Hope that helps find the issue!

    Cheers
    E

  • Hi @cleocq

    Sounds like you have a slightly different issue and that is you are running out of PHP memory or hitting a max_vars limit during the save function.

    I would check your server logs for any errors which can help determine the issue

  • Hi @MR___

    Thanks for the question. The answer to which is most likely that WP is unable to save the value.

    The reason for this is due to the string length of the meta_name which you are trying to save. The more depth (from repeaters / flexible content fields), the longer the value name saved in the DB.

    Some database tables contain character limits on the metaname column. This changes from the postmeta, to the options and the usermeta tables.

    Another possibility is that your server is running out of variables or memory during the save and is simply failing to execute the save function.

    Best bet is to loog in your server logs. They will hopefully show the error that is occurring.

    Thanks
    E

  • Hi @chrisj

    This really does sound like the website is timing out during the save. I would have a look at your server logs to see if any PHP memory or max vars limits were hit.

    Thanks
    E

  • Hi @RobinL

    Thanks for the bug report.

    Yes, this is most likely a limitation of using this feature as a sub field…

    I’ll look into it.

  • Hi @hillbilly

    Perhaps the issue is that your server is unable to save any more data in the request.

    Can you check your console logs to see if the saving process hit any PHP memory / max vars limit?

    Thanks
    E

  • Hi Elliot,

    Thanks for your reply. I had another question on this forum where you also suggested to use posts2posts. It looks like it’s the solution, but I don’t want to rely on another plugin (which has cancelled support). So I’m trying to find a solution with only using ACF.

    I have about 700 events and 8000 artists, so changing the relationship field to a post_object field isn’t an option. Then I’d have to select an artist out of a drop-down with 8000 artists…

    Every event can have more than 100 artist, so I hope my whole concept won’t be limited by performance issues.

    I did notice that I can put the Return Format from Post Objects to Post IDs. So on an event page, for each artist I can do:

    $artist = get_field('artist');
    foreach ($artist as $artist_id) {
    	echo get_permalink($artist_id);
            echo get_the_title($artist_id);
    	etc...
    }

    If I look at the way all the artists are stored in the DB for each event, it is:

    Array ( [0] => 10001 [1] => 10002 [2] => 10003 [3] => 10004 [4] => 10007 [5] => 10008 [6] => 10009 [7] => 17497 )

    Which looks much leaner than when I put the relationship setting to the return format Post Objects (because than it saves a lot more artist postdata in the array, which I don’t really need since I can get all postdata with just the ID).

    If I make a repeater field, in which I put a relationship field which has Return Format set to Post IDs, would that simplify my query? Is it then possible to find all events which have one particular artist post ID?

    Thanks in advance!

  • Hi @rli1369

    Currently, the update_field is not able to update a sub field. This is a limitation of the architecture of ACF as it uses post meta to save the field object.

    In the future, we will see an update_sub_field function

    Thanks
    E

  • Hi @retorial

    Thanks for the info.

    We can definitely rule out a server limit issue, but this leaves us with the very annoying ‘plugin conflict’ issue.

    There is a chance that another plugin / theme code is conflicting with ACF and causing the save function to not run.

    Can you turn on debug mode and save the location. Do any errors appear which would stop the save?

  • Thanks for the quick reply, @elliot.

    I don’t believe it’s a server limit. The amount of data I’m trying to save is very small. The only data on the Page (the only data I’m saving) is two instances of a single Repeater Field. Each instance of the Repeater Field contains 9 text fields (retailer name, address, city, state, phone, etc.).

    Whenever I try to add an additional Repeater Field instance, it doesn’t save the new entry upon hitting “Update.” As I said though, it works fine on other sections of my site. It’s only the Retailers section that isn’t working.

    Just a little more info: my retailers section is broken into separate pages, organized by region. New York, Florida, Germany, United Kingdom, France, etc. and each of those separate Pages contains the Repeater Field form. Each page only has a few instances (2 – 3) of the “Retailers” Repeater Field.

    In other words, France for example only lists three retailer locations. It’s not a lot of data.

    I’ll also add this: if I add all the relevant data manually (retailers_1_name, retailers_1_address, retailers_1_city, etc.) using WordPress’s Custom Fields box, everything works fine and it saves the data. It’s just not saving the data when I use the Repeater Field input box.

    I’ll also say that it used to work fine a few months ago (the last time I tried updating the Retailers section). And again, it’s only my Retailers pages that aren’t saving properly, but the other sections where I use the Repeater Field plugin work fine. FAQs, Color Chart, etc.

    Any thoughts based on all this information?

    Thanks again.

  • Hi @retorial

    It is possible that you are hitting a server limit which is Causing the save function to terminate early.

    How much data are you trying to save?

    Have you checked your server logs for any clues?

  • i ran some tests and the problem is that the value is now saved as an array even if there is only one value. this causes issues for plugins doing things with custom fields and expecting strings. also support for arrays is limited in custom queries…

  • Update:
    Server company changed the limits for php to the ones in the other post, as well as the htaccess and it still won’t save. Barring the chance that these updates are taking time to ‘sync’, any other thoughts on the cause?

  • Think I am experiencing this as well. I’m creating a fairly complex set of ACFs and just ran into a point where when I go to save a new field, it disappears as soon as I save (update).

    Is there a known limit to the number of fields Field Group?

  • Hi @daryn

    This could be a number of things.

    I would start by disabling all other plugins to test if the issue is a conflict.
    Then change the theme to default twentyten.

    After that, I would consult the server logs to see if you are hitting a limit during the save process. It is possible that your server is running out of memory / vars.

  • First let me say I am loving ACF. Totally awesome.

    Your response is great, and I can tell is pointing me in the right direction… I think I need to add some additional clarification though, because my need goes a little deeper. Hopefully I can clarify.

    So I have two custom post types. “House Models” and “Neighborhoods”.

    When I save a new House Model, I enter variations in a repeater field; the variations are called “Elevations”. The Elevations are not shared by different House Models.

    Then when I am editing a Neighborhood, it has a repeater field called “Lots”. Inside each Lot I add to the repeater, I need to select a House Model (Simply done with the post_object fiel and our “Field A”). Then I need to select which Elevation of the House Model was built on that Lot with a select field (Field B). Ideally Field B will be limited to ONLY the Elevations entered for the chosen Home Model in Field A.

    Where I feel stuck now, how do I populate Field B with the Elevations saved to the Home Model selected in Field A. The difficulty comes for me because of the multiple instances of Field A and Field B because they are inside a repeater themselves…

    Does that make it any clearer?

    I REALLY appreciate your help!!!

    – David Ray

  • Hi @elliot,

    Thank you for replying. I should point out that my PHP knowledge isn’t that great(!). I did however get the following output:

    Array
    (
        [field_51e6a66b8509b] => Array
            (
                [label] => Client name
                [name] => client_name
                [type] => text
                [instructions] => 
                [column_width] => 
                [default_value] => 
                [formatting] => html
                [order_no] => 0
                [key] => field_51e6a66b8509b
            )
    
        [field_51e6a6788509c] => Array
            (
                [label] => Client logo
                [name] => client_logo
                [type] => image
                [instructions] => 
                [column_width] => 
                [save_format] => url
                [preview_size] => thumbnail
                [order_no] => 1
                [key] => field_51e6a6788509c
            )
    
        [field_51e6a6878509d] => Array
            (
                [label] => Images
                [name] => images
                [type] => repeater
                [instructions] => 
                [column_width] => 
                [sub_fields] => Array
                    (
                        [field_51e6a69f8509e] => Array
                            (
                                [label] => Large image
                                [name] => large_image
                                [type] => image
                                [instructions] => 
                                [column_width] => 
                                [save_format] => url
                                [preview_size] => thumbnail
                                [order_no] => 0
                                [key] => field_51e6a69f8509e
                            )
    
                        [field_51e9070105abe] => Array
                            (
                                [choices] => Array
                                    (
                                        [kitchen] => Kitchen
                                        [lounge] => Lounge
                                        [hallway] => Hallway
                                        [meeting_room] => Meeting Room
                                        [bathroom] => Bathroom
                                        [reception] => Reception
                                        [bedroom] => bedroom
                                    )
    
                                [label] => Location
                                [name] => location
                                [type] => select
                                [instructions] => 
                                [column_width] => 
                                [default_value] => 
                                [allow_null] => 0
                                [multiple] => 0
                                [order_no] => 1
                                [key] => field_51e9070105abe
                            )
    
                    )
    
                [row_min] => 0
                [row_limit] => 
                [layout] => table
                [button_label] => Add Row
                [order_no] => 2
                [key] => field_51e6a6878509d
            )
    
    )

    What I basically want is to output the ‘choices’ array from the above. I’ve taken a look into multidimensional arrays and understand them (ish!), but not when they’re this deep. Do you know how I can output the ‘choices’?

    Thanks again

  • Hi @cerulean

    If you create a post, select the correct category and save the post. Does the reloaded page show the fields?

  • Hi @wkerfoot

    Thanks for the info.

    This is a current limitation of the ACF plugin, and it may also be out of scope for the plugin itself…

    Read up on the update_field function. It may reveal some more info about the reference field ans how you can save it.

  • Hi @christopher88

    All servers have a limit on how much it can do in 1 page load.

    You can increase the limits of your PHP by contacting your host and asking them how to increase the PHP memory, vars per page load and max load time.

    Increasing these values will allow ACF to ‘do more’ and save more fields

  • save_post() works fine in 4.1.8, and doesn’t create any errors. Here’s XDebug Context for ACF 4.1.8 , breakpoint at $f = apply_filters('acf/load_field', false, $k ); in acf.php:save_post( $post_id )

    Inside the loop, 1st iteration (single date and time picker field):

    
    $f = array[18]
    	$f['name'] = (string) dato
    	$f['class'] = (string) date_time_picker
    	$f['time_format'] = (string) H:mm
    	$f['field_group'] = (int) 6583
    	$f['conditional_logic'] = array[3]
    		$f['conditional_logic']['allorany'] = (string) all
    		$f['conditional_logic']['rules'] = array[1]
    			$f['conditional_logic']['rules'][0] = array[2]
    				$f['conditional_logic']['rules'][0]['operator'] = (string) ==
    				$f['conditional_logic']['rules'][0]['field'] = (string) null
    		$f['conditional_logic']['status'] = (int) 0
    	$f['show_week_number'] = (string) false
    	$f['value'] = <string>
    	$f['required'] = (int) 0
    	$f['type'] = (string) date_time_picker
    	$f['id'] = (string) acf-field-dato
    	$f['key'] = (string) field_51d520b7091da
    	$f['label'] = (string) dato
    	$f['picker'] = (string) slider
    	$f['show_date'] = (string) true
    	$f['order_no'] = (int) 0
    	$f['instructions'] = <string>
    	$f['save_as_timestamp'] = (string) true
    	$f['date_format'] = (string) m/d/y
    $v = (string) 7/11/13 7:00
    $post_id = (int) 6640
    $k = (string) field_51d520b7091da
    $this = Acf[1]
    	$this->settings = array[5]
    		$this->settings['path'] = (string) /Users/per/Sites/dev.local/wp-content/plugins/advanced-custom-fields/
    		$this->settings['dir'] = (string) http://dev.local/wp-content/plugins/advanced-custom-fields/
    		$this->settings['upgrade_version'] = (string) 3.4.1
    		$this->settings['hook'] = (string) advanced-custom-fields/acf.php
    		$this->settings['version'] = (string) 4.1.8
    

    Second iteration, date and timepicker field inside a repeater field

    
    $f = array[16]
    	$f['name'] = (string) repeat
    	$f['class'] = (string) repeater
    	$f['field_group'] = (int) 6583
    	$f['conditional_logic'] = array[3]
    		$f['conditional_logic']['allorany'] = (string) all
    		$f['conditional_logic']['rules'] = array[1]
    			$f['conditional_logic']['rules'][0] = array[3]
    				$f['conditional_logic']['rules'][0]['operator'] = (string) ==
    				$f['conditional_logic']['rules'][0]['field'] = (string) null
    				$f['conditional_logic']['rules'][0]['value'] = <string>
    		$f['conditional_logic']['status'] = (int) 0
    	$f['layout'] = (string) table
    	$f['row_min'] = (int) 0
    	$f['button_label'] = (string) Add Row
    	$f['sub_fields'] = array[1]
    		$f['sub_fields'][0] = array[18]
    			$f['sub_fields'][0]['label'] = (string) dato2
    			$f['sub_fields'][0]['name'] = (string) dato2
    			$f['sub_fields'][0]['value'] = <string>
    			$f['sub_fields'][0]['key'] = (string) field_51da7b24dbf9a
    			$f['sub_fields'][0]['instructions'] = <string>
    			$f['sub_fields'][0]['save_as_timestamp'] = (string) true
    			$f['sub_fields'][0]['column_width'] = <string>
    			$f['sub_fields'][0]['order_no'] = (int) 0
    			$f['sub_fields'][0]['id'] = (string) acf-field-dato2
    			$f['sub_fields'][0]['picker'] = (string) slider
    			$f['sub_fields'][0]['class'] = (string) date_time_picker
    			$f['sub_fields'][0]['time_format'] = (string) h:mm tt
    			$f['sub_fields'][0]['type'] = (string) date_time_picker
    			$f['sub_fields'][0]['show_week_number'] = (string) false
    			$f['sub_fields'][0]['show_date'] = (string) true
    			$f['sub_fields'][0]['required'] = (int) 0
    			$f['sub_fields'][0]['date_format'] = (string) m/d/y
    			$f['sub_fields'][0]['conditional_logic'] = array[3]
    				$f['sub_fields'][0]['conditional_logic']['status'] = (int) 0
    				$f['sub_fields'][0]['conditional_logic']['rules'] = (int) 0
    				$f['sub_fields'][0]['conditional_logic']['allorany'] = (string) all
    	$f['required'] = (int) 0
    	$f['type'] = (string) repeater
    	$f['id'] = (string) acf-field-repeat
    	$f['key'] = (string) field_51da7b12dbf99
    	$f['label'] = (string) repeat
    	$f['order_no'] = (int) 1
    	$f['instructions'] = <string>
    	$f['row_limit'] = <string>
    $v = array[2]
    	$v['acfcloneindex'] = array[1]
    		$v['acfcloneindex']['field_51da7b24dbf9a'] = <string>
    	$v[1373458984969] = array[1]
    		$v[1373458984969]['field_51da7b24dbf9a'] = (string) 7/12/13 12:00 am
    $post_id = (int) 6640
    $k = (string) field_51da7b12dbf99
    $this = Acf[1]
    	$this->settings = array[5]
    		$this->settings['path'] = (string) /Users/per/Sites/dev.local/wp-content/plugins/advanced-custom-fields/
    		$this->settings['dir'] = (string) http://dev.local/wp-content/plugins/advanced-custom-fields/
    		$this->settings['upgrade_version'] = (string) 3.4.1
    		$this->settings['hook'] = (string) advanced-custom-fields/acf.php
    		$this->settings['version'] = (string) 4.1.8
    
    

    But I guess this is not really the issue. As said previously, the content exist in post meta but it’s not displayed/populated to the custom field.

    When I open a post, where (in ACF) is data read from post meta (ie, where should I set my breakpoints)?

  • I believe this is the same problem as the one I reported in the old support forum.

    As i mentioned, when I publish the post

    A) update_value() receives the value,

    B) data is stored in “prefix”_postmeta table:

    select * from dev_postmeta where meta_key = 'dato' ORDER BY meta_id DESC LIMIT 1;

    returns the correct value in meta_value (‘dato’ is the field name)

    select * from dev_postmeta where meta_key = '_dato' ORDER BY meta_id DESC LIMIT 1;

    returns the correct field_”number” in meta_value

    C) create_field() creates an empty field on reload after the publish post

  • I think it’s a bit too early to say it’s a time limit issue.

    More likely a connection that did not save correctly between your account and the topic.

    I’ll do some testing and let you know

Viewing 23 results - 126 through 148 (of 148 total)