Main menu

AJAX error with progress bars using Bible Module

Forums:

This error was originally reported as an issue with Bible module on the Drupal.org web site by another user. I don't know if the original poster is still having the same problem, but I am getting the same error on my Church web site with the Bible module installed. I am running the latest version of Drupal 7 with version 7.x-1.4 of the Bible module.

Any time a progress bar is displayed (for example: when checking for module updates or running a bulk operation) , I initially see two progress bars at the top of the page. As the progress bars start to update, the first (probably erroneous) progress bar disappears and then I get the following error message:

An AJAX HTTP error occurred.HTTP Result Code: 404 Debugging information follows. Path: NaN&op=updateStatusText: Not FoundResponseText: Page not found | Church of the Master United Methodist (rest of error deleted for space).

If I scroll down past the error box, the second progress bar appears to be operating normally.

I have confirmed that this error is originating with the Bible module since when I disable that module in the admin pages, I do not get the error.

File:

Looking at the original problem report filed on the drupal.org web site about this problem, I noted that the original poster called out an issue with the bible_webimport.js script that is included in your module (quoted below):

I replaced "&op=update" by "&op=update&calling_module=bible" which got reproduced in the error message. So I can't tell you, why or how this code is called so far."

Based on this, I tried importing a new bible to my sight via the web import tab. When running this function, I found that the progress bar worked normally: one progress bar displayed, no AJAX errors.

Further, I commented out the function containing the progress.startMonitoring call in the bible_webimport.js on my testing site and found that when running other Drupal features, the progress bar also worked normally.

Based on that, here is what I think is happening:

Somehow, your progress bar function in bible_webimport.js has gotten hooked into all progress bar invocations in the Drupal installation. When it is being called from your module, it receives the correct parameters and works as expected without error.

When other modules in Drupal call their progress bar routine, your progress bar function is called before the other modules progress bar routine. It generates the duplicate progress bar that I showed you in the screen shot and then, since your function in bible_webimport.js is being called without receiving the correct parameters from your module, it generates the AJAX error from the first progress bar. Meanwhile, the other progress bar continues to work normally.

I think the fix would either be to prevent your bible_webimport.js from hooking into all progress bars in the Drupal site. Or, you could wrap your code with some error checking to prevent your progress bar function from being started if it was not called from the Bible module or if there are invalid parameters.

Please note: I am not familiar enough to help with the programming side of getting this issue fixed, but I can help with testing.

I was away for a week when you posted the fix to the bible_webimport.js script, but I just wanted to let you know that I finally implemented the fix on my site and I have confirmed that it has solved the problem.

Thank you for all of your efforts with this module and for your support.