Problem/Motivation

The total count is not returned along with the view.

Proposed resolution

Add the count field to the meta section of the response, like in jsonapi_extras.

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

blazey created an issue. See original summary.

blazey’s picture

Assigned: blazey » Unassigned
Status: Active » Needs review
StatusFileSize
new2 KB
deciphered’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

I have manually tested this, and I can see the existing tests are passing. Great work.

It will need tests added.

deciphered’s picture

I've added two patches, a test only to fail and the combined patch.

There are commented out tests in the patch, as the numbers don't appear correct based on the test data, and in cases where a display doesn't have a pager it returns null instead of a total count.

More work will be required.

deciphered’s picture

Status: Needs work » Needs review
StatusFileSize
new7.66 KB

Updated patch with fix for null counts, and updated tests.

deciphered’s picture

Status: Needs review » Fixed

Committed. Thanks for the patch @blazey.

Status: Fixed » Closed (fixed)

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