Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
User experience
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2015 at 14:17 UTC
Updated:
1 Mar 2016 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vasikeindeed without Actions Plugin there will be no bulk update form option in the views.
There is a patch that builds Delete Action Plugins for Commerce Store, Order, Products and Product Variations.
With these plugins, adds the Bulk Update Views elements for their admin Views.
Comment #3
vasike@bojanz: i think we need this commited, it helps to delete all the data for commerce entities.
It could help with uninstall/install process - dev/tests.
Comment #4
vasikeThere is a reroll of the previous patch
Changes
- Do not build the Delete plugin action for product variation (at least for now)
- Change the delete action ids to match the class names : DeleteProduct -> delete_product_action (instead of product_delete_action), the same was done for publish/unpublish
- Small fix for type field for product view : use commerce_product_field_data for table instead of commerce_product (broken handler)
Comment #5
bojanz commentedWe are duplicating the action plugin and the delete confirmation form for every entity type, even though nothing changes, can we make that more generic?
(At least the confirmation forms can be 1 class).
Comment #6
vasikePatch updated
- Use generic \Drupal\commerce\Form\DeleteMultiple ConfirmFormBase
- Use a route parameter to get the entity type with \Drupal::routeMatch()->getParameter('entity_type')
ex.
- Use singular and plural labels for Entity types definitions so we can have the right labels for deletion messages and questions
@see #1850080: Entity type labels lack plurality, cannot generate UI text based on label if plural is needed
---------------
@bojanz : Questions
- Do you think there is better (Drupal core) way to have the entity type in the DeleteMultiple, instead of the route paramter/routeMatch?
- Do you think we can use also a generic class for Delete Action Plugins (ex. \Drupal\commerce_product\Plugin\Action\DeleteProduct) with an entity type parameter?
- Do you think this could be a Drupal core approach for DeleteMultiple?
Comment #7
fgmWorking on it at the Paris code sprint.
Comment #8
fgmSubmitted as a PR for Travis checks : https://github.com/commerceguys/commerce/pull/286
Comment #9
fgmPR now passing the tests. Time to merge it ?
Comment #10
vasikeit seems there is an issue with #8 PR, with the form id and there is no deletion (confirm form) for VBO actions.
there is patch that could help for this PR.
The patch contains also some small code "corrections".
Comment #11
vasikeEntity API issue opened for Delete action : #2650152: Delete action.
So on commerce we should have only Config upates for Actions and Views.
Comment #12
vasikeand here is patch for testing (and is working only with) the Entity API patch #2650152-2: Delete action
There are only configs (definitions) changes.
Comment #13
vasikereroll #12 patch
Comment #14
bojanz commentedThe Entity API issue landed (https://github.com/fago/entity/pull/29).
The rerolled patch applies locally, but fails Travis.
https://travis-ci.org/drupalcommerce/commerce/jobs/109591541
Comment #16
bojanz commentedThe fail was on the Entity API side, committed.