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

I'm really impressed with your writing abilities as smartly as with the layout in your blog. Is this a paid topic or did you customize it yourself? Anyway keep up the nice quality writing, it is uncommon to peer a great blog like this one today..

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

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too.

If you are going for finest contents like myself, just pay a quick visit this website all the time since it provides feature contents, thanks

Fine way of explaining, and good article to obtain information on the topic of my presentation subject matter, which i am going to convey in academy.

Hello would you mind stating which blog platform you're using? I'm looking to start my own blog in the near future but I'm having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I'm looking for something unique. P.S Sorry for getting off-topic but I had to ask!

You really make it appear so easy along with your presentation however I in finding this matter to be really one thing that I believe I would never understand. It kind of feels too complicated and extremely huge for me. I am having a look ahead in your next publish, I will try to get the hold of it!

Hey there! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at options for another platform. I would be great if you could point me in the direction of a good platform.

Inspiring story there. What happened after? Thanks!

Wow, this post is fastidious, my sister is analyzing these things, thus I am going to tell her.

What a data of un-ambiguity and preserveness of precious know-how regarding unpredicted feelings.

This website truly has all of the information and facts I needed concerning this subject and didn't know who to ask.

Hi there, its good paragraph regarding media print, we all know media is a impressive source of information.

I know this web page offers quality depending articles and other material, is there any other web site which provides these kinds of stuff in quality?

Thanks for ones marvelous posting! I quite enjoyed reading it, you can be a great author. I will ensure that I bookmark your blog and will come back later on. I want to encourage that you continue your great posts, have a nice day!

Asking questions are actually pleasant thing if you are not understanding anything completely, however this piece of writing presents nice understanding yet.

Hello There. I found your weblog the use of msn. That is an extremely smartly written article. I will make sure to bookmark it and come back to read more of your helpful info. Thank you for the post. I will definitely comeback.

Hi colleagues, its wonderful piece of writing on the topic of cultureand fully defined, keep it up all the time.

Hi there, You've done a fantastic job. I'll definitely digg it and personally suggest to my friends. I am sure they'll be benefited from this web site.

When some one searches for his required thing, so he/she wishes to be available that in detail, therefore that thing is maintained over here.

I was suggested this blog by my cousin. I'm not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks!

I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I'm looking to create my own blog and would like to find out where u got this from. thanks

magnificent put up, very informative. I ponder why the other specialists of this sector don't understand this. You must proceed your writing. I'm confident, you have a huge readers' base already!

Drops are a natural complement made to health the complement consists of a aggregate of natural factors which have been scientifically proven to assist function. These elements encompass neem oil, nori extract powder, wakame extract, kelp powder, powder, pomegranate extract, and extract. In this newsletter, we're capable of have a look at the benefits of every element and the manner they paintings in synchrony to guide health. Neem oil, a natural oil, is derived from the neem tree. It has been used for hundreds of years in Ayurvedic remedy to alleviate severa illnesses. Neem oil includes several compounds that and anti-bacterial homes. These homes make it an powerful difficulty in treating issues. Studies have concluded that neem oil can reduce the size of an enlarged and decorate urinary signs. Nori extract powder is derived from seaweed and is known for its incredible to reduce infection inside the . Nori extract powder is wealthy in antioxidants and is a top notch deliver of minerals and nutrients. http://ckan.restore.ovi.cnr.it/en/user/grenosan-detox-gummies
https://cct.opencitieslab.org/user/grenosan-detox-gummies
https://lincolnshire.ckan.io/user/grenosan-detox-gummies
http://dadesobertes.lapobladevallbona.es/ckan/sr_Latn/user/grenosan-deto...
https://datos.icane.es/en_AU/user/grenosan-detox-gummies-reviews
https://indicadores.pr/user/grenosan-detox-gummies
https://gopausa.linkeddata.es/user/grenosan-detox-gummies
https://old.datahub.io/user/grenosan-detox-gummies
http://mpg.cellplus.io/user/grenosan-detox-gummies
http://3.237.95.96/user/grenosan-detox-gummies
http://dadosabertos.cnpq.br/tl/user/grenosan-detox-gummies
http://175.107.63.95/user/grenosan-detox-gummies
https://new-ckan.misilidik.com/user/grenosan-detox-gummies
https://niagaraopendata.ca/user/grenosan-detox-gummies
https://dataportal.gov.tc/fa_IR/user/grenosan-detox-gummies
http://18.142.251.208/user/grenosan-detox-gummies
https://grandest-moissonnage.data4citizen.com/user/grenosan-detox-gummies
http://datagate.disit.org/user/grenosan-detox-gummies
http://dadosabertos.cnpq.br/en/user/grenosan-detox-gummies
https://ckanfeo.ymparisto.fi/user/grenosan-detox-gummies-review
https://opendata.imet.gr/user/grenosan-detox-gummies
http://almanac.opendata.durban/user/grenosan-detox-gummies
https://mediasuitedata.clariah.nl/user/grenosan-detox-gummies
https://coj.opencitieslab.org/user/grenosan-detox-gummies
https://www.datarefuge.org/user/grenosan-detox-gummies
https://iatiregistry.org/user/grenosan-detox-gummies
https://dcor.mpl.mpg.de/user/grenosan-detox-gummies
https://ckan.recetox.cz/user/grenosan-detox-gummies
http://23.97.72.14/sq/user/grenosan-detox-gummies
https://loric.thedata.place/user/grenosan-detox-gummies
http://129.194.213.24/user/edit/grenosan-detox-gummies
https://www.data.qld.gov.au/user/grenosan-detox-gummies
https://plymouth.thedata.place/user/grenosan-detox-gummies
https://www.opendata.nhs.scot/gl/user/grenosan-detox-gummies
http://goodpa.regione.marche.it/dv/user/grenosan-detox-gummies
https://ckanfeo.ymparisto.fi/ne/user/grenosan-detox-gummies-review
https://ckan-dev.opencitieslab.com/user/grenosan-detox-gummies
https://coj.opencitieslab.org/en/user/grenosan-detox-gummies
https://homologa.cge.mg.gov.br/ne/user/grenosan-detox-gummies
https://datarepo.mathso.sze.hu/user/grenosan-detox-gummies
http://ckandata01.canadacentral.cloudapp.azure.com/user/grenosan-detox-g...
http://84.38.48.220/user/grenosan-detox-gummies-review
https://ckan-openscience.d4science.org/user/grenosan-detox-gummies
https://catalogue.d4science.org/user/grenosan-detox-gummies
https://ckan-sobigdata.d4science.org/user/grenosan-detox-gummies
https://arcci-portal.stcenter.net/user/grenosan-detox-gummies
https://data.gov.ro/en/user/grenosan-detox-gummies
http://demo.observalocal.es./user/grenosan-detox-gummies
https://resilient-nepal.klldev.org/tr/user/grenosan-detox-gummies
http://103.1.235.44/user/grenosan-detox-gummies
https://airquality.stcenter.net/user/grenosan-detox-gummies
http://192.38.111.130/user/grenosan-detox-gummies
http://3.113.247.170/user/grenosan-detox-gummies
http://cities2030-repository.gisai.eu/user/grenosan-detox-gummies
https://ckan.coplasimon.eu/user/grenosan-detox-gummies
https://dataportal.eu-interact.org/user/grenosan-detox-gummies
https://data.kystverket.no/en/user/grenosan-detox-gummies
https://datagate.snap4city.org/en/user/grenosan-detox-gummies-reviews

