Problem/Motivation

In the browser devtools console there appears this error:

xhr.responseJSON.forEach is not a function .

Is produced by this line of code:

Looks like is expecting always a JSON response but sometimes AJAX responses returns other types of data. For example a plain text.

Proposed resolution

Check the ajax response data type is a JSON.

Issue fork usage_data-3367199

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarlopesino created an issue. See original summary.

omarlopesino’s picture

Status: Active » Needs review

MR done with the fix, please review!

b_sharpe made their first commit to this issue’s fork.

  • omarlopesino committed 64262cd8 on 2.0.x
    Issue #3367199: Javascript error:  xhr.responseJSON.forEach is not a...
b_sharpe’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.