Is there a way I can add new nodes and update existing ones (if I have the uuid or nid) from an external process (php/python) that would run on the same server as Drupal.
Is there any API Drupal exposes that can be used for that?
Can I program a module that would be used as such API?
Another option is to store the new and updated nodes' data in a DB and write a module that reads and updates Drupal nodes, but I don't know how to make this module run every N minutes without user interaction? (can it be done with cron?)
So I got this multi-cardinality field of type `text_long` which always contains 3 entries. Let's call them field_1, field_2 and field_3.
After saving the containing node, all the empty fields are getting stripped from the saved entity when they are empty, this is not what I want.
So whenever someone saves a value into one of the latter fields (let's say field_3) because the field_1 and field_2 are empty, the first 2 will not be saved and on subsequent node edits the values I put into field_3 are being shown in field_1.
I'm writing a standalone php code(not a module) that uses Drupal API 9.2.6
If I try to load a node (either by nid or uuid) it loads fine but when I try to save it back it fails (even without any changes)
$em = $kernel->getContainer()->get('entity_type.manager');
$mynode = $em->getStorage('node')->load(69); // WORKS FINE AND LOADS THE NODE DATA
// do nothing
$mynode->save(); // FAILS