mcguffin / acf-quickedit-fields

WordPress Plugin implementing Column Displaying, QuickEdit and BulkEdit for Advanced Custom Fields (ACF)
https://wordpress.org/plugins/acf-quickedit-fields/
GNU General Public License v3.0
359 stars 49 forks source link

Search button disabled on quick edit update #136

Closed lifexmarketing closed 7 months ago

lifexmarketing commented 1 year ago

We're using ACF QuickEdit Fields 3.2.3 with ACF Pro 6.0.7 on WooCommerce 7.1.0, on WordPress 6.0.3. Quick edit has been working fine, but now when we quick edit a product and click the Update button, the product search field button is immediately disabled. HTML before update is as follows:

<input type="submit" id="search-submit" class="button" value="Search products">

Immediately after clicking the Update button for Quick Edit, HTML is as follows:

<input type="submit" id="search-submit" class="button disabled" value="Search products" disabled="disabled">

When we reload the page, the search button works again. If we remove the disabled="disabled" without reloading the page, the search button also works.

When the ACF QuickEdit plugin is disabled, we can quick-edit the non-ACF fields and the search button is not disabled.

Any guidance is appreciated.

abdul891 commented 1 year ago

Any solution available for this

lifexmarketing commented 1 year ago

The underlying issue isn't fixed, to my knowledge. Our dev team pointed toward a bug in ACF Pro, not ACF Bulk Edit. They added a JavaScript workaround, which we load via a custom plugin on the admin backend. The JavaScript is as follows: window.addEventListener('DOMContentLoaded', () => { if (acf) { const orgValidateForm = acf.validateForm acf.validateForm = function () { if (arguments.length > 0) { const formData = arguments[0]; if (formData.form && formData.form.length > 0) { const form = formData.form[0] if (form.id == 'posts-filter') return true; } } return orgValidateForm(...arguments) } } })

domenturek commented 1 year ago

We are experiencing the same problem, after quick editing the Post, the "Search Posts" button gets disabled in the same way as @lifexmarketing mentioned. Thank you also for this temporary fix!