1. Getting error for DraggableViews. I had to use local patch. Can you fix it? I am working with drupal 8.2. I also check with dupal version 8.1, same case.

line: use Drupal\migrate\Entity\MigrationInterface;
should be replaced with: use Drupal\migrate\Plugin\MigrationInterface;

Check the patch file.

2. Getting notice in the .module file:

Notice: Undefined index: title in draggableviews_preprocess_views_view_table() (line 79 of modules/contrib/draggableviews/draggableviews.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pericxc created an issue. See original summary.

pericxc’s picture

Status: Active » Needs review
FileSize
1.11 KB
pericxc’s picture

FileSize
1.11 KB
titouille’s picture

Hi,

Instead of using

$title = isset($row['columns']['title']['content'][0]['field_output']['#markup']) ?: NULL;

Maybe use some kind of logic like this:

    $label_column = $variables['result'][$key]->_entity->getEntityType()->getKey('label');
    $title = $row['columns'][$label_column]['content'][0]['field_output']['#markup'];
    $indent = [
      '#theme' => 'indentation',
      '#size' => $draggableviews->getDepth($key),
    ];
    $variables['rows'][$key]['columns'][$label_column]['content'][0]['field_output']['#markup'] = render($indent) . $title;

To retrieve the real "label" column. Maybe we must check if a "label" key exists and add the isset like in the patch.

jorgespiessens’s picture

Issue seems PHP version specific. With php 7.0.16 I don't have the issue, with php 5.6.22 I can reproduce.
Applied patch and works.

tophboogie’s picture

I did have this issue with php 7.1.1 and I can confirm that #3 fixes the error

iStryker’s picture

iStryker’s picture

Status: Needs review » Closed (duplicate)
Parent issue: #2906059: Plan for next stable Draggable Views release »

Actually I am marking this a duplication of #2876749: Adjust draggable views to not assume a 'title' key in view row as it currently has a patch that fixes this (#7).

boazpoolman’s picture

FileSize
1.3 KB

Updated patch to only set the title to NULL if the title is actually not there.
When there is a title that will be used

boazpoolman’s picture

FileSize
1.3 KB
havran’s picture

Status: Closed (duplicate) » Needs work

Actually, part with problem in migration destination is still not solved.

1. Getting error for DraggableViews. I had to use local patch. Can you fix it? I am working with drupal 8.2. I also check with dupal version 8.1, same case.

line: use Drupal\migrate\Entity\MigrationInterface;
should be replaced with: use Drupal\migrate\Plugin\MigrationInterface;

havran’s picture

Title: Module is not working for 8.1 and 8.2 » Bad namespace in migration destination plugin
havran’s picture

FileSize
557 bytes

Added patch only for migration destination namespace issue.

havran’s picture

Issue tags: +migrate