MarieComet / mc-acf-flexible-template

WordPress plugin makes it possible to save the ACF flexible content fields as templates
71 stars 20 forks source link

Incorrect use of acf.do_action( 'validation_begin' ) #20

Closed acf-extended closed 4 years ago

acf-extended commented 4 years ago

Describe the bug In the file \mc-acf-flexible-template\assets\js\mc-acf-ft-template.js line:195: The code acf.do_action( 'validation_begin' ); is incorrect, as it's not providing form.$el as it should. This can lead to errors if other plugins hook on validation_begin expecting a parameter.

For reference, here is the original hook by ACF: File: \advanced-custom-fields-pro\assets\js\acf-input.js line:13043 acf.doAction('validation_begin', this.$el);

To fix the issue: acf.do_action( 'validation_begin' ); should be replaced by: acf.doAction('validation_begin', $form);

Regards.

MarieComet commented 4 years ago

Thanks for your PR :) Merged in https://github.com/MarieComet/mc-acf-flexible-template/commit/d0cefbb0a60d5ffc816f046902a726c8067b067c