I know that this is probably a dumb question, but... where should I put the code to create a node programmatically?
I've found many snippets to create a node from code, for example: https://gist.github.com/facine/35bb291811c146b6fc9e
But where should I put that code? In a custom module?
In D7 I could create a PHP script, bootstrap Drupal and then just execute the script... what about D8?
I have dozens of roles that have no purpose other than helping us categorize users. Roles have no permissions associated with them. We only use ROLES to filter users for views, sending emails, and in custom code. The problem is the number of roles is having an adverse effect on managing user permissions. The permission management page becomes overwhelming (and sometimes unresponsive when editing).
Firstly this isn't an e-commerce site, this is just for keeping prices on the site for advertising purposes. The fact I mention prices is arbitrary, just think of any old data format, this could be text or just a number in a field.
We need a central place where all prices/data can be kept, there needs to be translation capability for each price as they differ from country to country, we then need to be able to use these prices throughout the site, and for them to all update, to propagate when the central data of the prices is changed.