Here's a small patch that fixes an issue that caused me many Javascript errors. It was caused by Views JSON returning an empty HTML page when the result is empty, rather than an empty JSON object.

The fix was just to add 'even empty' => TRUE into views_json_views_plugins().

I've done the same with the other views (XML etc) as that seems to make sense there too.

CommentFileSizeAuthor
#1 views_datasource-747246.patch2.54 KBdarrenmothersele

Comments

darrenmothersele’s picture

StatusFileSize
new2.54 KB

My patch didn't attach the first time, trying again.

allisterbeharry’s picture

Assigned: Unassigned » allisterbeharry
Status: Needs review » Fixed

Thanks for the patch, committed in views_xml and views_json.

Status: Fixed » Closed (fixed)

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