Drupal 8 Twig date filter error

Hi,

when I use any date filter in Drupal 8 Twig variable, I see error with blank screen.

{{ node.field_date|date('j.n.Y') }}
or
{{ node.field_date|date("j.n.Y") }}
or
{{ node.field_date.value|date('j.n.Y') }}
or
{{ node.field_date|raw|date("j.n.Y") }}

Exception: DateTime::__construct() expects parameter 1 to be string, array given v DateTime->__construct() 

Some other Twig variable filters are ok (|reverse  |lower etc.)

Thank you very much for your help.

Josef F.

Is there an Applicant Tracking System?

Before I make my own set of forms, workflows, and all that.  I wanted to know if anyone knows of an Open Source recruiting, candidate, or applicant tracking system.  I saw the old one "Recruiter" and I saw the HRM sandbox.  Other than that I could not see anything for Drupal 8.

I was trying not to reinvent the wheel.

Hide link in menu based on service result

how should I do if I need to show to a link menu based on a condition ?

This is my YML for my menu link : 

    double_vue_klesia.backuserswitch:
      title: 'Retour user précédent'
      menu_name: navigation-principale
      description: 'Switch back to your user account.'
      route_name: double_vue_klesia.backuser.switch
      weight: 1

I want to show this link only : 

Varbase drupal distribution probleme to install

Hi,

I try to install the drupal 8 varbase distribution in localhost. (i have php 7.1.9 and mysql 5.7.19)

after launching the install order with composer :

composer create-project Vardot/varbase-project:^8.5.0-alpha5 drupalvarbase --no-dev --no-interaction

I have two folders : "docroot" and "vendor" and somes files on roots : (composer.json )

when I go to the install file in : drupalvarbase/docroot/core/install.php

i have this message error :

Twig sandbox security error when calling object method

I'm new to Twig templating and I'm curios how to work with objects within twig.

Currently I'm having struggle with this simple template (and I need much more complex ones) where start is a DateTime object.

<span>
{{ start.format('H:i:s')
</span>

I'm getting a Twig_Sandbox_SecurityError:

Calling "format" method on a "DateTime" object is not allowed.

Do I really have to manually register every single method I like to call within a Twig template?

Thanks

Matthias

Custom stream wrapper which supports sftp

Hi, I'm actually searching solution for my drupal project. I want to override drupal public stream wrapper

I would to :

Send all the new uploaded files via Content > Media > Add or via custom field using entity browser to a CDN files folder
Getting all the needed files from this cdn, I mean getting files with https://cdn_example.com/files/my_file.txt instead of sites/default/files/my_file.txt
Keep local sites/default/files directory empty

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x