Fatal error</b>: Method Drupal\simple_oauth

Hi team,

I tried to get a token with  post request but got the below error.

Can anyone to help fix this error.

<br />

<b>Fatal error</b>: Method Drupal\simple_oauth\Entities\AccessTokenEntity::__toString() must not throw an exception,

caught Lcobucci\JWT\Signer\InvalidKeyProvided: It was not possible to parse your key, reason: error:0909006C:PEM

routines:get_name:no start line in

Attach custom javascript dynamically generated on a theme page.

In my case I want to write some javascript code inside the paragraph-something.hmtl.twig taking elements from the theme variables and then putting this javascript attached to the bottom of the page. Something like: 

{{ attach_library('my/code') }}

but being able to write the code dynamically and not link to a js file pre-comp.

It's possible?

Whats the earliest point a drupal site can detect if a visitor has visited site before?

Hi

I am trying to redirect visitors if it is their first time on site.

I beleive in drupal 7, this could be done on itialization using init().

Im using a gated content module to check with cookies if a user has already visited the site before. But this uses JS and is executed once dom is fully loaded.

Im trying to find a way to detect at the earliest point. Before any content is load if possible.

What sort of function should I be looking at?

I know is a generic question but just looking for a starting point. Thanks

How to display the thumbnail of a YouTube video in TWIG ?

I created a template for the "Remote video" media type.

I want to display in this template the url of the thumbnail of my video.

I tested this code {{ media.field_thumbnail.value }} but it doesn't work.

The problem is that the thumbnail field is a false field. It does not appear in "Manage fields".

How to display the thumbnail of a YouTube video in TWIG ?

media--remote-video--default.html.twig :

Colorbox Caption on node

I have a content type with a simple colorbox gallery. I wanted to have the caption (title or alt) directly on the page and not just at the lightbox. Is there a way to realise this?

Add Persistent Banner Above Header

Hello,

I'm not very well versed in Drupal and was hoping some kind soul could help me out.

I need to add a persistent(or temporary) banner above the header to an existing Drupal 8 site.

The banner would need to include text and a button. Specifically, it would read "Are you a pet owner?  [Click here} "

The objective is for this banner to redirect non-veterinarians users to a consumer page at a different url.

I was hoping to add module (paid or non-paid) to achieve this.

Any help would be much appreciated.

Thanks.

Charlie

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x