Support

Account

Forum Replies Created

  • I also tried deactivating all plugins except for ACF Pro during this process. So I was at a loss as to what could be the issue.

    What I then tried was to bring up my local dev environment version of the website and decided to leave the database untouched but synchronize the custom field groups with the acf-json files. When I did that, even though the field group in question had changed dramatically and the synchronization added to older unused versions of the field group, the field group showed the missing layout.

    So I’m not sure what exactly was the issue but it seems that the pending synchronization with acf-json caused some issue. Once I did the same action on the live server, the layout showed correctly. Additionally, I was able to delete the old field groups that synchronized without harming my other data etc.

  • @hube2 thanks for the quick response. I don’t believe that is the problem since I just updated the phprc, which is what this Dreamhost server is using, to include the following:

    ; {{{ The following lines were automatically added by DreamHost
    zend_extension=opcache.so
    memory_limit=500M
    ; }}} That's all from DreamHost
    
    max_input_vars = 5000
    max_input_nesting_level = 128
    max_execution_time = 300
    post_max_size = 32M
    max_input_time = 300
    suhosin.post.max_vars = 8000
    suhosin.request.max_vars = 8000

    I can verify that everything except the suhosin settings are applied. I’ve tried updating both post and custom field group and nothing is changing. Anything else you can think of?

  • So the code above provided by @ihorvorotnov to hook on muplugins did not work for me but ffraenz/private-composer-installer that he suggested did to install the plugin via composer.

    In order to include the plugin in my theme, I first changed the package type to library, instead of wordpress-plugin, that way it installs in the vendor folder since I had to use composer within my theme (see below).

    Then I used this official resource and just replaced the paths with those that composer creates i.e., /vendor/advanced-custom-fields/advanced-custom-fields-pro/.

    The use-case is that I scaffold many projects the same way and it’s always been a PITA to have a scaffold that requires I install both Timber and ACF Pro to get up and running; I mean what’s the point of a scaffold if it doesn’t scaffold everything that’s needed.

    Since Timber is either installed as a WordPress plugin from WordPress (what I want to avoid) or via composer from within the theme and not as a "type": "wordpress-plugin", which means that it won’t install into wp-content/plugins/ annoyingly enough, either Yeoman would have to run two composer installs, one in the root directory of WordPress and the other from within the theme, or I had to figure out how to combine them. The easiest way is to include ACF Pro in the theme, plus I like that it is locked down since all my work is premium custom-tailored theme development.

  • So the way I ended up implementing this was using the acf/validate_save_post action and removing all Javascript validation. By using acf/validate_save_post, you can return Javascript errors using acf_add_validation_error('acf[field_4a5c3fe1d1]', 'some error description');. Notice that you have to use acf[field_id] in this, you cannot use a post value UNLESS it is an additional field in the front end form. This took a day of debugging and I would love it if the documentation was updated for this use case. For those of you trying this and slamming your head against the wall, just make sure to use acf/validate__save_post, acf_add_validation_error, and use the field ID if it is part of the post’s custom fields. Good luck!

  • I’m trying to use

    acf.validation.disableSubmit($submit);
    acf.validation.showSpinner($spinner);

    And

    acf.validation.enableSubmit($submit);
    acf.validation.hideSpinner($spinner);

    And nothing doing. I can disable the submit and show the spinner but I cannot enable submit and hide the spinner. Where is the documentation on these functions?

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