View's more link is sometimes shown even when it is not enabled. Steps to reproduce: install drupal, create two articles, edit frontpage view's items per page to 1 (see "More link: No" setting), goto front page and the more link is shown.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

olli’s picture

Status: Active » Needs review
FileSize
1.85 KB
980 bytes
olli’s picture

Title: More link is rendered when disabled » More link is rendered when set to "No"
Issue tags: +VDC
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice!!

catch’s picture

Issue tags: -VDC

#1: drupal-2010060-1.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +VDC

The last submitted patch, drupal-2010060-1.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.85 KB

Just a rerole.

Status: Needs review » Needs work

The last submitted patch, vdc-2010060-6.patch, failed testing.

olli’s picture

Status: Needs work » Needs review
FileSize
4.06 KB
3.25 KB
1.88 KB

Spotted another one.

Status: Needs review » Needs work
Issue tags: -VDC

The last submitted patch, vdc-2010060-8.patch, failed testing.

olli’s picture

Status: Needs work » Needs review

#8: vdc-2010060-8.patch queued for re-testing.

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

The last submitted patch, vdc-2010060-8.patch, failed testing.

olli’s picture

Status: Needs work » Needs review
FileSize
4.96 KB
924 bytes

Looks like that spot makes the lite pager execute count query.

dawehner’s picture

Thank you very much, this is looking great now.

Just to be sure it would be cool if you could upload the latest patch without the fixes (just to proove that stuff fail without it).

Status: Needs review » Needs work

The last submitted patch, vdc-2010060-12.patch, failed testing.

olli’s picture

Status: Needs work » Needs review
FileSize
5.87 KB
3.28 KB
936 bytes

Thanks for the review. Here is a new version and a failing patch. This adds the check for count query to the mini pager test.

damiankloip’s picture

+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.phpundefined
@@ -195,6 +195,36 @@ public function testReadMore() {
+    $this->assertIdentical($view->get_total_rows, NULL, 'The query was not forced to calculate the total number of results.');
+    $this->assertIdentical($view->total_rows, NULL, 'The query did not return the total number of rows.');

These have been added to MiniPagerTest too, which I think is the right place for it. I think we can remove it them from here? Otherwise, looks good to go.

dawehner’s picture

Status: Needs review » Needs work

Good point damian!

olli’s picture

Status: Needs work » Needs review
FileSize
768 bytes
5.64 KB

Thank you! This fixes #16.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0e0d2f6 and pushed to 8.x. Thanks!

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