CommentFileSizeAuthor
#1 media-2006210-1.patch971 bytesOnkelTem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

OnkelTem’s picture

Status: Active » Needs review
FileSize
971 bytes

This patch can be used after applying #1954186-5: Make file_view_multiple() compatible with Entity API patch.

Chris Matthews’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch in #1 does not apply to the latest media 7.x-2.x-dev and if still relevant needs to be rerolled.

Checking patch modules/mediafield/mediafield.module...
error: while searching for:
  }

  if (!empty($files)) {
    $element = file_view_multiple($files, $display['settings']['file_view_mode'], 0, $langcode);
  }

  return $element;

error: patch failed: modules/mediafield/mediafield.module:137
error: modules/mediafield/mediafield.module: patch does not apply
joseph.olstad’s picture

Status: Needs work » Closed (duplicate)

This was fixed in another patch.

see the current code, the reset happens AFTER the assignment.

    $output = file_view_multiple($files, $display['settings']['file_view_mode'], 0, $langcode);
    // Remove the first level from the output array.
    $element = reset($output);

this code does the exact same thing as the patch, therefore, no need for a patch.