How to display an alternative text if the field is empty ?

In my store type, I created a field_professionnel_cgv field. I want to display an alternative text if this field is empty using TWIG.

I tested the code below but it doesn't work.

How to display an alternative text if the field is empty ?

{% if store.field_professionnel_cgv is not empty %}
  {{ store.field_professionnel_cgv }}
{% else %}
 ...
{% endif %}

PHP message: PHP Fatal error: require(): Failed opening required

Hi,

I am running CentOS 7.7 x86 architecture with Drupal 8.7.10, php72u-7.2.25-1.el7.ius.x86_64 version, composer version is 1.9.1, nginx web server version is 1.16.1. I am facing the below issue.

Mail not working

I made a new site from scratch using the new template, and installing every module using composer. I have 3 Mail modules installed: PHPMailer, Swiftmailer, and mailsystem. But after configuring all of these properly, mail does not get sent. There are NO log error messages, nor are there any on drush watchdog-show. And PHPmailer is NOT writing out any logs or messages even though the debug level is Full Communication, and write to system logs is checked. The PHPMailer GUI says a test email has been sent.

Deleting users from the database instead of Drupal's interface causes error

I am testing whether or not you can delete a user from the users table in the database with an SQL command (DELETE FROM users WHERE uid = ""). 

While the deletion is successful in the database, the "people" tab in the admin bar will throw an error when trying to access that page. (I restored the database so I don't remember the error.

My question is, can you remove a user from the database without having to delete them from the Drupal interface? I have over 1000 users I have to remove.

Update manager: new module install succeeds (?) but then can't find module

On Drupal 8.8.1, under Ubuntu Linux 18.04, used SSH in Update Manager to upload (from my local computer) and install a new module (Easy Install). Drupal worked away and the results page indicated successful install.

Using the built in summary feature when using ONLY paragraphs module for text

I am buidling a Drupal based page where I want to have more flexibility in creating content as usual. For solving this requirement, I use the Paragraphs module, and I also disabled the standard body text. So now, a user can now freely decide how he wants to mix images, text and other content (like embedded videos). For example, an article could now start with a text followed by a full size image, or with 2 half size images followed by a full size video and then the text and so on.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x