Well that was tricky. This was the offending code that was generated a line feed to the response.
add_action('wp_ajax_nopriv_display_event_info', 'DisplayEventInfoBox');
?>
<?php
function displayStepHeader($isValid, $pos)
I changed it to
add_action('wp_ajax_nopriv_display_event_info', 'DisplayEventInfoBox');
function displayStepHeader($isValid, $pos)
and all is well. I have no idea why that was an issue but how I tracked it down may be useful for someone else. I simply put echo ‘a’; between the function definitions until the first character I received was an ‘a’ and not char 10 (line feed).
This was also caused “Warning: Cannot modify header information – headers already sent” because the first character sometimes wasn’t < but a line feed.
Hopes this helps someone else out one day…
Related Posts:
- Passing JSON data from WP Query into AJAX causing NULL errors
- Creating a Multi-Level Associative Object Using AJAX
- Retrieve Json data and create multiple pages with it
- Can’t pass var from php wp_ajax into ajax script : result undefined or null
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- wp_send_json erase last value
- AJAX Filter WHILE Loop not working WordPress
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- Woocommerce – how can i add items to cart using onclick – multiple items at once with custom prices
- how to make custom ajax handler?
- [jQuery]Adding shortcode
- PHP > Scheduled Tasks > Sending daily email with dynamic API variables
- Display parent and child taxonomies in separate drop down select fields
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Plugins not working on AJAX requests
- Fetching instagram api not working on wordpress
- Fancybox type popup window that’s not an iframe
- Using Select HTML in Bootstrap Popovers
- How to disable controls in theme customizer?
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- how to update and display an option without reloading the page
- How do I Import / Upload Files with jQuery AJAX?
- WordPress admin-ajax.php 400 bad request
- WordPress Ajax Call inserting data but success response false
- Loading php file with AJAX in WordPress frontend
- wp ajax return 0
- Ajax contact form return 0
- WordPress plugin: render only page content using ajax call
- AJAX – Returning Two JSON Objects with One PHP Function
- Pull GetOption() variable into jQuery dynamically created html
- Get the URL of the page from which an ajax request has been launched within ajax callback
- JSON REST API WordPress only showing first 10 categories
- unable to use ‘new WP_Query’ in AJAX call
- admin-ajax Firing Error 400 When Logged In
- AJAX button action in foreach
- is_user_logged_in() not working in AJAX validation call
- Unset session variable on page reload / setup but exclude AJAX
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress ajax-action failing because of newline in response
- Making an AJAX call to refresh a table
- HTML escaping data with ajax requests
- WordPress Ajax Always returning 0
- Using data sent via AJAX in multiple functions on a WP plugin
- Problem with AJAX in wordpress plugin
- load ajax using admin-ajax.php
- Ajax button not working
- Function won’t run onclick using Ajax
- How to keep track of when a vote is cast?
- WordPress plugin admin page – using WordPress function in linked php file
- Load Posts on Click via Ajax into a DIV
- set post limit at load more ajax wordpress
- Use value from Ajax call in PHP function
- Woocommerce with Lazy Load php and ajax
- How to deal with too many $_POST variable conditions from ajax request at backend? [closed]
- Simple AJAX notification when the new post is added to the database
- AJAX wp_insert_user WORKS but responds with “The site is not enabled”
- Short code template + ajax
- Ajax filter button display all posts
- Can I make get_users() query global?
- Compare $_POST returned values with term array
- Is it possible to create new user from external form using REST API?
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- WordPress REST API register_rest_route give a 500 error
- How to use AJAX to call php page with parameter
- Get related product based on subcategory selected from category id with ID 142
- A $_POST should occur when submit form but is not?
- When echo follow Ajax button inside Ajax pagination template not working?
- My jQuery Ajax form submit is still refreshing page?
- jQuery Ajax PHP function call returning [object Object]
- admin-ajax GET response bad request
- Shortcode to pull posts
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- Calling PHP Scripts in Ajax that are in PHP Snippets
- javascript variable to wordpress php variable
- Post not populating for custom post type based on category selection
- entire JS folder not loading in a WP theme
- SOAP Request/Parsing XML From wp_send_json_success
- Output votes to div dynamically in wordpress
- Get uploaded image and attach it to the new post
- Cannot access $wpdb, comes back NULL
- Admin-ajax php not working on new wordpress version
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- WP_Query with AJAX returning empty array
- Incrementing PHP variable onclick to display posts by month
- How to clone all WordPress Rest API end points
- Proper way to use WordPress function with AJAX PHP file
- Errors being created by admin-ajax.php
- Loading Posts & Category with Ajax
- PHP error with a shortcode: “no suitable wrapper” for file_get_contents
- How to use AJAX in WordPress in MYSQL query?
- Simple jQuery AJAX Request fails to run PHP Script
- Convert canvas to image and upload image to server
- How to get post category list as select in front-end?
- Live search from database table
- Processing ajax call to php to insert into mysql database
- PHP Warning: Missing argument 2
- Allow user to Upload image and manipulate it on the frontend
- Is there a hack for using is_page() within the function.php file?