Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The other day I was installing some different modules and suddenly I started getting these messages ("You have viewed this node 3 times this session.") every time I visited a node, and I don't know how to remove them.
I want users to leave comments first, then ask them to verify email or log-in using Google or Facebook? Currently, if I set up the post comment permission to only authenticated users, it asks users to create an account first.
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.)