Built with Drupal 8: A Front-Ender's Tale of Danger and Suspense

Error message

  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /home1/markspap/public_html/kathy/includes/menu.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home1/markspap/public_html/kathy/includes/common.inc).
May 3, 2015

UPDATE: In August 2015 I moved this site back to Drupal 7. Drupal 8 is still in beta, and though it's going to be fun, it's obviously not ready for prime time yet.

A few weeks ago I decided to rebuild this blog from scratch.  It had been literally years since I'd posted, so I figured I'd include just a few of the last entries.  Also, Drupal 8 was in beta and I'm impatient.  Why not build a brand new site in 8.0.0-beta9?, I thought.   How hard could it be?

So, okay.  It was a little bit hard.  But surprisingly, the experience wasn’t as hairy as you might expect.  Here’s a summary of my adventurous, experimental walk on the wild beta side. 

Installing Drupal 8

Before I go further, I should mention that I installed Drupal 8 on a previously set up local environment.  (If you don’t know what that means, you can find out more here.   For fellow Mac users, I’d recommend these instructions.)

Honestly, installation was a breeze.  The whole process took less than 5 minutes and was similar enough to Drupal 7 that I felt on solid ground.  I just downloaded and untarred core, added a new database in Mamp, went to the site in my browser and followed the instructions.  Easy peasy.

Playing with core was equally as uneventful and fun.  I added a new user, enabled and disabled core modules, added a new content type and a taxonomy vocabulary, tweaked permissions, etc.  All without a hitch.  The admin interface looks and acts almost the same as D7's. For someone who builds a lot of sites for non-technical admins, this is a big relief.

I decided this was easy.  Drupal 8 was a lot more stable than I’d expected.  I was feeling confident, so I decided to try creating a custom theme.

Custom Theming: Take One

Considering D8’s not even released yet, the documentation on drupal.org on Theming Drupal 8 is pretty extensive.  In fact it’s so extensive, it’s a bit overwhelming at first. 

If you're familiar with D7 theming and just wanted to get up and running quickly, you might prefer 27 Questions (and Answers) from My First Drupal 8 Site Build by Matt Korostoff.  His article was extremely helpful, although I was glad to be have the d.o documentation to refer to when I got stuck or wanted to delve into something more deeply.

Adding JS, CSS and Font Files and Libraries

I decided to keep a hand on the tow line and created a Classy subtheme, following Matt’s instructions for setting up the x.info.yml and and x.libraries.yml files.

You can see the .info.yml file looks a lot like the .info in Drupal 7.  The main difference is the way CSS and JS are added.  Instead of adding them directly to the .info.yml file, you include a reference to a .libaries.yml file, and that is where you add your scripts, stylesheets and dependencies. That was probably the biggest gotcha for me--figuring out how to include JS scripts, libraries and dependencies and font libraries.  There was conflicting information on the webs, but this is what worked for me:

Because I had a number of CSS and JS files, I followed the advice (from d.o. maybe?) to break them into two groups—global-styling and global-scripts,. These will now be available to every page.

My scripts.js is actually just a teeny few lines to handle the navigation bar, but surprisingly, Drupal 8 doesn’t load JQuery on every page automatically like D7 did. You have to add it as a dependency, as well as any other js you want to run on every page.

One thing I never figured out was how to add my custom fonts. I use Google's PT Serif and Inconsolata in this theme, and the only way I could get the fonts to load was by adding an @import to my main CSS file:

@import url(http://fonts.googleapis.com/css?family=Inconsolata|PT+Serif:400,400italic,700,700italic);

It works, and that'll have to do for now.

Twig Templates

I find Twig to be easier and more intuitive than the PHP of previous .tpl.php files. If you don't agree, some of the documentation on d.o might be helpful, especially Twig Coding Standards.

The Classy theme was a godsend for me when it came to creating custom templates. Whether you create a subtheme of Classy or not, you can look at the slew of templates it includes to get an idea of how to create your own.

For this theme, I needed a custom block--search-form-block.html.twig and changes to page.html.twig and node.html.twig. For instance, like Matt Korostoff, I don't much like the default "submitted by" line. To tweak it, I copied the node.html.twig from Classy, plopped it in my theme's template folder, and changed the line:

I still haven't figured out how to get my custom date/time format to print, but I'll keep working on it. :)

