Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#22 | Screen Shot 2016-01-30 at 11.34.13 AM.png | 171.56 KB | purushotam.rai |
#9 | node_operation_update-2503081-9.patch | 1001 bytes | adamwhite |
#1 | auto_entitylabel-fix_needed_check-2503081-1.patch | 1.33 KB | Lanny Heidbreder |
Comments
Comment #1
Lanny Heidbreder CreditAttribution: Lanny Heidbreder commentedThis 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 toTRUE
in the call toauto_entitylabel_is_needed()
that's at the beginning ofauto_entitylabel_entity_update_action()
; the whole point of that parameter is for this sort of situation, right?Comment #2
basvredelingPatch tested. Works fine to solve the bulk update issue.
Let's have a second opinion before setting it to RTBC.
Comment #3
zil.arman CreditAttribution: zil.arman commentedi can also confirm that the patch solves the problem.
75th Trombone, thanks a lot!
Comment #4
basvredelingRTBC
Comment #5
Lanny Heidbreder CreditAttribution: Lanny Heidbreder at Stone Ward commentedComment #6
Jej CreditAttribution: Jej commentedI don't have this bulk update action 'update automatic node titles'.
So I use another method:
And that's all :)
Comment #7
basvredelingYou can add the update automatic node titles action to the admin view by editing the view and configuring the bulk operations field.
Comment #8
Jej CreditAttribution: Jej commentedThank you for the trick, I had not thought about this field configuration...
Comment #9
adamwhite CreditAttribution: adamwhite at JMR Logics commentedI'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?
Comment #10
AaronBaumanNope, #9 doesn't fix the action for VBO
Comment #11
AaronBaumanOops, 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.
Comment #12
ckngPatch #1 works for me.
Patch #9 gives me undefined error on $entity->auto_entitylabel_applied.
Comment #13
AaronBaumanckng, 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.Comment #14
ckngYou're right. Initially both patches were not working as expected, so the notice was from my debug code.
So patch #9 is WORKING.
Comment #15
arx-e CreditAttribution: arx-e commentedPatch #9 tested just by me too and everything works fine now (VBO updates and manual edit/save).
Thanks!
Comment #16
presleyd CreditAttribution: presleyd commentedThis also worked for me.
Comment #17
alar CreditAttribution: alar as a volunteer commentedPatch in #9 solved my problem with Auto Label updating translated Titles.
Comment #18
jday CreditAttribution: jday commentedAbout 7 months ago auto entity labels stopped working for me, #9 solved it, hope it gets merged in
Thanks @adamwhite
Comment #19
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedPatch 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?
Comment #20
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedTested all the 3 operations: Edit/Update/Bulk Operation with Patch #1. Please add steps in case it fails.
Comment #21
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedComment #22
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedAlso, 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.
Comment #23
AjitSPatch #1 works as expected.
Steps followed:
Without applying patch:
/admin/content
Result: Failed. Did not update node titles.
After applying patch #1:
Comment #25
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedCommitted and pushed to 7.x-1.x
Thank you for patches and reviews.
Comment #26
purushotam.rai CreditAttribution: purushotam.rai at QED42 commentedComment #29
ckngReopen issue as #2860389: Node update broken.
Patch committed only solves bulk update. Node edit/update is still broken.
Comment #30
AjitSComment #31
TenaMurphy CreditAttribution: TenaMurphy as a volunteer commentedI'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!