Files: 
CommentFileSizeAuthor
#30 2003366-30.patch21.39 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 57,625 pass(es).
[ View ]
#30 interdiff-2003366-30.txt1 KBdamiankloip
#29 interdiff-25-29.txt1008 bytesYesCT
#29 drupal-viewsRename-pre_render-2003366-29.patch21.38 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-viewsRename-pre_render-2003366-29.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#29 drupal-viewsRename-pre_render-2003366-29-rerolled.patch21.39 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] 56,199 pass(es), 120 fail(s), and 49 exception(s).
[ View ]
#25 drupal-viewsRename-pre_render-2003366-25.patch22.64 KBheddn
FAILED: [[SimpleTest]]: [MySQL] 57,741 pass(es), 3 fail(s), and 1 exception(s).
[ View ]
#25 interdiff.txt8.45 KBheddn
#22 2003366_rename-pre_render.patch14.79 KBsillygwailo
FAILED: [[SimpleTest]]: [MySQL] 58,335 pass(es), 3 fail(s), and 1 exception(s).
[ View ]
#18 2003366_rename-pre_render.patch15.94 KBsillygwailo
PASSED: [[SimpleTest]]: [MySQL] 57,763 pass(es).
[ View ]
#18 interdiff.txt725 bytessillygwailo
#16 2003366_rename-pre_render-16.patch15.93 KBpcambra
FAILED: [[SimpleTest]]: [MySQL] 53,956 pass(es), 121 fail(s), and 55 exception(s).
[ View ]
#16 interdiff.txt1.15 KBpcambra
#14 2003366_rename-pre_render.patch14.78 KBsillygwailo
FAILED: [[SimpleTest]]: [MySQL] 55,802 pass(es), 3 fail(s), and 1 exception(s).
[ View ]
#11 2003366_rename-views-method-pre_render_11.patch14.82 KBsomepal
PASSED: [[SimpleTest]]: [MySQL] 56,569 pass(es).
[ View ]
#11 interdiff-2003366_rename-views-method-pre_render_11.txt2.41 KBsomepal
#8 2003366_rename-views-method-pre_render_8.patch14.41 KBsomepal
PASSED: [[SimpleTest]]: [MySQL] 58,476 pass(es).
[ View ]
#3 drupal-rename-pre-render-2003366-3.patch12.8 KBkenianbei
FAILED: [[SimpleTest]]: [MySQL] 57,104 pass(es), 499 fail(s), and 261 exception(s).
[ View ]

Comments

kenianbei’s picture

Assigned:Unassigned» kenianbei
kenianbei’s picture

I've changed most of these, but I'm not sure if the module_invoke hook name should also be changed:

<?php
$module_handler
->invoke($base, 'views_pre_render', array($this));
?>

to

<?php
$module_handler
->invoke($base, 'views_preRender', array($this));
?>
kenianbei’s picture

Assigned:kenianbei» Unassigned
Status:Active» Needs review
StatusFileSize
new12.8 KB
FAILED: [[SimpleTest]]: [MySQL] 57,104 pass(es), 499 fail(s), and 261 exception(s).
[ View ]

I think I've found most/all of the pre_render method calls... I left the module invoke to use views_pre_render.

Status:Needs review» Needs work

The last submitted patch, drupal-rename-pre-render-2003366-3.patch, failed testing.

heddn’s picture

Status:Needs work» Needs review
mari3.14’s picture

aspilicious’s picture

Status:Needs review» Needs work

All these function should start with "public"
==> public function preRender

Should be good to go when thats fixed :)
Thnx for working on this

somepal’s picture

Status:Needs work» Needs review
StatusFileSize
new14.41 KB
PASSED: [[SimpleTest]]: [MySQL] 58,476 pass(es).
[ View ]

since its unassigned, taking a look at this, hope @kenianbei wouldn't mind.
@aspilicious so here's the patch.

heddn’s picture

