The log throws errors when saving a NEW node because we dont knw the nid yet. Needs work,
Idea
check the node status in the field validation function
//if that object is null we are saving a new node! Means we do not know
//the nid and have to insert our asin log stuff in amazon_pa_node_insert()
$node = \Drupal::routeMatch()->getParameter('node');
//we must then use another method for our log save. use hook_ENTITY_TYPE_insert -> amazon_pa_node_insert
Comments
Comment #2
marcoka commentedComment #3
marcoka commentedThis logging feature has introduce much more work than i thought.
The whole logic can be made more efficient but works now.
Comment #5
marcoka commented