I have to add to one of the content types the possibility that when NODE_TYPE_1 is saved, if field_1 (type number or string) has the value of something specific, when saving NODE_TYPE_1, NODE_TYPE_2 has to be added, created with the value of field_1 passed to one of the fields of NODE_TYPE_2.
Any idea what to use, a controller?, the hook_entity_insert? another hook?
I need to copy some entities from one D9-database to different D9-database.
Both databases are full d9-databases - almost identical - but some nodes and users are present in one, which I need to copy to the other.
In Drupal 7 it was fairly simple. With both databases present in settings.php - let's say they were 'default' and 'second_db' - I could then do something along these lines:
<?php
// Switch to second database
db_set_active('second_db');
I'm using a view to list products from db index. I want to implement a custom sorting (my goal is to sort by current taxonomy term page, products having a specific node field field_MY_FIELD_NAME = CURRENT_TID, showing up first)
First using hook_views_data_alter I override the sort of an indexed field that I have chosen as a sort criteria inside the view
First Drupal 9 site and custom module. I am having to constantly clear the cache for my module functions to be called more than once. Where might I look to disable all caching - or what might I be doing incorrectly that my path is not triggering my _controller functions more than once without clearing the cache?