Status:Needs work» Needs review
+++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.phpundefined
@@ -24,10 +24,10 @@ public function render($values) {
+   * Overrides \Drupal\views\Plugin\views\Plugin\field\FieldPluginBase::preRender().

+++ b/core/modules/system/lib/Drupal/system/Plugin/views/row/EntityRow.phpundefined
@@ -111,10 +111,10 @@ public function summaryTitle() {
+   * Overrides Drupal\views\Plugin\views\row\RowPluginBase::preRender().

+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/row/EntityReference.phpundefined
@@ -47,15 +47,15 @@ public function buildOptionsForm(&$form, &$form_state) {
+   * Overrides \Drupal\views\Plugin\views\row\Fields::preRender().

Should really use @inheritdoc.

Also, could you provide an interdiff?

heddn’s picture

Status:Needs review» Needs work
somepal’s picture

StatusFileSize
new2.41 KB
new14.82 KB
PASSED: [[SimpleTest]]: [MySQL] 56,569 pass(es).
[ View ]

@heddn thank you for pointing out, we have @inheritdoc now.

kenianbei’s picture

@Joe9: thanks for taking this, got caught up with work and haven't had time to follow through.

aspilicious’s picture

Status:Needs review» Needs work

They need public access modifier

sillygwailo’s picture

Status:Needs work» Needs review
StatusFileSize
new14.78 KB
FAILED: [[SimpleTest]]: [MySQL] 55,802 pass(es), 3 fail(s), and 1 exception(s).
[ View ]

Re-roled with public on all the function declarations. Also fixed a typo (preEender) that snuck into the latest patch.

Status:Needs review» Needs work

The last submitted patch, 2003366_rename-pre_render.patch, failed testing.

pcambra’s picture

Status:Needs work» Needs review
StatusFileSize
new1.15 KB
new15.93 KB
FAILED: [[SimpleTest]]: [MySQL] 53,956 pass(es), 121 fail(s), and 55 exception(s).
[ View ]

Here's a rerroll with some minor changes, let's see if this is green now.

Status:Needs review» Needs work

The last submitted patch, 2003366_rename-pre_render-16.patch, failed testing.

sillygwailo’s picture

Status:Needs work» Needs review
StatusFileSize
new725 bytes
new15.94 KB
PASSED: [[SimpleTest]]: [MySQL] 57,763 pass(es).
[ View ]

Same patch as #16 except with public in ContextualLinks.php (re-rolled against 8.x).

damiankloip’s picture

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Custom.phpundefined
@@ -47,21 +47,21 @@ function render($values) {
+  public function preRender(&$values) {
+    if (isset($values['alter'])) {
+      $values['text'] = $values['alter']['text'];
+      $values['help'] = $values['alter']['help'];
+      unset($values['alter']['text']);
+      unset($values['alter']['help']);

Why this change?

pcambra’s picture

For what I've seen, we might not have control on what's coming in $values, if you check the test_dropbutton view, we've got a custom text in there, which will be pre rendered by the preRender method displayed in #19, but at that point $values has an array of all the nodes being rendered, I guess because the custom field is being rewritten to use the nid?

nothing:
          id: nothing
          table: views
          field: nothing
          plugin_id: custom
          relationship: none
          group_type: group
          admin_label: ''
          label: 'Custom text'
          exclude: '0'
          alter:
            alter_text: '1'
            text: 'Custom Text'
            make_link: '1'
            path: 'node/[nid]'
heddn’s picture

Status:Needs review» Needs work

Let's discuss the changes in #18 in a follow-up. The scope of this issue is to simply rename the function. Anything else should come elsewhere.

sillygwailo’s picture

StatusFileSize
new14.79 KB
FAILED: [[SimpleTest]]: [MySQL] 58,335 pass(es), 3 fail(s), and 1 exception(s).
[ View ]

Here's the same patch as #14, but with public on ContextualLinks.php (also re-rolled against 8.x).

pcambra’s picture

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 2003366_rename-pre_render.patch, failed testing.

heddn’s picture

StatusFileSize
new8.45 KB
new22.64 KB
FAILED: [[SimpleTest]]: [MySQL] 57,741 pass(es), 3 fail(s), and 1 exception(s).
[ View ]

Let's see if this passes.

heddn’s picture

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, drupal-viewsRename-pre_render-2003366-25.patch, failed testing.

joelpittet’s picture

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
@@ -1090,7 +1090,7 @@ public function adminSummary() {
-  function pre_render(&$values) { }

Custom class from Drupal\views\Plugin\views\field\Custom already defines a preRender method that isn't matching the signature of the new one FieldPluginBase (ie referenced and not returning values) and is used by it's buildOptionsForm. Not sure the best solution for this, though I am sure someone will know:)

YesCT’s picture

Status:Needs work» Needs review
StatusFileSize
new21.39 KB
FAILED: [[SimpleTest]]: [MySQL] 56,199 pass(es), 120 fail(s), and 49 exception(s).
[ View ]
new21.38 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-viewsRename-pre_render-2003366-29.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
new1008 bytes

this renamed the pre-existing preRender in Custom to preRenderCustom

and then needed a reroll.

it was a clean merge with 8.x with no conflicts.

grepping to see if other preRender's would need to be renamed..
ag "extends Custom "
gives nothing, so this should be ok.

damiankloip’s picture

StatusFileSize
new1 KB
new21.39 KB
PASSED: [[SimpleTest]]: [MySQL] 57,625 pass(es).
[ View ]

Cool, but I think we should call the Custom implementation of preRender preRenderCustomForm. As this is just a pre render callback for the form, and not for the actual handler result processing.

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community

done!

alexpott’s picture

Status:Reviewed & tested by the community» Fixed

Committed 116f0a3 and pushed to 8.x. Thanks!

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