Clicking "Remove" on an added file does nothing. Seems like removeItemSubmit() now needs a data-row-id to trigger removal. This is not passed in by the FileBrowserWidget when submitting the removal request.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reekris created an issue. See original summary.

reekris’s picture

Here is a patch that adds the row id when submitting the Remove request, which seems to fix the issue for me.

reekris’s picture

Status: Active » Needs review
reekris’s picture

Status: Needs review » Needs work
reekris’s picture

I was using the wrong value for the row id. Here is a new patch

reekris’s picture

Status: Needs work » Needs review
samuel.mortenson’s picture

Status: Needs review » Reviewed & tested by the community
+          '#attributes' => [
+              'data-entity-id' => $entity->getEntityTypeId() . ':' . $entity_id,
+              'data-row-id' => $weight
+          ],

Small nitpick - code standards call for two spaces per tab. Other than that this fixes the bug for me, so marking as RTBC.

slashrsm’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +D8Media

Fixed coding standards and committed. Thanks!

  • slashrsm committed 65369b4 on 8.x-1.x authored by reekris
    Issue #2786851 by reekris, samuel.mortenson: Fix Removing entities in...

Status: Fixed » Closed (fixed)

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