This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

User login

This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

Resources for visual accessibility of web sites

Presented by Catharine McNally at TCDrupal2016

Color blindness simulator

http://www.color-blindness.com/coblis-color-blindness-simulator/

If the design fails to work well in simulator, send it back, before implementation.

4.5% of world is colorblind: 8% of men, 0.5% of women.

Drupal 8 default content the Agaric way

For the moment, we're following the crowd and using the Default content module. It is nice and has built-in integration with installation profiles, but , and the import could be made much more robust (given half a chance, we'll reimplement it on migrate)

In the below Drush commands, we are placing the default content

To get a menu item:

drush dcer menu_link_content 1 --folder=profiles/example/content/

And a taxonomy term:

What to do when developing a Drupal 8 module and a class file just isn't being autoloaded even though it is definitely there

Short answer: Restart apache or disable the APC classloader in your local.settings.php (see settings.php).

While working on the Give module, which follows the same pattern for donation forms as Drupal 8 core's Contact module uses for contact forms, an access control handler was not being found even though i quadruple checked that my handler annotation described the handler correctly for the name and location of its file.

The ConfigEntityType annotation for the access handler, with most other annotations removed:

Why are twig template comparisons such annoying strings?

A boolean field told in display settings to show as zero or one is actually rendered like this:

" 0 "
" 1 "

That is, a string of the number with a space on either side. Why?

That is from testing using {% set lightbox_class = content.field_lightbox|render %}

At least this works:

{% set lightbox_class = content.field_lightbox|render|trim == 1 ? ' lightbox' %}

So does:

{% set lightbox_class = content.field_lightbox|render|trim ? ' lightbox' %}

Laptop inconsistently detecting and using external audio (heaphone jack) — workaround

Searching to solve this problem i found lots and lots of other problems that didn't quite sound like mine: My headphones/speakers jack seemed to have developed a loose connection for Lenovo T420 running Debian Mint. Sometimes it will stop (or not start) playing audio through the headphones, and fall back to playing through the internal speakers.

Is Git corrupting your font files?

I was getting errors like this in the console:

downloadable font: incorrect file size in WOFF header (font-family: "Graphik" style:normal weight:bold stretch:normal src index:1) source: ... themes/butaro/fonts/Graphik-Bold-Web.woff
downloadable font: rejected by sanitizer (font-family: "Graphik" style:normal weight:bold stretch:normal src index:1) source: ... themes/butaro/fonts/Graphik-Bold-Web.woff

Git would have given you warnings that look like this when you git added the fonts:

Saving message entities programmatically

Our use case, re-saving existing messages, is a bit more complex than it should be, but not bad. This code will work for new or existing messages.

Where $exports is an array of long text strings that is each the JSON dump received form exporting a message type through the UI:

Misleading errors when install profile is missing or simply not specifically called

The following module is missing from the file system bootstrap.inc:231 [warning]strpos(): Empty needle ExtensionDiscovery.php:308

This may mean that your install profile is simply missing-- not in web/profiles/

The following module is missing from the file system: standard
https://www.drupal.org/node/2486083

If you get this error:

Setting text format per field in Drupal 8

UPDATE: There is a contributed Drupal 8 module to set allowed formats that was spun off of the core issue to allow text field to enforce a specific text format.

Right now, there's no good way to do it, but there's good hope that this issue will be fixed in Drupal 8 core. OK but right now? Better Formats isn't stable for Drupal 8 yet. So hacky custom form alters is the best i've come up with.

Allowing regular (short) text fields to use the multiline textarea form widget

There's a module for that now: https://www.drupal.org/project/textarea_widget_for_text

It's nice and simple with an alter hook (as detailed on the module page) and in this answer.