Custom Modules and More

I enabled a few contrib modules (Prepopulate, Youtube Field, Captcha and Recaptcha) that were absolutely required before going live. All worked beautifully out-of-the-box. However, the other contrib modules I tried gave me either a WSOD or that ghastly pink error message.  

At this time I'd recommend enabling contrib modules cautiously, if at all.  Most are still in dev for a reason.  Maybe try them on a test install first and see what blows up.

Luckily this is a simple site that can run without many contrib modules. If you have a complex site that requires a number of them, you may have to wait a bit before they're all ported to 8. Bluespark publishes a helpful live list of the current status of the top 100 Drupal modules. Check it out to see if your modules are listed.

I'm know you're waiting on tenterhooks for your favorite modules, but remember that most of the people who create and maintain contrib modules do so on their own time and without pay.  That's pretty darn generous of them, and I'm grateful for all the vacation time and off hours they spend creating modules that make my life easier. Unless I'm able to jump in alongside and start slinging code, I'm happy to wait patiently for contrib modules to be ported.

(Note to self: Patience you must have, my young padawan.)

Conclusion

The (sort of) bad news: Not everyone is crazy enough to spend two days and nights building a D8 site. It still isn't easy. You may get discouraged.  You will lose sleep. I still can't get drush 7 (required for D8) to rebuild caches. Importing and exporting a database between dev and live without at least a few WSODs is nigh on impossible. I encountered a number of alien requirements and strange error messages that took time to track down and debug.

The good news: Smarter people than me are working on those problems. Yay!

More good news: I'm no longer afraid of WSODs or error screens that fill three screens. Also, I busted my local dev site and had to rebuild it so many times, I now know a great deal about installing, enabling and configuring Drupal 8.

Was it worth it? You betcha! I'm no programmer, so I was nervous about Drupal 8 coming down the pike. I'm not nervous anymore. In fact, I'm looking forward eagerly to a release candidate.

Thanks to all the people who put so much time and effort into Drupal 8. It's really spectacular, and we thank you for generously sharing your code with us.

Comments

Mireielle Zalazar from Washington was in search of tips writing thesis statement research paper
Kellia Blaszak located the reply to a search question tips writing thesis statement research paper
thesis survival kit gift
essay on my village templecommon app personal essay help
concluding remarks thesis

<a href=https://essayservicehelp.com/>writing an expository essay</a>
<a href=https://homeworkcourseworkhelps.com/>write my paper</a>
<a href=https://theessayswriters.com/>cheap essay writing services</a>
<a href=https://essayssolution.com/>papers writing service</a>

<a href=https://elitecad.pl/forum/viewtopic.php?f=20&t=68368>argumentative essay thesis statement generator motor</a> e9c09ca

Flory Salvitti from Seattle was seeking charlotte newcombe doctoral dissertation fellowships
Kristal Petkoff uncovered the response to an inquiry charlotte newcombe doctoral dissertation fellowships
pr case study writing service
edexcel igcse english language coursework mark scheme
essay 123 help me

<a href=https://englishessayhelp.com/>essay</a>
<a href=https://essaytyperhelp.com/>paper writing services</a>

<a href=http://shh.shanhecloud.com/forum.php?mod=viewthread&tid=410&pid=119614&p... d'introduction de dissertation sur l'apologue</a> f39c326

Deeyn Allegood from Saint Petersburg was in search of whats better coursework or exams
Alvera Shurgot stumbled upon the resolution to a research question whats better coursework or exams
bentley dissertation on the epistles of phalaris
journalism dissertation ideas

