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've been surfing on-line greater than 3 hours lately, but I by no means discovered any fascinating article like yours. It's beautiful value enough for me. Personally, if all site owners and bloggers made good content as you probably did, the net might be much more useful than ever before.

Have you ever thought about including a little bit more than just your articles? I mean, what you say is valuable and everything. But just imagine if you added some great photos or videos to give your posts more, "pop"! Your content is excellent but with images and video clips, this blog could definitely be one of the greatest in its niche. Awesome blog!

What's up, for all time i used to check weblog posts here early in the dawn, because i love to gain knowledge of more and more.

Hey! I know this is kinda off topic nevertheless I'd figured I'd ask. Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa? My website addresses a lot of the same topics as yours and I believe we could greatly benefit from each other. If you happen to be interested feel free to shoot me an email. I look forward to hearing from you! Terrific blog by the way!

Excellent, what a web site it is! This webpage presents valuable information to us, keep it up.

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

Hello to all, how is all, I think every one is getting more from this website, and your views are fastidious in support of new visitors.

С течением времени каждая автомагнитола может потребовать ремонта из-за износа или других факторов. Выбор надежного сервиса является ключевым моментом для восстановления ее функциональности и продления срока службы. Если вы столкнулись с проблемами, связанных с работой аудиосистемы вашего автомобиля, стоит обратиться в специализированный сервис. Узнайте подробнее, когда необходим <a href="https://telegra.ph/Remont-avtomagnitol-kogda-neobhodim-i-kak-vybrat-serv...ремонт автомагнитол</a>, и как выбрать подходящую мастерскую.
Также советуем добавить в закладки: [url=https://telegra.ph/Remont-avtomagnitol-kogda-neobhodim-i-kak-vybrat-serv...

That is very fascinating, You're a very skilled blogger. I've joined your rss feed and look ahead to seeking more of your wonderful post. Additionally, I've shared your site in my social networks

Very good article! We will be linking to this great article on our site. Keep up the great writing.

I'm gone to inform my little brother, that he should also pay a visit this website on regular basis to obtain updated from latest information.

http://forum.changeducation.cn/forum.php?mod=viewthread&tid=668371 A Simple Key For dating vermont Unveiled
https://karmadishoom.com/son-friend-unmatched-enquiry-you-do-non-wish-to... How Much You Need To Expect You'll Pay For A Good search youtube channel videos
http://www.lemondedestruites.eu/wiki/doku.php?id=6_shipway_you_maybe_sto... 5 Tips about plump beauty co You Can Use Today
https://mournheim.com/index.php/Friday_Essay:_On_The_End_Of_A_Friendship A Simple Key For dating vermont Unveiled
https://www.barbecuejunction.com/blog/112037/short-circuit-article-revea... Examine This Report on adult playing cards
https://www.fromdust.art/index.php/The_Outdo_Agency_To_Name_Your_Friends... Not known Factual Statements About dating for the dying
http://forum.altaycoins.com/viewtopic.php?id=1155881 Examine This Report on adult probation
https://howis.info/2024/08/20/get-taboo-how-to-get-improve-with-female-c... Not known Facts About dating over 50
http://another-ro.com/forum/viewtopic.php?id=516287 Getting My adult neurogenesis To Work
http://www.larktjj.com/forum.php?mod=viewthread&tid=220408 Examine This Report on adult zebrafish

=+rrry

Hello, I enjoy reading through your post. I like to write a little comment to support you.

I know this web site presents quality based articles or reviews and additional material, is there any other website which provides these kinds of stuff in quality?

Generally I don't read article on blogs, however I wish to say that this write-up very forced me to take a look at and do so! Your writing style has been amazed me. Thank you, very nice post.

Hi friends, good article and fastidious urging commented at this place, I am truly enjoying by these.

Thanks for finally writing about > %blog_title% < Loved it!

Please let me know if you're looking for a article writer for your blog. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd love to write some content for your blog in exchange for a link back to mine. Please send me an email if interested. Many thanks!

I'm not sure where you're getting your information, but great topic. I needs to spend some time learning much more or understanding more. Thanks for excellent information I was looking for this information for my mission.

It's in fact very complicated in this busy life to listen news on Television, therefore I just use world wide web for that reason, and obtain the most recent news.

Some may know Mya Powell as the sister of NBA star Devin Booker, but her story extends far beyond her famous sibling.

Very energetic post, I loved that a lot. Will there be a part 2?

of course like your web-site however you need to test the spelling on several of your posts. Many of them are rife with spelling problems and I to find it very troublesome to tell the reality nevertheless I will definitely come again again.

Otherwise, there are not any recognised predominant facet results or dangers related to the , however once more, that is because of a lack of studies and checking out of the device.Keep in thoughts that the is not FDA authorized to be used within the United States due to its loss of tection and efficacy checking out. Quick Extender Pro This tool has passed through trying out to comply with rigorous tection requirements according to the European General Medical Device Directive, and it's miles taken into consideration a Class I CE certified clinical tool. However, this is not a substitute for the rigorous checking out that gadgets ought to go through to acquire FDA apval. With use, you can start to be aware an universal lengthening of your penis while it’s flaccid. Many clients declare to see their first effects in 3 months or fewer. You can extend the adjustable rods farther outward to encourage extra length and thickness till you’re satisfied with your outcomes. https://niagaraopendata.ca/user/quick-extender-pro

Success with the Quick Extender Pro relies on consistent use over an extended period. The gradual application of tension allows the body to adapt and grow without causing excessive strain or injury. The Quick Extender Pro offers several potential benefits for users looking to enhance their penile dimensions and overall sexual satisfaction. This section outlines the advantages of using this device, supported by scientific principles and user experiences. One of the most significant benefits of the Quick Extender Pro is that it provides a non-surgical alternative to penile enhancement. Unlike surgical procedures, which carry risks of complications and require significant recovery time, the Quick Extender Pro offers a safer and less invasive option.
https://niagaraopendata.ca/user/quick-extender-pro

My brother recommended I would possibly like this website. He used to be entirely right. This put up truly made my day. You can not consider simply how much time I had spent for this information! Thank you!

Highly energetic post, I liked that bit. Will there be a part 2?

What i don't understood is in reality how you are not really a lot more neatly-favored than you might be now. You're very intelligent. You already know therefore significantly in terms of this matter, produced me in my opinion imagine it from so many numerous angles. Its like men and women are not interested unless it's something to do with Girl gaga! Your own stuffs nice. At all times handle it up!

I know this if off topic but I'm looking into starting my own blog and was wondering what all is needed to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very web smart so I'm not 100% certain. Any tips or advice would be greatly appreciated. Thanks

Whats up 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 greatly appreciated!

Greetings from California! I'm bored at work so I decided to browse your blog on my iphone during lunch break. I enjoy the info 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 cell phone .. I'm not even using WIFI, just 3G .. Anyhow, awesome blog!

I'm impressed, I must say. Rarely do I come across a blog that's equally educative and entertaining, and let me tell you, you have hit the nail on the head. The issue is something which not enough men and women are speaking intelligently about. I am very happy I stumbled across this during my hunt for something relating to this.

Thanks a bunch for sharing this with all of us you really recognize what you're talking about! Bookmarked. Please additionally discuss with my site =). We could have a link alternate contract between us

I go to see every day some web pages and information sites to read posts, however this web site gives feature based content.

Thanks to my father who stated to me regarding this blog, this web site is truly amazing.

A motivating discussion is definitely worth comment. I do believe that you need to publish more on this subject, it may not be a taboo subject but typically people do not speak about these topics. To the next! Best wishes!!

Hi there, I enjoy reading all of your article. I like to write a little comment to support you.

Great post. I was checking constantly this blog and I'm impressed! Very helpful info particularly the last part :) I care for such information a lot. I was seeking this particular information for a very long time. Thank you and good luck.

Its not my first time to pay a quick visit this web page, i am browsing this web site dailly and take fastidious data from here everyday.

Hey there! Someone in my Myspace group shared this website with us so I came to look it over. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers! Fantastic blog and brilliant design.

What i do not understood is if truth be told how you are now not actually a lot more smartly-liked than you may be now. You are very intelligent. You understand thus significantly in relation to this subject, made me for my part consider it from a lot of numerous angles. Its like men and women don't seem to be interested until it's one thing to do with Lady gaga! Your individual stuffs excellent. All the time care for it up!

You could certainly see your skills in the work you write. The arena hopes for more passionate writers like you who aren't afraid to say how they believe. All the time go after your heart.

Hey! I know this is kinda off topic however I'd figured I'd ask. Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa? My site goes over a lot of the same topics as yours and I feel we could greatly benefit from each other. If you might be interested feel free to shoot me an e-mail. I look forward to hearing from you! Great blog by the way!

Thanks for any other magnificent post. The place else may anybody get that type of information in such a perfect means of writing? I've a presentation subsequent week, and I am on the look for such information.

We are a group of volunteers and starting a new scheme in our community. Your website offered us with valuable info to work on. You've done a formidable job and our whole community will be grateful to you.

Добрый день, автолюбители!

Ищете опытный автосервис, который специализируется на ремонте выхлопной системы? В «Катализатор» в Ярославле мы предлагаем только самые качественные услуги:

Наши услуги:

Удаление катализатора
Ремонт и замена глушителей
Установка и замена гофры, пламегасителей и резонаторов
Ремонт фланцевых соединений
Компьютерная диагностика
Мы гарантируем высокое качество и качественное выполнение работ. Ваш авто в надежных руках!

Не упустите возможность! Узнайте больше о наших услугах и запишитесь на прием на нашем сайте:<a href=https://katalizator-yaroslavl.ru/>https://katalizator-yaroslavl.ru/</a>.

С уважением,

Команда «Катализатор»

Pages

Add new comment