Các công việc cần thiết xây dựng website công ty bằng Drupal 8

Các công việc cần thiết xây dựng website công ty bằng Drupal 8

Last week, we launched our new company site built in Drupal 8. Previously, it was a Drupal 6 site built ages ago and in high need of a redesign anyway. So, with Drupal 8 around the corner, what better way to learn Drupal 8 and help development at the same time?

We started exploring around the time of the first beta, and decided to write up all the bumps in the road we encountered along the way. Overall, it was a great experience and we even managed to squeeze in a patch or two to fix some bugs. Drupal 8 clearly has a lot of improvements for everybody: developers will enjoy the solid framework, frontend people get Twig, and I can't wait to show clients the quick edit functionality.

General tips and notes:

  • The site does not use any contrib modules. Most of the common ones we use are now in core. We did use the Devel module during development.
  • We did built some custom modules, mostly for some custom blocks. More on those below.
  • We usually use Display Suite, but with the new powers from the Twig templating system, we didn't miss it.
  • Drupal 8 is installed with production settings by default. So make sure you have debugging enabled in your development environment by using the example.settings.local.php file located in sites/default.
  • Getting a WSOD or fatal error? First try running update.php, rebuild.php, and/or manually clearing the cache tables and remove the php directory in the files folder (rebuild.php does this for you).
  • Upgrade to Drush 7 or else drush won't work in Drupal 8.
  • Enable Twig debugging by using development.services.yml (see services.yml for examples).
  • The Devel module also has a new debugging tool called Kint.
  • If all that doesn't help, try this core patch which will give you a lot more detailed debug information on fatal errors.
  • Minor thingy: Google webmaster warns about robots.txt having invalid syntax.

Chasing Drupal 8 betas:

  • There is no beta-to-beta upgrade path (not yet, but it's close). Because of this I felt chasing head was the better choice. That way you can easier track down changes that might break your site or need database updates.
  • Speaking of changes, keep a close eye on the Drupal 8 changelog, everything is documented there with references to issues.
  • For example: the latest beta6 release requires you to have the link module enabled, because shortcut depends on it. If you upgrade to beta6 or higher from a previous copy and do not have the link module enabled you will get a fatal error.

Multilingual:

  • The site we built is in Dutch, but we wanted to have it "multilingual ready" (e.g. have the language prefix) so we used the multilingual modules which are in core.
  • Upgrading was difficult due to database update issues which seem to be fixed now.
  • Drupal was never as multilingual as Drupal 8 is, but expect bugs as this is still under heavy development.
  • Gabor has written a great series of posts about multilingual Drupal 8 tidbits. Highlyrecommended because it also touches some core concepts in Drupal 8 like content and configuration entities.

Custom modules we built:

  • We built a custom module to register a custom path we use as frontpage for the background-video at the top of the page. That way we can include the javascript library (jquery-backgroundvideo) using a libraries.yml file included in the module.
  • This router also generates some custom meta tags for our frontpage.
  • We also made some programatically created blocks. These are used for the testimonials flexslider to load some custom blocks using entityQuery and entity_load_multiple. Super easy! (at the time, this was not yet possible with views, but seems to be fixed now)

Concluding: we are very excited about Drupal 8 and I can highly recommend building your own company site in D8 at this time, although I wouldn't use it for most client work just yet.

You can find similar blog posts with even more very useful information below. They certainly were useful for us, so thanks!

Bạn thấy bài viết này như thế nào?: 
Average: 5 (1 vote)
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
iOS, Android và Windows Phone

iOS, Android và Windows Phone

Hiện nay, thế giới smartphone đang bị thống trị bởi một số hệ điều hành lớn như iOS, Android, Windows Phone hay BlackBerry.

Jotta

Jotta - cho phép phục hồi dữ liệu đã xóa

Việc sao lưu và lưu trữ các dữ liệu quan trọng là vô cùng cần thiết, vì đôi khi bạn không thể biết chiếc máy tính của mình có thể gặp những sự cố gì. Các tài liệu quan trọng, các dự án hay đơn giản là những bức ảnh kỷ niệm của bạn có thể bị mất sau một sự cố nào đó. Do đó các công cụ lưu trữ đám mây hiện nay ngày càng phát triển, bên cạnh việc bảo vệ các dữ liệu của bạn một cách an toàn, chúng còn giúp bạn truy cập dữ liệu của mình ở bất kỳ đâu với các thiết bị kết nối internet.

Facebook - iOS14.5 chính thức update toàn và điều gì mong đợi

Facebook - iOS14.5 chính thức update toàn và điều gì mong đợi

Vào ngày 26.04.2021 Apple chính thức ra mắt rộng rãi phiên bản iOS 14.5. kèm theo đó là những động thái rất ráo riết của các nền quảng cáo trong đó có Facebook

Công ty diệt chuột T&C

 

Diet con trung