<a href=https://theessayswriters.com/>write my essay discount code</a>
<a href=https://dissertationwritingtops.com/>professional dissertation help</a>
<a href=https://writingpaperforme.com/>buy essays</a>

<a href=http://wudao28.com/forum.php?mod=viewthread&tid=12084&extra=>uw madison writing center thesis</a> c09ca0c

I’m not that much of a online reader to be honest but your sites really nice, keep it up! I'll go ahead and bookmark your site to come back later. Cheers

Thank you for sharing your info. I really appreciate your efforts and I am waiting for your next post thank you once again.

My brother recommended I might like this web site. He was entirely right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!

Howdy! This article couldn't be written any better! Reading through this post reminds me of my previous roommate! He constantly kept talking about this. I am going to forward this information to him. Pretty sure he'll have a good read. I appreciate you for sharing!

Hi! I know this is kinda off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having trouble finding one? Thanks a lot!

Wonderful work! This is the type of info that should be shared across the net. Disgrace on the search engines for no longer positioning this post higher! Come on over and talk over with my website . Thanks =)

When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four e-mails with the same comment. Is there any way you can remove people from that service? Thanks!

I believe that is one of the most significant information for me. And i'm glad studying your article. But wanna observation on some normal things, The web site style is great, the articles is really great : D. Good process, cheers

An outstanding share! I have just forwarded this onto a co-worker who was conducting a little research on this. And he in fact bought me breakfast because I stumbled upon it for him... lol. So let me reword this.... Thank YOU for the meal!! But yeah, thanks for spending time to talk about this topic here on your web page.

Have you ever considered writing an e-book or guest authoring on other sites? I have a blog centered on the same subjects you discuss and would really like to have you share some stories/information. I know my audience would enjoy your work. If you're even remotely interested, feel free to send me an e-mail.

fantastic points altogether, you just received a brand new reader. What may you recommend in regards to your publish that you made some days in the past? Any certain?

I'm amazed, I must say. Seldom do I come across a blog that's both educative and amusing, and without a doubt, you have hit the nail on the head. The problem is something that too few men and women are speaking intelligently about. I'm very happy that I found this during my hunt for something concerning this.

When someone writes an paragraph he/she keeps the thought of a user in his/her mind that how a user can understand it. So that's why this paragraph is outstdanding. Thanks!

I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!

This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!

Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!

DOWNLOAD FOR FREE

Telegram:
https://t.me/btc_profit_search

Good way of explaining, and good paragraph to get information regarding my presentation subject matter, which i am going to present in college.

Saved as a favorite, I really like your web site!

Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post.

Hurrah! In the end I got a webpage from where I can in fact obtain helpful information concerning my study and knowledge.

When you travel to Dubai and take a <a href="https://captaindunes.com/desert-safari-dubai/">Desert Safari</a>, you are not only taking part in an adventurous journey, you are entering a vast, preserved area of sand that is home to the Emirates’ rich culture, heritage, and traditions. This stunning landscape is where Bedouin communities have lived for centuries with their flocks of goats, camels, and horses.

If you would like to take a good deal from this piece of writing then you have to apply these techniques to your won blog.

Hi there to all, it's really a good for me to pay a visit this web page, it includes important Information.

Ridiculous story there. What occurred after? Take care!

Why visitors still use to read news papers when in this technological globe all is available on web?

I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!

This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!

Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!

DOWNLOAD FOR FREE

Telegram:
https://t.me/btc_profit_search

I just couldn't leave your website prior to suggesting that I extremely enjoyed the usual info an individual supply for your visitors? Is gonna be again steadily in order to investigate cross-check new posts

This text is priceless. Where can I find out more?

What's Going down i'm new to this, I stumbled upon this I have discovered It positively helpful and it has aided me out loads. I'm hoping to give a contribution & help different customers like its aided me. Great job.

