Problem/Motivation
During the batch operation for automatic import of interface translations an ajax error occurs. The batch operation continues. The batch sometimes stalls before it is completed.
Error text (translated back to English): An AJAX HTTP request terminated abnormally. Debugging information follows. Path: /batch?id=3&op=do_nojs&op=do StatusText: error ResponseText: ReadyState: 0
To reproduce:
- Checkout the latest Drupal 8 core dev
- Apply the latest patch of #1848490: Import translations automatically during installation
- Download and unpack the devel module into sites/all/modules/devel
- Install Drupal: in the first step, select Dutch as language. Continue other installation steps as usual, use defaults where possible. (with other languages it fails too)
- Enable the Devel module at admin/modules
- The ajax error occurs immediately after initialisation of the batch. The batch operation continues quickly after the ajax error. You will need to record the screen activity with a video/screencast recording program to watch the actions in detail.
- In the watchdog you will find two occurrences of "File not found: http://ftp.drupal.org/files/translations/8.x/devel/devel-8.x-1.x-dev.nl.po."
In the watchdog you will find 4 php messages: "Undefined variable: old_set in _batch_process() (regel 298 van /Users/erik/www/drupal8/core/includes/batch.inc)", "Undefined variable: finished in _batch_process() (regel 305 van /Users/erik/www/drupal8/core/includes/batch.inc)."
Proposed resolution
to be determined
Comment | File | Size | Author |
---|---|---|---|
#5 | debug-1877820.patch.txt | 5.93 KB | Sutharsan |
Comments
Comment #1
Sutharsan CreditAttribution: Sutharsan commentedI've debuged this problem by logging the various function calls with a millisecond time stamp:
Notice that _batch_page() is called twice with op=start. Compare this with a batch process without an error:
The 'File not found: http://ftp.drupal.org/files...' is normal behaviour. locale_translation_batch_status_fetch_remote() checks a po file at the translation server, but it does not exist.
Comment #2
nod_tzg
Comment #3
Sutharsan CreditAttribution: Sutharsan commentedAn other test run gave the result below. In this the batch is started for a second time (op=start) even before the first batch operation (locale_translation_batch_status_fetch_remote()) got executed.
Logging of locale_translation_http_check() was added after the test in #1 and logs the moments before and after the drupal_http_request() function call.
Comment #4
Sutharsan CreditAttribution: Sutharsan commentedputting back the tag nod_ added.
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedThis is a patch of the debug calls I used to make the above timeline in the watchdog.
Comment #5.0
Sutharsan CreditAttribution: Sutharsan commentedAdded error message
Comment #6
knalstaaf CreditAttribution: knalstaaf commentedI'm having a similar issue on D7 (checking for translations, but for modules updates as well). Could this be hosting-related?
Comment #7
Sutharsan CreditAttribution: Sutharsan commented@knalstaaf, I guess you are referring to using Localization Update module in D7. Please create an issue in that issue queue, and I'll be happy to help you debugging this problem.
Comment #8
knalstaaf CreditAttribution: knalstaaf commentedSorry for the noise, I came in via a search engine unaware that this was a core-topic. Coincidentally it turned out to be unrelated to the Localization Update module after all (which I thought this topic was about indeed). It's solved by now by a DNS-configuration of the host: #2297765: Error when checking for updates: AJAX HTTP request terminated abnormally; ReadyState: 0
Comment #19
quietone CreditAttribution: quietone at PreviousNext commentedI tested this on 9.5.x and was not able to reproduce this error. There were no errors in the log.
Therefore, closing as outdated.
f you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!