WordPress.org

Forums

WebLibrarian
[resolved] Ajax Error? (23 posts)

  1. toomeya
    Member
    Posted 1 year ago #

    I'm attempting to connect patron IDs with the enrolled WordPress users and I get an error that says:
    Ajax error: No Data Received

    How do I fix this? The only ID I have managed to change is the patron ID for the librarian account itself. I also can't remove the IDs either.

    I'm on the screen that says "Add Patron Ids to Users" within the main WordPress login, but I also tried it within the librarian account with the same results.

    Any help would be great. Thanks,
    Amanda Toomey

    http://wordpress.org/plugins/weblibrarian/

  2. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    What web browser are you using? What version? What desktop O/S?

    What operating system is your server running? What Version? What is your server running for a web server? What Version? What version of PHP? What version of MySQL? What version of WordPress? What version of the Web Librarian?

    I cannot replicate this error with my test site.

  3. toomeya
    Member
    Posted 1 year ago #

    I am using Windows 7 with Chrome version 30.0.1599.101m.
    I don't have all the server details, because the server is maintained by another IS department, but I believe it's a Linux/Unix based server.
    We are running WordPress 3.6.1 and Web Librarian 3.2.9.9

  4. toomeya
    Member
    Posted 1 year ago #

    I just tried in Firefox and IE and it doesn't work in either of those browsers either.

  5. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    OK, please try to find out what O/S the server is running, etc. This error *suggests* that the server is a Windows Server, possibly running IIS. That is a *bad* combination. Windows Server and IIS are strange beasts and have various issues.

  6. toomeya
    Member
    Posted 1 year ago #

    I contacted IS and we are running a Linux server. I am attempting to get the exact version.

  7. toomeya
    Member
    Posted 1 year ago #

    I'm also getting the same Ajax error when I try to put a hold on an item.

  8. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    Please try this:

    In the location field of a web browser (not in any search field!) enter this URL:

    http://<your WP hostname>/wp-content/plugins/weblibrarian/UpdatePatronID.php

    (Replace <your WP hostname> with your actual WordPress host name.)

    And let me know what you get. You *should* get an XML response (it might ask you to login to your WP site) that looks like:

    <?xml version="1.0" ?><answer><userid></userid><patronid></patronid></answer>

    If you get something else (or any sort of error message), let me know.

  9. toomeya
    Member
    Posted 1 year ago #

    I got the login page to come up, but when I log in it says:

    "Fatal error: Call to undefined function wpcf7_add_tag_generator() in /var/www/education/wp-content/plugins/hashcash-for-contact-form-7/wpcf7_wphc.php on line 138"

  10. toomeya
    Member
    Posted 1 year ago #

    Ok, I shut off the plugin that was causing that error, but now when I click on the "Update ID" button it doesn't do anything at all.

  11. toomeya
    Member
    Posted 1 year ago #

    Ok, I refreshed the page and now they've updated. Is there a way to have it give me some sort of visual signal that the data has been updated?

    Thanks for the help!

  12. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    It is supposed to update -- that is how AJAX works :-). Can you try to run the UpdatePatronID.php URL with the conflicting plugin turned off? Something else seems to be broken. The conflicting plugin issue seems weird -- there might be something else broken somewhere.

  13. toomeya
    Member
    Posted 1 year ago #

    I've got the conflicting plugin turned off and that's what allows me to use the update button, but nothing happens on the screen until I refresh the page. We can work with it this way, I'm just not sure why I'm not seeing the updates as soon as I hit the button.

  14. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    Something is causing the php code to either crash or not send the proper XML. Please run the php code outside of the AJAX (JavaScript). This should provide some sort of error message or something, which should explain what is happening.

    As a random guess, there might be another plugin causing trouble or something weird in your server's settings or something (like a bad version of PHP, MySql, Apache, etc.).

  15. toomeya
    Member
    Posted 1 year ago #

    I don't know how to run the code outside of the AJAX within wordpress.

  16. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    Just run the

    http://<your WP hostname>/wp-content/plugins/weblibrarian/UpdatePatronID.php

    URL in the location bar of your web browser -- the same way you got the error about the conflicting plugin. I expect there to be another (different) error message, which will help narrow down the problem.

  17. toomeya
    Member
    Posted 1 year ago #

    Now it says:

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <answer>
    <userid/>
    <patronid/>
    </answer>

  18. Robert Heller
    Member
    Plugin Author

    Posted 1 year ago #

    OK, that is actually the correct response. I don't know what the update is not refreshing the display automatically.

  19. toomeya
    Member
    Posted 1 year ago #

    Hmm...

    Well thanks for all the help anyway. I think for now I'll just let the other administrator know that it is working, but just not displaying automatically.

  20. hydroplane
    Member
    Posted 10 months ago #

    Hello there! I'm testing the plugin on XAMPP and I'm receiving the same error. UpdatePatronID.php says

    This page contains the following errors:
    error on line 4 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    That's it, just this. What can I do?

    download Ok, switched to the default theme so that fixed the problem. All the other plugins are disabled and I'm getting
    <answer>
    <userid/>
    <patronid/>
    </answer> as the other user.

  21. Robert Heller
    Member
    Plugin Author

    Posted 10 months ago #

    What is XAMPP?

  22. hydroplane
    Member
    Posted 10 months ago #

    XAMPP
    Don't know much about the techie stuff but basically it's like a web server (?) on your pc. I use it develop and check a website before putting it up online. A sandbox if you want to call it that. In this case I'm running a copy a wordpress + your plugin. The address of my site is usually someting like http://localhost/mysite

  23. Robert Heller
    Member
    Plugin Author

    Posted 10 months ago #

    Well, since I run CentOS 5 (a version of Linux) on my desktop, I just installed Apache, MySQL, and PHP53, so my desktop machine is a LAMP server, exactly like my virtual server. I also run a DNS server on it and run multiple virtual web sites (again, just like my virtual server). So I have a test server that is exactly like my production server.

    I take it XAMPP is some sort of MS-Windows thingy? I wonder if there is some sort of MS-Windows weirdness going on, not that there is much I can do about it, since I don't have any MS-Windows machines to test things on. I do understand that both PHP and MySQL under MS-Windows behave slightly differently than under Linux -- they are built slightly differently, both because of different compile time flags and some operating system differences.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WebLibrarian
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic