There is a conflict of weight module and bulk operations. When there is bulk operations field present in the field list there is no normal "Save" button anymore and there is no way to save the weight order.
Drupal version is 8.2.7.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | weight-work_with_vbo-2865716-12.patch | 1.43 KB | jsutta |
| #8 | weight-work_with_vbo-2865716-5.patch | 1.17 KB | DevOz |
| #6 | weight-work_with_vbo-2865716-4.patch | 898 bytes | DevOz |
| #3 | weight-work_with_vbo-2865716-3.patch | 824 bytes | skdrupal88 |
Issue fork weight-2865716
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
skdrupal88I have the same issue.
Comment #3
skdrupal88Attaching the patch to fix the issue, should be used together with patch for VBO https://www.drupal.org/project/views_bulk_operations/issues/2992375#comm...
Comment #4
ziomizar commentedLooks good when in combination with VBO, anyway when used without VBO the patch duplicate the default button.
Comment #5
ziomizar commentedComment #6
DevOz commentedWe use the 3.1 stable version of drupal/weight on Drupal 8.6.14 (PHP 7.2, MySQL 5.6), and the provided patch on #3 cannot be applied.
Note that the dev version is older than the stable version :
- version 8.x-3.1 Stable release covered by the Drupal Security Team released 12 February 2019
- Development version: 8.x-3.x-dev updated 30 Nov 2018 at 12:18 UTC
Weird !
So we recreate the patch to make it working on drupal/weight 3.1 stable. Please find the weight-work_with_vbo-2865716-4.patch file attached.
We have the same issue than #4 about duplicated buttons on contents that use Weight but not VBO, even in using the patch for VBO linked on #3.
Comment #7
ziomizar commentedHi @DevOz,
Thanks for working on this.
That means :
- last patch applied on DEV 30 Nov 2018 at 12:18
- git tag `8.x-3.1` for STABLE created 12 February 2019 (After testing dev and the rc for 3 months without any new big issue)
Comment #8
DevOz commentedThe problem of the duplicated "Save"/"Update order" submit button is because the weight-work_with_vbo-2865716-[3-4].patch always create the custom "Update order" button.
If VBO is used with the VBO patch that removes the default submit button, there is only the "Update order" to save the order, but in the other case, the default submit button isn't removed, and the "Update order" is created, duplicating the default submit button.
So it works if we unset the default submit button in the Weight patch too, to be sure that the default submit is removed in all cases, before to create a new custom button.
Please find the weight-work_with_vbo-2865716-5.patch file attached, that unset the default submit button in the Weight patch too.
But if there is others modules that use the default submit button, we'll have the same problem again. So these Weight and VBO patches are a good fix for those who have this problem with Weight and VBO, but not if others modules that use the default save button are used. We need a cleaner solution.
Please note that the state of $form['actions'] when executing the Weight and VBO patches depends on the order of Weight field and the VBO field on the view settings.
@ziomizar : thank you for the explanation about dates.
Comment #9
ziomizar commentedNeed review to run the testbot
Comment #11
DevOz commentedThe test check the "Save" button which is removed and replaced by a custom one with this patch, so it can't pass...
Comment #12
jsutta commentedI was having this problem and came across this issue. I rerolled the patch and verified it works. As skorzh noted in #3, it should be installed with the following patch for Views Bulk Operations: https://www.drupal.org/project/views_bulk_operations/issues/2992375#comm....
My site is on D8.9.13 using PHP 7.4.
Comment #17
anybodyReady to work with #3481777: In bulk_form ensure the triggering element is the bulk_form button and #2992375: Conflict with other plugins (all need to be resolved for this to fully work!)
Please review!
Comment #18
anybody@ziomizar would be great, if you could take a look and help to get things fixed here, in VBO and core.
Comment #19
anybodySorry, JS needs to be adjusted, the PHP part can already be reviewed. I'll to the JS tomorrow.
Comment #20
anybodyTests now blocked by #3481730: Fix phpcs, cspell and phpunit