Steps to reproduce this error :-

1) Create a view page display, set path for the page.
2) Include fields, Title field and views row counter field, Save view.
3) Check the url of the page display, it will produce following error.

Warning: Missing argument 1 for Drupal\views\Plugin\views\pager\PagerPluginBase::set_offset(), called in C:\wamp\www\drupal-8.x-dev\core\modules\views\lib\Drupal\views\Plugin\views\field\Counter.php on line 55 and defined in Drupal\views\Plugin\views\pager\PagerPluginBase->set_offset() (line 84 of core\modules\views\lib\Drupal\views\Plugin\views\pager\PagerPluginBase.php).

Please check the attached screen shot for the errors which i can see on my screen.

Files: 
CommentFileSizeAuthor
#11 vdc-1830828-10.patch13.74 KBPancho
PASSED: [[SimpleTest]]: [MySQL] 57,763 pass(es).
[ View ]
#6 vdc-1830828-6.patch14.5 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 57,417 pass(es).
[ View ]
#4 vdc-1830828-4-fail.patch7.95 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 57,223 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#4 vdc-1830828-4.patch12.71 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 57,058 pass(es).
[ View ]
#1 drupal-1830828-1.patch800 bytesdawehner
PASSED: [[SimpleTest]]: [MySQL] 48,751 pass(es).
[ View ]
views-result-counter.png167.09 KBtajinder.minhas

Comments

Status:Active» Needs review
Issue tags:+Needs tests
StatusFileSize
new800 bytes
PASSED: [[SimpleTest]]: [MySQL] 48,751 pass(es).
[ View ]

Thanks for reporting!

Posting the fix, but i think this should be able tested so the fail never happens again

Your welcome dawehner,

I want to be more active in community, so finding the ways for me. I found checking drupal8 interesting so was working on it. Maybe you can suggest better way to get involved in the community.

Welcome in the community!

So one way how you could get involved is to write tests for that issue.

The idea behind is to write code, which checks the expected output.
The file in which the tests for that field exists is http://api.drupal.org/api/drupal/core!modules!views!lib!Drupal!views!Tes...
so feel free to improve them. Feel free to ask if you need more information.

Issue tags:-Needs tests+phpunit, +VDC
StatusFileSize
new12.71 KB
PASSED: [[SimpleTest]]: [MySQL] 57,058 pass(es).
[ View ]
new7.95 KB
FAILED: [[SimpleTest]]: [MySQL] 57,223 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Let's replace the existing tests with phpunit and extend it with pager related tests.

+++ b/core/modules/views/tests/Drupal/views/Tests/Plugin/field/CounterTest.phpundefined
@@ -0,0 +1,139 @@
+  public function testGetValue() {

i am not sure whether we could break this test up so we dont duplicate code?

especially this for loop is 3 times the same code

StatusFileSize
new14.5 KB
PASSED: [[SimpleTest]]: [MySQL] 57,417 pass(es).
[ View ]

Really good idea!!

So what about something like that?

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

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

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

#6: vdc-1830828-6.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

definitely better now, i canm understand whats going on

+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.phpundefined
@@ -424,7 +424,10 @@ public function __construct(ViewStorageInterface $storage) {
+    // @todo Make views.module.css a library.
+    if (function_exists('drupal_get_path')) {
+      $this->element['#attached']['css'][] = drupal_get_path('module', 'views') . '/css/views.module.css';
+    }

this will be fixed @ #2005616: Views should use ['#attached']['library'] rather than ['#attached']['css']

whichever goes in first the other will be rerolled

Status:Reviewed & tested by the community» Needs work

issue above committed

Status:Needs work» Needs review
StatusFileSize
new13.74 KB
PASSED: [[SimpleTest]]: [MySQL] 57,763 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

thank you

Status:Reviewed & tested by the community» Fixed

Committed bf1b3d2 and pushed to 8.x. Thanks!

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

Issue summary:View changes

I have mentioned the steps how to reproduce the issue which i have raised.