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

Saved as a favorite, I love your web site!

Your style is very unique compared to other folks I have read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just bookmark this page.

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

Hi are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and set up my own. Do you need any html coding knowledge to make your own blog? Any help would be really appreciated!

I loved as much as you'll receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get got an edginess over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly very often inside case you shield this hike.

Hi, i feel that i saw you visited my site so i got here to return the favor?.I am attempting to to find things to improve my site!I guess its good enough to use a few of your concepts!!

You really make it appear so easy along with your presentation but I to find this matter to be really something which I believe I might never understand. It sort of feels too complex and extremely large for me. I am having a look ahead to your subsequent put up, I'll try to get the cling of it!

Hi there I am so glad I found your blog, I really found you by accident, while I was researching on Bing for something else, Nonetheless I am here now and would just like to say thank you for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to read it all at the moment but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the awesome work.

Greetings from Colorado! I'm bored to tears at work so I decided to browse your site on my iphone during lunch break. I enjoy the knowledge you provide here and can't wait to take a look when I get home. I'm amazed at how quick your blog loaded on my phone .. I'm not even using WIFI, just 3G .. Anyways, great blog!

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

Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your weblog? My blog is in the exact same niche as yours and my visitors would certainly benefit from a lot of the information you provide here. Please let me know if this alright with you. Appreciate it!

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

Hey there I am so happy I found your website, I really found you by accident, while I was browsing on Google for something else, Anyways I am here now and would just like to say many thanks for a fantastic post and a all round enjoyable blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the excellent jo.

This design is spectacular! You most certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!

Truly lots of very good facts.
shoppers drug mart canada <a href=https://canadiandrugsus.com/#>best canadian mail order pharmacies</a> ordering prescriptions from canada legally

Good site you have here.. It's difficult to find quality writing like yours nowadays. I truly appreciate individuals like you! Take care!!

My partner and I stumbled over here coming from a different page and thought I may as well check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly.

Hello, constantly i used to check blog posts here in the early hours in the break of day, because i enjoy to find out more and more.

Hello there! Do you use Twitter? I'd like to follow you if that would be ok. I'm absolutely enjoying your blog and look forward to new posts.

Hi there it's me, I am also visiting this web site regularly, this site is truly fastidious and the visitors are truly sharing fastidious thoughts.

I think this is among the most significant info for me. And i'm glad reading your article. But should remark on some general things, The web site style is great, the articles is really nice : D. Good job, cheers

Hello there! This blog post could not be written much better! Looking at this article reminds me of my previous roommate! He constantly kept talking about this. I'll send this post to him. Pretty sure he's going to have a very good read. Thanks for sharing!

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

Interesting column , I am going to spend more time reading about this topic

I was wondering if you ever thought of changing the structure of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two images. Maybe you could space it out better?

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

Рад приветствовать!

Веб-сайт https://hd-rezka.cc предоставляет уникальный шанс погрузиться в захватывающий мир кино и насладиться незабываемыми фильмами и сериалами.
Онb стабильно обновляют библиотеку, чтобы предоставить каждому посетителю то, что ему по душе.
Что делает кинопортал особенным? Прежде всего, есть широкий выбор различных жанров, включая голливудские блокбастеры, независимое
киноискусство, мировые хиты и классику. Есть кинофильмы и сериалы для всех возрастных категорий и на любой вкус.
Качество является приоритетом! Команда гордится предоставлением их пользователям исключительно высококачественного воспроизведения искусства
большого экрана в формате HD. Работники портала постоянно следит за техническими новинками и обновлениями, чтобы обеспечить вам наилучший просмотр без сбоев и задержек.
Не забудьте использовать удобную систему поиска, которая способствует вам быстро найти интересующий вас контент. Вы можете сортировать видео по жанру, году выпуска и другим параметрам.
Это поможет вам сэкономить время и получить истинное удовольствие!

Кстати вот интересные разделы!

<a href=Аарон>https://hd-rezka.cc/directors/%D0%90%D0%B0%D1%80%D0%BE%D0%BD%20%D0%A5%D1...
<a href=Саит>https://hd-rezka.cc/actors/%D0%A1%D0%B0%D0%B8%D1%82%20%D0%93%D0%B5%D0%BD...
<a href=Дарси>https://hd-rezka.cc/actors/%D0%94%D0%B0%D1%80%D1%81%D0%B8%20%D0%9B%D0%BE...
<a href=Доктор>https://hd-rezka.cc/films/3030-doktor-2021.html</a>
<a href=Аманда>https://hd-rezka.cc/directors/%D0%90%D0%BC%D0%B0%D0%BD%D0%B4%D0%B0%20%D0...

Ник Нолти Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
Лучшие сёнэн-ай 2020 года
Ринтаро Ниси Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
Глеб Бочков Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
Александр Гох Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
Светлана Немоляева Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
2008 Смотреть фильмы и сериалы онлайн в хорошем качестве 720p hd и без регистрации
Импровизаторы смотреть онлайн бесплатно тв шоу 1 сезон 1-5 серия

Удачи друзья!

Здравствуйте, друзья!
Недавно я нашел отличный ресурс, который, как мне кажется, будет полезен многим из нас, кто ищет возможности для обучения и саморазвития. Это сайт с обзорами на различные образовательные программы, где собраны <a href=https://jaschule.ru/>курсы программирования для детей</a>.
Что мне особенно понравилось, так это детальные обзоры и рейтинги, которые помогают выбрать курс, идеально подходящий под личные интересы и цели. Каждый курс тщательно изучен, и представлена объективная информация о его содержании, преподавателях и отзывах студентов. Это действительно удобно, так как сэкономило мне массу времени в поисках подходящего курса.
Советую всем заглянуть и оценить этот ресурс. Возможно, именно здесь вы найдете то, что поможет вам достичь новых высот в обучении и карьере!

Hello, i feel that i noticed you visited my web site so i came to return the want?.I'm trying to to find issues to enhance my web site!I suppose its good enough to use a few of your concepts!!

I just like the valuable information you supply on your articles. I'll bookmark your blog and take a look at once more here regularly. I am rather sure I'll be informed many new stuff proper here! Good luck for the following!

Touche. Outstanding arguments. Keep up the good effort.

I know this if off topic but I'm looking into starting my own weblog and was wondering what all is required to get set up? I'm assuming having a blog like yours would cost a pretty penny? I'm not very internet savvy so I'm not 100% certain. Any suggestions or advice would be greatly appreciated. Kudos

Great article. I'm facing some of these issues as well..

Hi there! This blog post couldn't be written any better! Looking at this article reminds me of my previous roommate! He continually kept preaching about this. I am going to forward this article to him. Pretty sure he's going to have a great read. Thanks for sharing!

I read this paragraph completely regarding the resemblance of latest and earlier technologies, it's awesome article.

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 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

Howdy would you mind letting me know which webhost you're using? I've loaded your blog in 3 completely different internet browsers and I must say this blog loads a lot faster then most. Can you recommend a good internet hosting provider at a reasonable price? Thanks a lot, I appreciate it!

What's up every one, here every one is sharing such experience, so it's good to read this blog, and I used to go to see this web site daily.

I'm gone to convey my little brother, that he should also pay a visit this webpage on regular basis to obtain updated from most up-to-date gossip.

This is my first time pay a quick visit at here and i am genuinely pleassant to read everthing at single place.

Pages

Add new comment