tweaks

Site's administrators

Here is a very quick and simple example of how to create a user/administrator programmatically on any Drupal 8 website. This tweak is very useful when the client has provided a site for support but forgot or did not have the opportunity to create an admin account for you.

drupal - update an alias programmatically

When you use the "pathauto" module and want to make the node's URL depends on your custom field you can create a pattern using a token, however, what can you do if the field is boolean and you want to make a human path or you needed in the more complex pattern? You can implement it programmatically. I going to show how to fix it very quickly.

Redirect to edit mode after cloning the node.

While Replicating Nodes using Replicate and Replicate UI Module, I found that the module will publish a node immediately after replication. What I would like is when it is replicated the replicated (cloned) node opens in edit mode so that a content manager can make the necessary changes before publishing it.