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

marcoka created an issue. See original summary.

marcoka’s picture

Issue summary: View changes
marcoka’s picture

This logging feature has introduce much more work than i thought.
The whole logic can be made more efficient but works now.

  • marcoka committed d603239 on 2.0.x
    Issue #3224328: NID unknown when saving a new node
    
marcoka’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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