Files: 
CommentFileSizeAuthor
#13 drupal-viewsRename-default_action-2002438-13.patch2.09 KBheddn
PASSED: [[SimpleTest]]: [MySQL] 58,111 pass(es).
[ View ]
#8 renamed-default-action-2002438-8.patch1.58 KBtheladebug
FAILED: [[SimpleTest]]: [MySQL] 55,571 pass(es), 18 fail(s), and 6 exception(s).
[ View ]
#4 rename-views-method-default-action-2002438-4.patch1.09 KBtheladebug
FAILED: [[SimpleTest]]: [MySQL] Fetch test patch: failed to retrieve [rename-views-method-default-action-2002438-4.patch] from [drupal.org].
[ View ]
#2 rename-views-method-default_action-2002438-2.patch1.07 KBmalcomio
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]

Comments

malcomio’s picture

Assigned:Unassigned» malcomio
Status:Active» Needs work
malcomio’s picture

Status:Needs work» Needs review
StatusFileSize
new1.07 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]
oenie’s picture

Status:Needs review» Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.phpundefined
@@ -651,7 +651,7 @@ function default_summary_form(&$form, &$form_state) {
+  function defaultAction($info = NULL) {

Add protected access modifier in front of the functions to adher to the new OOP standards.

theladebug’s picture

Status:Needs work» Needs review
StatusFileSize
new1.09 KB
FAILED: [[SimpleTest]]: [MySQL] Fetch test patch: failed to retrieve [rename-views-method-default-action-2002438-4.patch] from [drupal.org].
[ View ]

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

The last submitted patch, rename-views-method-default-action-2002438-4.patch, failed testing.

theladebug’s picture

Status:Needs work» Needs review

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

The last submitted patch, rename-views-method-default-action-2002438-4.patch, failed testing.

theladebug’s picture

Status:Needs work» Needs review
StatusFileSize
new1.58 KB
FAILED: [[SimpleTest]]: [MySQL] 55,571 pass(es), 18 fail(s), and 6 exception(s).
[ View ]

rerolled patch

dawehner’s picture

Status:Needs review» Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.phpundefined
@@ -651,7 +651,7 @@ public function defaultSummaryForm(&$form, &$form_state) {
+  protected function defaultAction($info = NULL) {

+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.phpundefined
@@ -911,7 +911,7 @@ protected function _buildArguments() {
+        $status = $argument->defaultAction();

This has to be public, as it's called from outside.

theladebug’s picture

Thanks, I'll reroll again. Is there a simple way to tell this or do you just have to know what the module is doing to know?

Thanks

oenie’s picture

@theladebug: it's pretty straightforward:

If all calls you are seeing are on a $this instance (as was the case in the first patch), you can use protected.
If there are some calls where it's called on another instance, you have to use public.

So the reason why i suggested protected in comment #3, was because that patch had only $this->default_action() in its code. Using protected was fine there.

As it turns out, there was another call to the method that was missed in the first patch, as shown by dawehner #9 with the call $argument->defaultAction().

Because of that, you need to use public, because protected methods can only be called by an object itself (the $this->... construction).

theladebug’s picture

@oenie - Thanks, I'm obviously a little rusty on my OOP (even though thats what all my "formal" training was - haha)

heddn’s picture

Status:Needs work» Needs review
StatusFileSize
new2.09 KB
PASSED: [[SimpleTest]]: [MySQL] 58,111 pass(es).
[ View ]

Let's see if we make the testbot happy.

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community
alexpott’s picture

Status:Reviewed & tested by the community» Fixed

Committed 5c09348 and pushed to 8.x. Thanks!

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