User login

class

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:

Drupal adds class js to html tag when JavaScript is enabled

texas-bronius: What's the best way to provide css for non-js-enabled browsers that differs for css for js-enabled?
17:13 texas-bronius: hi benjamin-agaric welcome back
17:15 benjamin-agaric: texas-bronius: hi. Assign the classes themselves with JavaScript?
17:15 texas-bronius: benjamin-agaric: duh. Yes, good idea thanks. Class name could be "hasjs" or something.

JQuery select elements without a given class or ID

Anywhere you can use .classnamehere as a Jquery selector, you can use:

:not(.classnamehere)

Syndicate content