Every weekend i used to go to see this web page, as i want enjoyment, since this this website conations actually pleasant funny stuff too.

What's up, for all time i used to check weblog posts here in the early hours in the daylight, since i enjoy to find out more and more.

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

Hello, I believe your blog may be having browser compatibility problems. Whenever I take a look at your website in Safari, it looks fine however, when opening in I.E., it has some overlapping issues. I just wanted to provide you with a quick heads up! Other than that, excellent website!

Hey there! I understand this is kind of off-topic however I had to ask. Does building a well-established website like yours take a massive amount work? I am brand new to writing a blog but I do write in my journal on a daily basis. I'd like to start a blog so I can share my own experience and feelings online. Please let me know if you have any suggestions or tips for new aspiring bloggers. Appreciate it!

Hi there Dear, are you in fact visiting this website daily, if so then you will absolutely get fastidious knowledge.

Hi, i think that i saw you visited my website thus i came to “return the favor”.I'm attempting to find things to improve my website!I suppose its ok to use a few of your ideas!!

Hi there, I check your new stuff like every week. Your writing style is awesome, keep up the good work!

I do trust all of the ideas you have presented to your post. They're very convincing and will definitely work. Still, the posts are very short for beginners. Could you please lengthen them a little from next time? Thank you for the post.

Stunning story there. What occurred after? Good luck!

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

Right now it seems like Drupal is the best blogging platform out there right now. (from what I've read) Is that what you're using on your blog?

The Poliglu Language Translator, from Wished For, is a minimized and easy to understand gadget intended to effortlessly separate language boundaries. Ideal for explorers and business experts, it offers ongoing interpretation in various languages with high precision. This convenient contraption guarantees smooth and powerful correspondence anyplace on the planet.

Hello there! I simply wish to offer you a big thumbs up for the excellent info you've got here on this post. I will be returning to your blog for more soon.

When I originally 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 me from that service? Thanks!

Hello, I enjoy reading all of your post. I wanted to write a little comment to support you.

Looking for a top-notch agency for marketing? Look no further! <a href=https://seo-sea.marketing/> Contact us today and we'll elevate your online presence together.</a>

Generally I do not learn article on blogs, however I would like to say that this write-up very pressured me to try and do so! Your writing taste has been surprised me. Thank you, quite nice post.

Hey would you mind letting me know which webhost you're utilizing? I've loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most. Can you suggest a good hosting provider at a honest price? Many thanks, I appreciate it!

Great post. I will be facing some of these issues as well..

I couldn't resist commenting. Exceptionally well written!

Pages

Add new comment