0

This is the content of the .info.yml file.

name: Endymion
description: Drupal 8 starter theme
type: theme
core: 8.x

libraries:
    - endymion/global-css

regions:
  header: Header
  primary_menu: 'Primary menu'
  breadcrumb: Breadcrumb
  content: Content
  sidebar_first: 'Sidebar first'
  footer_first: 'Footer first'

This is the content of the .libraries.yml file.

global-css:
    css:
        theme:
            css/css1.css: {}

I keep getting this error message:

The website encountered an unexpected error. Please try again later.

How do I fix this error?

Additional point:

Get the same error message whether I'm running locally or on a remote server (siteground)

2

AFAIK you should use 2 spaces to indent your YAML. It seems you either use 4 spaces or a tab.

That is the case for the libraries files as well as the libraries key in info file.

  • Everything else does look basically fine except the indentation. – Remog Sep 5 '16 at 14:06
  • I would even think that the only problem is the indentation in .info.yml file - as that breaks the parser because it's different from the rest of the file. If you use 4 spaces consistently it may work. But I suggest that you do not and stick to the coding standard which says 2 spaces. Hint: PhpStorm can format the file automatically for you ;) – Tomáš Fejfar Sep 5 '16 at 15:59
  • Thanks Tomas Fejfar. That worked fine. I'm new to YAML. In fact I'm new to all this. Trying to start a post-retirement career. Do you know anyone who wants to employ a 71 year old trainee Drupaler :-) – meyerstevenlawrence Sep 5 '16 at 21:42
  • Nope :) But nowadays no one needs to know you're 71, you can be 18 yo blonde for all I know. That's the beauty of the internet! Best of luck and huge respect! – Tomáš Fejfar Sep 5 '16 at 21:55
  • Thanks. I've successfully added CSS and jQuery to my theme. – meyerstevenlawrence Sep 7 '16 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.