Casting Twig_Markup to string in Twig
My HTML, or what I thought was HTML, was actually generating an object of type Twig_Markup
rather than a string
, and therefore wasn't passing json
validation.
Hmm. raw
didn't work.
Welcome. My name is Jeremiah John, sf/f author & activist.I tell liberationist stories.. . . More About Me
My HTML, or what I thought was HTML, was actually generating an object of type Twig_Markup
rather than a string
, and therefore wasn't passing json
validation.
Hmm. raw
didn't work.
I had to do a little RTFMing today, and so I thought I'd post about it.
First of all, this is how you set up PhpStorm to use ES6 eslint settings. You may find it useful
Is the linter getting in your way? The first way to override an eslint setting is inline, disabling it on a one-off basis.
You may not know this, but support for ES6 was added in Drupal 8.4. It wasn't in the release notes, but I was delighted to learn of it.
You have probably landed here because you have gotten Error: Cannot find module 'eslint-config-airbnb'
.
It can be hard to tell why a mixin fails in a sass file. After all, if the mixin isn't included in your dependencies automatically as it was before, grepping for it in the files won't turn up anything.
I was using a child theme of Classy, running Drupal 8. It turns out that this particular generically-named mixin comes from susy 2.x, having been removed in susy 3.x.
I fixed this by setting the susy version number like so in package.json
:
I had a very strange problem wherein I was not able to affect variables being passed to views-view-grid--my_view.html.twig
.
On the method of disabling a block without recourse to path.
On the method of creating custom breadcrumbs: simply crumble stale bread and dip battered eggs into your bowl. But in Drupal.
I had a devil of a time figuring out where captioning was coming from on my entity embeds.
Another team member had set it up, and I was just kind of baffled as to why captions were being offered on my entity embed forms.
It turns out that if you turn on captioning, you just get it for free on all of your embeds, and it's not configurable.
But... I don't want it for free!
Bah. Humbug. This free software doesn't have the features I think it should.
Alright, so here's how you turn off captioning:
All of a sudden, on a commit which had nothing to do with drush as far as I can tell, drush stopped working on platform.sh. I got an error like this:
Sometimes, you've got a Drupal twig function that doesn't exist in PatternLab, and it prevents PatternLab from building.
You get this error: