Drupal is up and running but how do I ...?

Using tokens in View does not work as expected

Hi,

I was trying to use a token in a views title field. It did not work as expected and when I was searching on the internet I found multiple pages where users were explaining they had similar problems. For example when using {{ name }} that it would show the name of the first entry in the view.

I tried several things suchs as {{ title }} or [view:title] and I trief to access variables that I found with dump() but I can't get this to work.

Should it work in the first place? Can we use tokens in a views title?

[Solved] - Drupal CMS content type - media field

I have done a local install of Drupal CMS

When creating a new content type to include audio, when adding a Media field, the only choices for media type are:

  • Document
  • Image
  • Remote video
  • SVG image

Although media is advised for audio there is no audio choice. And no matter which of the above media types is chosen, when actually filling the field, it is not possible to add a .wav or .mp3

Am I missing something or doing something wrong? 

Composer dependencies require a PHP version ">= 8.1.0", but I have 8.3.14

Hallo 

I try to update Drupal at 10.4.1 version

Current situation

  • Drupal Version 10.4.0
  • PHP 8.3.14
php -v

PHP 8.3.14 (cli) (built: Nov 25 2024 00:19:51) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.14, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.14, Copyright (c), by Zend Technologies

Update command

Frontpage view (teaser), change order of node--teaser.html.twig block

In the frontpage view (show: content, teaser), unlike nodes (default), the username and date is shown above the title.

It is not essential, but I like to conform it similar to the nodes and thus show it below the title.

I have tried changing the order of the blocks in node--teaser.html.twig, in this case the “{% block meta %}” block, but to no avail even though the output template turns out to be just that.

I can't figure out where else I should act.
Grateful to those who can give me a cue. 
  

Admin can't login

Hello! 

Our company uses Drupal for our Intranet. My account was given administrative capabilities, however I can no longer log in for unclear reasons. I have tried for different devices to make sure it wasn't an IP issue, to no avail.
Since I am currently the only individual with admin capabilities, this is a bit of an issue.
It has been suggested that the main admin password could be reset through the server itself. However, I do not possess the Linux knowledge in order to do so. Would anyone be aware of commands that could be used to help with that? 

Natalie

#prefix and #suffix with style

I have many custom forms that I'm moving from Drupal 7.  Could anyone tell me a way to include a style attribute in the #prefix or #suffix of a form?

$form["#suffix"]="<span style='font-weight:bold'>test</span>"

Just returns <span>test</span>

I've also tried $form["#suffix"]=Markup::create("<span style='font-weight:bold'>test</span>");

No luck there either.

Pages

Subscribe with RSS Subscribe to RSS - Post installation