Hello!
is there a way to run a bulk update?
i have an option 'update automatic node titles' on the 'content' admin page, but it doesn't do anything.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lanny Heidbreder’s picture

Title: Bulk update » Node operation/update action is broken
Version: 7.x-1.3 » 7.x-1.x-dev
Component: User interface » Code
Assigned: Unassigned » Lanny Heidbreder
Category: Feature request » Bug report
Issue tags: -bulk update
FileSize
1.33 KB

This is broken for me, too, in latest 7.x-1.x. A patch is attached that fixes the problem, and I'm at least 50% sure it fixes it correctly. I'm setting the $reset parameter to TRUE in the call to auto_entitylabel_is_needed() that's at the beginning of auto_entitylabel_entity_update_action(); the whole point of that parameter is for this sort of situation, right?

basvredeling’s picture

Status: Active » Needs review

Patch tested. Works fine to solve the bulk update issue.
Let's have a second opinion before setting it to RTBC.

zil.arman’s picture

i can also confirm that the patch solves the problem.

75th Trombone, thanks a lot!

basvredeling’s picture

Status: Needs review » Reviewed & tested by the community

RTBC

Lanny Heidbreder’s picture

Jej’s picture

I don't have this bulk update action 'update automatic node titles'.

So I use another method:

  1. select contents with checkboxes
  2. choose bulk update action: "Change value"
  3. select "Title" and leave field blank
  4. submit...

And that's all :)

basvredeling’s picture

You can add the update automatic node titles action to the admin view by editing the view and configuring the bulk operations field.

Jej’s picture

Thank you for the trick, I had not thought about this field configuration...

adamwhite’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1001 bytes

I'm curious if this is related to a wider issue.

In my implementation a separate module is generating entities that, without this module, have their own label value which I don't want to use. With the 7.x-1.2 version of this module, I could successfully set labels for these entities but that stopped working with 7.x-1.3 and 7.x-1.x. So I'm seeing the bulk action behaviour identified by zil.arman at the start of this issue, but I'm also not able to get the labels to set on insert or update.

Comparing the past versions of the module, there's a test in old versions of the auto_entitylabel_is_needed function for empty($entity->auto_entitylabel_applied). If that's empty, among the other conditions, this function returns true. The version of auto_entitylabel_is_needed in 7.x-1.3 and 7.x-1.x doesn't check this at all.

I've added it back in with the attached patch and I can now both insert, update and bulk update correctly. This might make the changes from the patch in #1 unnecessary. Can someone take a look?

AaronBauman’s picture

Status: Needs review » Needs work

Nope, #9 doesn't fix the action for VBO

AaronBauman’s picture

Status: Needs work » Needs review

Oops, spoke too soon.

#9 DOES fix the action for VBO.

I've only tested against one entity (node) with AUTO_ENTITYLABEL_ENABLED setting, so i'll leave on needs review awaiting some more testers.

ckng’s picture

Patch #1 works for me.
Patch #9 gives me undefined error on $entity->auto_entitylabel_applied.

AaronBauman’s picture

ckng, can you provide more details?
what line is the php undefined property notice reported?
I'm not having any issue with patch #9, which i'm using on several installs now.

I don't think the relevant line in the patch, empty($entity->auto_entitylabel_applied), is responsible but the patch may be exposing a notice in a different line.

ckng’s picture

You're right. Initially both patches were not working as expected, so the notice was from my debug code.

So patch #9 is WORKING.

arx-e’s picture

Patch #9 tested just by me too and everything works fine now (VBO updates and manual edit/save).

Thanks!

presleyd’s picture

This also worked for me.

alar’s picture

Patch in #9 solved my problem with Auto Label updating translated Titles.

jday’s picture

About 7 months ago auto entity labels stopped working for me, #9 solved it, hope it gets merged in
Thanks @adamwhite

purushotam.rai’s picture

Patch in #9 is related to different issue. Although Patch #9 solves the issue but current issue is being solved using patch #1 and according to my understandings, patch 1 is better for this issue.

@jday have you tried with patch #1?

purushotam.rai’s picture

Tested all the 3 operations: Edit/Update/Bulk Operation with Patch #1. Please add steps in case it fails.

purushotam.rai’s picture

Assigned: Lanny Heidbreder » Unassigned
purushotam.rai’s picture

Issue summary: View changes
FileSize
171.56 KB

Also, the patch #9 logs error in DB Logs.
Actually the approach being used in patch #9 is wrong as each time this function is called for the first time, "auto_entitylabel_applied" property is not set at that time, so it will return TRUE and hence it solves the problem. Which is wrong.

AjitS’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +SprintWeekend2016

Patch #1 works as expected.

Steps followed:
Without applying patch:

  • Configured a content type to take auto-label.
  • Tried bulk update from /admin/content
  • Also, tried this with vocabulary term.

Result: Failed. Did not update node titles.

After applying patch #1:

  • The bulk operations on the nodes worked by default!
  • Had to install views bulk operations and create a view, to test taxonomy term label updates.

  • purushotam.rai committed e5a213b on 7.x-1.x
    Issue #2503081 by 75th Trombone, adamwhite, purushotam.rai, AjitS: Node...
purushotam.rai’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x-1.x
Thank you for patches and reviews.

purushotam.rai’s picture

  • purushotam.rai committed e5a213b on 8.x-1.x
    Issue #2503081 by 75th Trombone, adamwhite, purushotam.rai, AjitS: Node...

Status: Fixed » Closed (fixed)

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

ckng’s picture

Reopen issue as #2860389: Node update broken.
Patch committed only solves bulk update. Node edit/update is still broken.

AjitS’s picture

TenaMurphy’s picture

I'm using Automatic Entity Label 7.x-1.4, Views Bulk Operations (VBO) 7.x-3.7 (which includes patch #1). VBO Change Value doesn't trigger the needed Automatic Entity Label. Patch #9 fixes the problem for me. Thanks much!