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.
hook_preprocess_node() gets triggered while deleting a node.
hook_preprocess_node() gets triggered while deleting a node.
Comments
Comment #2
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedComment #3
cilefen CreditAttribution: cilefen commentedThis is normal priority absent any indication of why it should be major.
Comment #4
puspanjalim CreditAttribution: puspanjalim at HyTechPro.com commentedThis should be fine as we are taking some action to a existing node. We can perform some task before deleting a node inside hook_preprocess_node.
Comment #5
BerdirPlease provide a backtrace to prove that and that it's not caused by some custom code, I don't see why that would be the case.
Comment #6
cilefen CreditAttribution: cilefen commentedComment #7
puspanjalim CreditAttribution: puspanjalim at HyTechPro.com commented@deepak_zyxware, How you are deleting a node? hook_preprocess_node gets called only if node get rendered.
So please share some more info.
Comment #8
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedPlease find the backtrace while deleting a translation.
Comment #9
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedComment #10
BerdirThis is a view, and since it happens in the final render process, I'm 90% sure it is from a view block, which means it is specific to your site. Which means this isn't a bug but a support request. Try figuring out why you have a views block displayed there.
Comment #11
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedFound to be triggering from Search API views.
Comment #12
BerdirYes. that's triggered by an $entity->save(), which happens if you "delete" a translation. That causes search_api to re-index and you have the rendered entity enabled I guess.
Everything working as expected. You could for example disable immediate indexing, then that will happen later on cron.