This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

You have viewed this node X times this session.

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.

Does anyone know anything?

Add new translation to node through REST services

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:

How to correctly manipulate menu items dynamically on each page request in Drupal 8?

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.)

Drupal 9 - YouTube module - Allow playlist URLs

Hello,

We're using a YouTube module to insert youtube video's on our website. The module currently allows the following URL formats:

scheduler not always publishing but it does show as successful on logs

On drupal 8
Scheduler not always publishing content pages but it does show as successful on report logs and messages.

I would like to know what could be the issue and where can I find the scheduler module code to try debugging, I could not find the under vendor or project at all.

If you need any more info let me know which and I'll provide since I don't know much about how scheduler cron works

This is the code for extending the core schedule functionality, it runs after the publish is done. 

The Render array for image in a string

HI

I want to use phpqrcode generate a qr code on my page.

My code for generate QR code is something like below:

ob_start();
QRcode::png($text,$false,$levle,$size,$margin,true);
$image = ob_get_contents();
ob_end_clean();

As You can see, I don't want to generate a QRcode file in my server.

And the browser shows a QR code on my page. Only a qr code.

My question is how can i use drupal render array to render this image?

Is it possible using image_style to render the image? How can i get the uri of the image? 

Thanks!

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions