pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

pods_admin_submit_validation with ajax #5431

Open SharmPRO opened 5 years ago

SharmPRO commented 5 years ago

Describe the bug if i put an Ajax call into pods_admin_submit_validation function, there is no way to make pods waiting for result, so it always return 'undefined' to the calling script. To Reproduce create function pods_admin_submit_validation(function(valid_form, $submittable ){ make an ajax call return true or false the calling script jquery.pods.js will receive always 'undefined' on lines 128 and 226

Expected behavior receive validation from custom call

Pods Version

Pods - Custom Content Types and Fields: 2.7.14

WordPress Environment

` ### wp-core ### version: 5.2.2 site_language: en_US user_language: en_US permalink: /%postname%/ https_status: false user_registration: 1 default_comment_status: closed multisite: false user_count: 4 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net wordpress_size: 48.17 MB (50509711 bytes) uploads_path: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/uploads uploads_size: 33.07 MB (34675934 bytes) themes_path: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/themes themes_size: 23.29 MB (24420106 bytes) plugins_path: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/plugins plugins_size: 47.35 MB (49653246 bytes) database_size: 12.75 MB (13369344 bytes) total_size: 164.63 MB (172628341 bytes) ### wp-active-theme ### name: Vip Diving College - Avada Child version: 5.9.1 author: ThemeFusion author_website: http://themeforest.net/user/ThemeFusion parent_theme: Avada theme_features: fusion-builder-options, title-tag, automatic-feed-links, custom-header, custom-background, woocommerce, wc-product-gallery-slider, wc-product-gallery-lightbox, post-formats, post-thumbnails, fusion-builder-demos, wp-block-styles, menus, widgets theme_path: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/themes/Avada ### wp-themes (2) ### Avada: version: 5.9.1, author: ThemeFusion Twenty Nineteen: version: 1.4, author: the WordPress team ### wp-plugins-active (9) ### Classic Editor: version: 1.5, author: WordPress Contributors Contact Form 7: version: 5.1.3, author: Takayuki Miyoshi Fusion Builder: version: 1.9.1, author: ThemeFusion Fusion Core: version: 3.9.1, author: ThemeFusion LayerSlider WP: version: 6.8.4, author: Kreatura Media Pods - Custom Content Types and Fields: version: 2.7.14, author: Pods Framework Team Polylang: version: 2.6.2, author: WP SYNTEX User Role Editor: version: 4.51.2, author: Vladimir Garagulya User Specific Content: version: 1.0.6, author: Bainternet ### wp-plugins-inactive (3) ### Advanced Custom Fields PRO: version: 5.6.10, author: Elliot Condon Contact Form 7 Polylang extension: version: 2.3.1, author: Aurovrata V. Lingotek Translation: version: 1.4.3, author: Lingotek and Frédéric Demarle ### wp-media ### image_editor: WP_Image_Editor_GD imagick_module_version: Not available imagemagick_version: Not available gd_version: bundled (2.1.0 compatible) ghostscript_version: not available ### wp-server ### server_architecture: Darwin 17.7.0 x86_64 httpd_software: Apache/2.4.27 (Unix) OpenSSL/1.0.2l PHP/7.1.9 mod_perl/2.0.8-dev Perl/v5.16.3 php_version: 7.1.9 64bit php_sapi: apache2handler max_input_variables: 48000 time_limit: 300 memory_limit: 1024M max_input_time: 60 upload_max_size: 1024M php_post_max_size: 1024M curl_version: 7.45.0 OpenSSL/1.0.2l suhosin: false imagick_availability: false htaccess_extra_rules: false ### wp-database ### extension: mysqli server_version: 5.5.5-10.1.26-MariaDB client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $ ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content WP_PLUGIN_DIR: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/plugins WP_MAX_MEMORY_LIMIT: 1024M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable ### pods ### pods-server-software: Apache/2.4.27 (Unix) OpenSSL/1.0.2l PHP/7.1.9 mod_perl/2.0.8-dev Perl/v5.16.3 pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 pods-session-save-path: /Applications/XAMPP/xamppfiles/temp/ pods-session-save-path-exists: Yes pods-session-save-path-writable: Yes pods-session-max-lifetime: 1440 pods-opcode-cache-apc: No pods-opcode-cache-memcached: No pods-opcode-cache-opcache: Yes pods-opcode-cache-redis: No pods-object-cache-apc: No pods-object-cache-apcu: No pods-object-cache-memcache: No pods-object-cache-memcached: No pods-object-cache-redis: No pods-memory-current-usage: 58.939M pods-memory-current-usage-real: 6.000M pods-network-wide: No pods-install-location: /Applications/XAMPP/xamppfiles/htdocs/www.vipdivingcollege.net/wp-content/plugins/pods/ pods-developer: No pods-tableless-mode: No pods-light-mode: No pods-strict: No pods-allow-deprecated: Yes pods-api-cache: Yes `
issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label Type: Bug to this issue, with a confidence of 0.74. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

JoryHogeveen commented 5 years ago

Hello @SharmPRO Could you provide a bit more info about your situation so we can try to reproduce?

Eg. How are you triggering the ajax call?