WordPress.org

Forums

Problem with admin-ajax returning (white) spaces (3 posts)

  1. karlpox
    Member
    Posted 3 years ago #

    Hi,

    I created a plugin which was working fine when suddenly my admin-ajax is not returning the ajax callback function properly anymore. My wp on the server is still working properly, but the one i have in my computer doesnt. i transferred my files from server to local but the problem still exist. My admin-ajax is still retruning white spaces. for example

    function test() {
    echo 'ok';
    die();
    }

    when i alert this with javascript it alerts something like "(space)o(space)k" which make my plugin really useless. any ideas how i can fix this?

  2. karlpox
    Member
    Posted 3 years ago #

    anyways this is a test plugin im using which outputs the "(space)o(space)k"

    [ 50 lines of code moderated. For more than 10 lines of code please pastebin.com instead. ]

    any ideas how i can fix this? this plugin alerts "ok" when its suppose to output bingo. I tried reinstall wordpress in my machine still has the same problem.

  3. karlpox
    Member
    Posted 3 years ago #

    [ 52 lines of code moderated. For more than 10 lines of code please pastebin.com instead. ]

    json seems to be working fine

Topic Closed

This topic has been closed to new replies.

About this Topic