No matter if some one searches for his vital thing, therefore he/she desires to be available that in detail, therefore that thing is maintained over here.

Woah! I'm really loving the template/theme of this site. It's simple, yet effective. A lot of times it's tough to get that "perfect balance" between superb usability and appearance. I must say you have done a fantastic job with this. In addition, the blog loads super fast for me on Opera. Outstanding Blog!

Wonderful beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

Bren Seacord from Port Arthur was in search of georgetown university thesis
Devonna Zeeman discovered the solution to a search question georgetown university thesis
conclusion dissertation peut on rire de tout
example good thesis proposal
mba thesis assistance

<a href=https://essayservicehelp.com/>essay writing services</a>
<a href=https://writeadissertation.com/>phd paper</a>
<a href=https://payforanessaysonline.com/>buy essay cheap</a>

<a href=https://aopvp.com/forum.php?mod=viewthread&tid=515&pid=6801&page=1&extra... dissertation year fellowship</a> 8_e646a

Mona Stum from Kenosha was searching for sample thesis questionare
Lorena Fereday uncovered the response to an inquiry sample thesis questionare
nsf archaeology dissertation improvement
dissertation economie investissement

<a href=https://writeadissertation.com/>dissertation services</a>
<a href=https://englishessayhelp.com/>essay writing service</a>
<a href=https://payforanessaysonline.com/>pay for essay online</a>

<a href=https://battletech-mercenaries.com/merc-net/viewtopic.php?f=4&t=10446&p=... university library thesis</a> 9c09ca0

Thanks for your personal marvelous posting! I certainly enjoyed reading it, you might be a great author.I will be sure to bookmark your blog and may come back later in life. I want to encourage that you continue your great work, have a nice evening!

I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man!

This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!

Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!

DOWNLOAD FOR FREE

Telegram:
https://t.me/btc_profit_search

Ellene Litton from Boise was trying to find dissertation undergraduate degree
Roda Cubit stumbled upon the resolution to a research question dissertation undergraduate degree
thesis php trim
sujets de dissertation de
evaluation calendar dissertation prospectus
literary analysis essay thesis

<a href=https://theessayswriters.com/>how to write an argument essay</a>
<a href=https://dissertationwritingtops.com/>dissertation paper</a>
<a href=https://custompaperwritingservices.com/>cheap research paper writing service</a>
<a href=https://writeadissertation.com/>dissertation abstracts</a>

<a href=https://hawkinsmotorcoach.com/forums/thread-20257.html>cheap essay dalton trumbo by johnny got his gun</a> c09ca0c

Margaretha Oishi from Long Beach was seeking fsu admission essay help
Felicdad Olckhart stumbled upon the resolution to a research question fsu admission essay help
how to write a statement of purpose thesis
what is a good thesis statement for frederick douglass
what is thesis statement pdf
hr thesis titles

<a href=https://englishessayhelp.com/>essays writers</a>
<a href=https://dissertationwritingtops.com/>order dissertation</a>
<a href=https://payforanessaysonline.com/>buy essay</a>
<a href=https://essayservicehelp.com/>writers help</a>

<a href=https://ceralight.ru/viewtopic.php?pid=758065#p758065>thesis leadership motivation</a> 66957_1

I used to be suggested this website through my cousin. I am no longer certain whether this submit is written by him as nobody else recognize such precise approximately my trouble. You are incredible! Thanks!

Roda Kistenmacher from Seaside was searching for lancia thesis head gasket
Eadie Djuric uncovered the response to an inquiry lancia thesis head gasket
thesis farmers market
introduction dissertation candide voltaire
thesis on biofuel

<a href=https://domycollegehomeworkforme.com/>do my statistics homework</a>
<a href=https://writingpaperforme.com/>write my papers for me</a>
<a href=https://essayssolution.com/>essay writing service</a>

<a href=https://hawkinsmotorcoach.com/forums/thread-19912.html>phd thesis printing</a> ca0c498

Pages

Add new comment