Hi, I am trying to add a new translation to an existing node through the REST services.
I have a website that has content available in multiple languages. Two of those languages are "en" with prefix "en-INT" in the URL and "de" with prefix "de-DE". The content is always available in "en" and then I would like to add translations to the "en" node.
I have tried a PATCH call to /de-DE/node/62 with the following body:
There is a book service which has all type of books. In our current website, we already have a content type called BOOK_PRODUCT with some required fields, where we used to create books manually. But now we are planning to fetch the BOOKS from the service using REST.
My question is, when we get JSON data from the service, how do I store it in the already available BOOK_PRODUCT format? so that I need not change the front-end logic and when ever new books are added in the server, they are automatically displayed in the front-end website.
I need to change menuitems dynamically on a custom menu created in Drupal.
I need to show, hide, alter title etc, depending on each user and some other different conditions.
I have tried to use:
HOOK_menu_links_discovered_alter(&$links)
HOOK_preprocess_menu(&$variables, $hook)
And they both let me manipulate the meny. But only once when I empty cache. After that it ignores any further changes.
(For me it strange that preprocess_menu doesn't run on every request.)
I just updated from 8.6.18 to 8.9.2 and everything works fine except for the page where I add new content (or see the list of current content). I ran the update manually because I don't have access to composer - I'm on shared hosting.