Support

Account

Home Forums ACF PRO Can't update plugin or fields

Solving

Can't update plugin or fields

  • I am using ACF PRO for a client site. One of the many custom fields I set up no longer takes input. When the client presses update it spins and then we get the white screen. This particular repeater field has many entries. Is there a limit to the number of entries you can do?

    I though maybe the plugin needed updating but when I try, it says I don not have sufficient permissions to view this page.

    Any ideas on how to fix this would be greatly appreciated.

    Thanks!

  • Hi @gwenzez

    Thanks for the question.

    There is no limit to the number of custom fields that can be added to a field group or in your case the repeater. Your server might be terminating the save process before ACF completes its job, you will need to increase the max_vars PHP setting. You can make the following changes to your php.ini file:

    max_input_vars = 3000
    suhosin.get.max_vars = 3000
    suhosin.post.max_vars = 3000
    suhosin.request.max_vars = 3000

    The WSOD might also be as a result of a plugin conflict, please deactivate all other installed plugins and switch to one of the stock WP themes to check if the issue will still pop up.

    To update the plugin you will need to log in as an admin.

  • @gwenzez,

    I’ve recently had the same issue with a client site. On one field group there is a repeater that has a huge number of fields to meet their requirements. At a certain point the page just times out. This is not a limitation with ACF per se, it is really a limitation in WP due to the way it updates custom fields.

    Each field in ACF causes an update_post_meta() function call and each of these function calls creates a new database request. At some point the number of database requests just becomes too much and the page load times out.

    There is a work-a-round. If you set the time limit on scripts significantly high enough set_time_limit(0); the server will continue to process the data after the page load has timed out. The reason it does this is that PHP does not test to see if the user has disconnected until it tries to send data and since PHP does not try to send data until after all the database processing is done it blissfully continues processing.

    These are the steps to take when this is happening
    1) Initially publish or save the post with minimal data
    2) When a timeout occurs, click the browser back button
    3) DO NOT click the publish/update button
    4) Reload the page until all of the changes appear

  • Thanks for the input guys!

    It definitely seems to be a timeout sort of issue… the WSOD is now showing up before I even try and update a field. I turned on debug and it says “Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in …filepath/meta.php on line 829”.


    @james

    I’m not familiar with editing the php.ini file. I searched and mine is in my MAMP files and assume that editing this would have no effect on the client. Would the file I need to edit be on their server?

    As far as updating the plugin goes, I am indeed logged in as an admin but it still won’t let me… weird.


    @John
    Huebner
    Where would I set set_time_limit(0);? Is that in the php.ini file as well?

    Thanks for helping out the php newbie!
    G

  • You can set the time limit is several places, php.ini, in the .htaccess file if the host allows it or in a php file. I’m afraid that the worse issue is the memory limit error. 268435456 = 256MB. You can increase the allowed memory in the same places, you can try increasing it but some hosting providers have a max on this and it is also limited by the physical memory of the server.

    http://davidwalsh.name/increase-php-memory-limit-ini_set

    http://php.net/manual/en/function.set-time-limit.php

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Can't update plugin or fields’ is closed to new replies.