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.

Issue fork weight-2865716

Command icon 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

a.dmitriiev created an issue. See original summary.

skdrupal88’s picture

I have the same issue.

skdrupal88’s picture

Status: Active » Needs review
Issue tags: +vbo
Related issues: +#2992375: Conflict with other plugins
StatusFileSize
new824 bytes

Attaching 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...

ziomizar’s picture

Looks good when in combination with VBO, anyway when used without VBO the patch duplicate the default button.

ziomizar’s picture

Status: Needs review » Needs work
DevOz’s picture

StatusFileSize
new898 bytes

We 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.

ziomizar’s picture

Hi @DevOz,

Thanks for working on this.

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 !

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)

DevOz’s picture

StatusFileSize
new1.17 KB

The 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.

ziomizar’s picture

Status: Needs work » Needs review

Need review to run the testbot

Status: Needs review » Needs work

The last submitted patch, 8: weight-work_with_vbo-2865716-5.patch, failed testing. View results

DevOz’s picture

The test check the "Save" button which is removed and replaced by a custom one with this patch, so it can't pass...

jsutta’s picture

StatusFileSize
new1.43 KB

I 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.

anybody made their first commit to this issue’s fork.

anybody’s picture

Status: Needs work » Needs review
Related issues: +#3481777: In bulk_form ensure the triggering element is the bulk_form button

Ready 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!

anybody’s picture

@ziomizar would be great, if you could take a look and help to get things fixed here, in VBO and core.

anybody’s picture

Status: Needs review » Needs work

Sorry, JS needs to be adjusted, the PHP part can already be reviewed. I'll to the JS tomorrow.

anybody’s picture