Just looking at the code, it seems Drupal\field\Plugin\views\field\Field::process_entity() uses a $values variable that doesn't seem to be defined anywhere ?
I don't really know what's supposed to work or not, just found that when grepping some code in my IDE.

I know this is technically within field.module component, but I hope you guys will bear with me ;-)

CommentFileSizeAuthor
#3 drupal-1866260.patch921 bytesSweetchuck
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Here's the function up to where it gets checked:

function process_entity($entity) {
    $processed_entity = clone $entity;

    $entity_type = $entity->entityType();
    $langcode = $this->field_langcode($entity_type, $processed_entity);
    // If we are grouping, copy our group fields into the cloned entity.        
    // It's possible this will cause some weirdness, but there's only           
    // so much we can hope to do.                                               
    if (!empty($this->group_fields)) {
      // first, test to see if we have a base value.                            
      $base_value = array();
      // Note: We would copy original values here, but it can cause problems.   
      // For example, text fields store cached filtered values as               
      // 'safe_value' which doesn't appear anywhere in the field definition     
      // so we can't affect it. Other side effects could happen similarly.      
      $data = FALSE;
      foreach ($this->group_fields as $field_name => $column) {
        if (property_exists($values, $this->aliases[$column])) {
xjm’s picture

Issue tags: +VDC
Sweetchuck’s picture

Status: Active » Needs review
FileSize
921 bytes

Status: Needs review » Needs work

The last submitted patch, drupal-1866260.patch, failed testing.

Sweetchuck’s picture

In my test environment the tests of "Locale" does not run smoothly. Without any patch.

Core version 902b741725bad30c4c0351af669071177291f7ae 21/10/13 22:34

1648 passes, 13 fails, 3 exceptions, and 518 debug messages

Tests translation of configuration strings.
25 passes, 6 fails, 2 exceptions, and 10 debug messages

Tests the import of locale files.
199 passes, 2 fails, 1 exception, and 75 debug messages

Adds a new locale and translates its name. Checks the validation of translation strings and search results.
346 passes, 2 fails, 0 exceptions, and 121 debug messages

Tests for updating the interface translations of projects.
393 passes, 3 fails, 0 exceptions, and 124 debug messages

...

damiankloip’s picture

+++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
@@ -714,8 +714,8 @@ function process_entity(EntityInterface $entity) {
+        if (property_exists($entity, $this->aliases[$column])) {

Won't the property more than likely be protected now, so this will fail? Do we need to use a getter instead?

yched’s picture

Yes, I guess property_exists() is moot now anyway.
Problem is, I have no idea what this code is supposed to be doing (that it's obviously not doing). We have some code that's clearly wrong, but no observable bug yet :-/

Anonymous’s picture

Issue summary: View changes

The $values parameter is now passed in the functions arguments:

function process_entity(ResultRow $values, EntityInterface $entity) {

I guess this ticket is no longer relevant?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Lendude’s picture

Status: Needs work » Closed (outdated)
Issue tags: +Bug Smash Initiative

Cleaning up old issues.

This got refactored into \Drupal\views\Plugin\views\field\EntityField::createEntityForGroupBy is seems like. The original code no longer exists so closing this as outdated, feel free to reopen this is if you still feel there is something to do here.