Skip to main content
edited title
Link
nmc
  • 2.1k
  • 1
  • 21
  • 35

hook_node_validate called on delete, not on insert?

corrected questioin
Source Link
nmc
  • 2.1k
  • 1
  • 21
  • 35

hook_node_validate called on delete?, not on insert

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

Documentation says: Perform node validation before a node is created or updated.
Is deletion considered an "update" to the node in this case?

EDIT: II can delete without any issues byproblems when clicking on delete link at admin/content but not by clickingwhenclicking delete button on node edit form since validation fires and fails. What could be the reason for validation firing here?

hook_node_validate called on delete?

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

Documentation says: Perform node validation before a node is created or updated.
Is deletion considered an "update" to the node in this case?

EDIT: I can delete without any issues by clicking on delete link at admin/content but not by clicking delete button on node edit form since validation fires and fails. What could be the reason for validation firing here?

hook_node_validate called on delete, not on insert

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

I can delete without any problems when clicking on delete link at admin/content but not whenclicking delete button on node edit form since validation fires and fails. What could be the reason for validation firing here?

clarified question/added information
Source Link
nmc
  • 2.1k
  • 1
  • 21
  • 35

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

Documentation says: Perform node validation before a node is created or updated.
Is deletion considered an "update" to the node in this case?

EDIT: I can delete without any issues by clicking on delete link at admin/content but not by clicking delete button on node edit form since validation fires and fails. What could be the reason for validation firing here?

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

Documentation says: Perform node validation before a node is created or updated.
Is deletion considered an "update" to the node in this case?

Why is my hook_node_validate implementation being called when I try to delete a node through the node editing form (by clicking the delete button at the bottom of form)? Validation fires and then my node doesn't get deleted which is not what I want.

Documentation says: Perform node validation before a node is created or updated.
Is deletion considered an "update" to the node in this case?

EDIT: I can delete without any issues by clicking on delete link at admin/content but not by clicking delete button on node edit form since validation fires and fails. What could be the reason for validation firing here?

Source Link
nmc
  • 2.1k
  • 1
  • 21
  • 35
Loading