Apr 12 2017
Apr 12

As a Swiss-based Drupal Agency, we have to create a lot of multilingual sites. Since Switzerland has three official languages (German, French, Italian) and even one more national language (Rumantsch), we are used to this requirement and we found our way with Drupal to make this an easy task (usually). We mainly used node translations in Drupal 7 for maximum flexibility. We used to separate languages from each other using the various i18n modules, language specific menus, blocks, URL-patterns, terms and so on.

With Drupal 8, things changed.
I struggled a little doing multilingual sites in Drupal 8 the same way I was used to in Drupal 7 because node translation is not available anymore (which is good) so I had to find another way to achieve the same easy to handle translations system. For us and for our clients. Let me explain, what I have learned.

Drupal 8 multilanguage

Image: drupal8multilingual.org

Drupal 8 issues multilanguage challenges

Challenge 1: Node add / edit menu handling

The main challenge I had using Drupal 8, was the ease to build your menus directly from the node creation page. You can do it, but only for the initial language. If you try to add a translated node to another menu or rename the item, it always ends up moving / renaming the source node instead of adding a link to the translation. So it can become quite confusing building a navigation directly from the node creation page or to add translations to the menu. A workaround was to add all navigation items manually in the menu administration if you are using a menu per language. With lots of languages and menus / items, this is not really a convenient task. Fortunately, translations from the node creation page have been implemented with a later release of Drupal 8.

Challenge 2: Untranslated Nodes show up in Menu

Another thing which bothered me was that untranslated nodes show up in the navigation (if you use only one menu). This can be quite confusing since most of the times not every page is translated in every language. Or in some languages, you need a little more than in others. You can read a lot about this topic and the reasons behind (e.g. here and here). However you do it, it’s always wrong in some situations and perfectly fine in others. But to be “limited” and “locked in” to a certain way is not nice and you have to deal with it. To sum up, once a node is put into a menu, it will show up everywhere. Regardless if there are translations or not.

Challenge 3: Language Switcher shows all languages – always.

Somewhat confusing is the Language Switcher. In Drupal 7, a language link was not available or strikethrough if there was no translation available. In Drupal 8, every language is always visible and linked. So if you look on a German page which is only available in German, the language switcher will present you all language links to the same node. A click on those language links mainly changes the interface language but the node content remains the same (since not translated). Usually also with a drupalish URL (node/xxxx) because there is no translation for the node and therefore also no URL alias available. This behavior is confusing and wrong in my point of view

An example to illustrate the above-written challenges.

multilanguage issues with Drupal 8

English Front-Page with mixed navigation items.

The screen above shows an installation with 2 languages (English and German). The English Page is a basic page which has a translation. English is selected. If you choose Deutsch on the language switcher, the English Page becomes Deutsche Seite (see image below) and shows the German content. So far so good. But the second menu item you see with the title Über uns (nur Deutsch) should not appear here since it’s only available in German. But it does. And if you actually go on this page, you will see the German text with everything English around it and no URL-Alias (/node/2 in this example). This is usually not very useful for us.

multilanguage issues with Drupal 8

German only Page – Language Switcher visible.

Also, the language switcher shown in the image above is from my point of view wrong or not very useful. It shows a link to the English version, but there is no English translation for this node. So why is it there? To see a German page with English decoration? Not sure. But I want to get rid of this link or at least modify it to be stroked through if the language is not available.

How to fix improve this?

Luckily, the Drupal community is always good for help. After some “research” on the web, I finally found (besides lots of discussions and comments in the issue queues) a way to achieve the desired setup.

To sum up again: I want to see only menu items which are available in my language and only see a link to another language, if a translation is available.

Since there is no patch and still some ongoing discussions on drupal.org you need to implement it on your own. Implement the following two modules.

Hide untranslated menu items

Code from https://www.drupal.org/node/2466553#comment-11991690. Credits go to michaelkoehne.

<?php use Drupal\Core\Menu\MenuLinkInterface; use Drupal\menu_link_content\Plugin\Menu\MenuLinkContent; use Drupal\Core\Language\LanguageInterface; /** * Implements hook_preprocess_menu(). */ function MYMODULE_preprocess_menu(&$variables) { if ($variables['menu_name'] == 'main') { $language = Drupal::languageManager() ->getCurrentLanguage(LanguageInterface::TYPE_CONTENT) ->getId(); foreach ($variables['items'] as $key => $item) { if (!$variables['items'][$key] = MYMODULE_checkForMenuItemTranslation($item, $language)) { unset($variables['items'][$key]); } } } } function MYMODULE_checkForMenuItemTranslation($item, $language) { $menuLinkEntity = MYMODULE_load_link_entity_by_link($item['original_link']); if ($menuLinkEntity != NULL) { $languages = $menuLinkEntity->getTranslationLanguages(); // Remove links which are not translated to the current language. if (!array_key_exists($language, $languages)) { return FALSE; } else { if (count($item['below']) > 0) { foreach ($item['below'] as $subkey => $subitem) { if (!$item['below'][$subkey] = MYMODULE_checkForMenuItemTranslation($subitem, $language)) { unset($item['below'][$subkey]); } } } return $item; } } } function MYMODULE_load_link_entity_by_link(MenuLinkInterface $menuLinkContentPlugin) { $entity = NULL; if ($menuLinkContentPlugin instanceof MenuLinkContent) { $menu_link = explode(':', $menuLinkContentPlugin->getPluginId(), 2); $uuid = $menu_link[1]; $entity = \Drupal::service('entity.repository') ->loadEntityByUuid('menu_link_content', $uuid); } return $entity; }

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

<?php

use Drupal\Core\Menu\MenuLinkInterface;

use Drupal\menu_link_content\Plugin\Menu\MenuLinkContent;

use Drupal\Core\Language\LanguageInterface;

/**

* Implements hook_preprocess_menu().

*/

function MYMODULE_preprocess_menu(&$variables) {

  if ($variables['menu_name'] == 'main') {

    $language = Drupal::languageManager()

      ->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)

      ->getId();

    foreach ($variables['items'] as $key => $item) {

      if (!$variables['items'][$key] = MYMODULE_checkForMenuItemTranslation($item, $language)) {

        unset($variables['items'][$key]);

      }

    }

  }

}

function MYMODULE_checkForMenuItemTranslation($item, $language) {

  $menuLinkEntity = MYMODULE_load_link_entity_by_link($item['original_link']);

  if ($menuLinkEntity != NULL) {

    $languages = $menuLinkEntity->getTranslationLanguages();

    // Remove links which are not translated to the current language.

    if (!array_key_exists($language, $languages)) {

      return FALSE;

    }

    else {

      if (count($item['below']) > 0) {

        foreach ($item['below'] as $subkey => $subitem) {

          if (!$item['below'][$subkey] = MYMODULE_checkForMenuItemTranslation($subitem, $language)) {

            unset($item['below'][$subkey]);

          }

        }

      }

      return $item;

    }

  }

}

function MYMODULE_load_link_entity_by_link(MenuLinkInterface $menuLinkContentPlugin) {

  $entity = NULL;

  if ($menuLinkContentPlugin instanceof MenuLinkContent) {

    $menu_link = explode(':', $menuLinkContentPlugin->getPluginId(), 2);

    $uuid = $menu_link[1];

    $entity = \Drupal::service('entity.repository')

      ->loadEntityByUuid('menu_link_content', $uuid);

  }

  return $entity;

}

Hide untranslated languages in language switcher

Code from https://www.drupal.org/node/2791231#comment-12004615 (slightly adapted. Links get a class, not removed by default). Credits to Leon Kessler.

<?php /** * @file * Hide language switcher links for untranslated languages on an entity. */ use Drupal\Core\Entity\ContentEntityInterface; /** * Implements hook_language_switch_links_alter(). */ function MYOTHERMODULE_language_switch_links_alter(array &$links, $type, $path) { if ($entity = MYOTHERMODULE_get_page_entity()) { $new_links = array(); foreach ($links as $lang_code => $link) { try { if ($entity->getTranslation($lang_code)->access('view')) { $new_links[$lang_code] = $link; } } catch (\InvalidArgumentException $e) { // This language is untranslated so do not add it to the links. $link['attributes']['class'][] = 'not-translated'; $new_links[$lang_code] = $link; } } $links = $new_links; // If we're left with less than 2 links, then there's nothing to switch. // Hide the language switcher. if (count($links) < 2) { $links = array(); } } } /** * Retrieve the current page entity. * * @return Drupal\Core\Entity\ContentEntityInterface * The retrieved entity, or FALSE if none found. */ function MYOTHERMODULE_get_page_entity() { $params = \Drupal::routeMatch()->getParameters()->all(); $entity = reset($params); if ($entity instanceof ContentEntityInterface) { return $entity; } return FALSE; }

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

<?php

/**

* @file

* Hide language switcher links for untranslated languages on an entity.

*/

use Drupal\Core\Entity\ContentEntityInterface;

/**

* Implements hook_language_switch_links_alter().

*/

function MYOTHERMODULE_language_switch_links_alter(array &$links, $type, $path) {

  if ($entity = MYOTHERMODULE_get_page_entity()) {

    $new_links = array();

    foreach ($links as $lang_code => $link) {

      try {

        if ($entity->getTranslation($lang_code)->access('view')) {

          $new_links[$lang_code] = $link;

        }

      }

      catch (\InvalidArgumentException $e) {

        // This language is untranslated so do not add it to the links.

        $link['attributes']['class'][] = 'not-translated';

        $new_links[$lang_code] = $link;

      }

    }

    $links = $new_links;

    // If we're left with less than 2 links, then there's nothing to switch.

    // Hide the language switcher.

    if (count($links) < 2) {

      $links = array();

    }

  }

}

/**

* Retrieve the current page entity.

*

* @return Drupal\Core\Entity\ContentEntityInterface

*   The retrieved entity, or FALSE if none found.

*/

function MYOTHERMODULE_get_page_entity() {

  $params = \Drupal::routeMatch()->getParameters()->all();

  $entity = reset($params);

  if ($entity instanceof ContentEntityInterface) {

    return $entity;

  }

  return FALSE;

}

Please note: The code above is from Drupal.org and therefore thanks to the original authors linked above.

Enable those two modules and you’re all set!

I did not encounter any issues yet using those two modules. If ever something changes in the way Drupal handles those cases, you just need to switch off the modules and everything should be back to normal. So nothing to lose right?

There are other attempts to this by altering the menu block. One of them is Menu Block Current Language but I had no luck with this one. On my most recent project, it worked with one menu but not if you separate your menu by two blocks (different starting levels).

I would love to hear how you guys handle those cases or how you deal with I18N in general. I’m sure there are a gazillion other ways to do it.

Apr 01 2014
Apr 01

The last week three of us from Cocomore went to the little town of Szeged in Hungary, around 175km south east of Budapest.

The DevDays were all about developing Drupal 8 further and enhance drupal.org. The only topic was contributing to Drupal in the one way or the other. Whatever you are, either a developer, a themer, a site builder, a devop or a business man, everyone has his/her part in this amazing community and everyone found a spot where he/she could help to foster Drupal further.

GroupPhoto

All the week there were sprints and mentors around if you needed to get started and from Thursday till Saturday there were a lot of very interesting sessions. While the Cons are heading more and more to be business orientated lately and the camps are mostly for the local communities, the DevDays are a community event, where everything centers on contributing. Core committers around the world joined this event and some received a scholarship, so that they had the opportunity to be there, too.

It was a very successful and exhausting week for all of us. We had a great time, met a lot of people and for sure had the one or other drink with them. A lot of things got done. Drupal 8 is now a big step further to becoming a beta and drupal.org will have a responsive design. Much of work for that was done in this particular week. And all of this couldn't have happened without the outstanding work of the organization team. So a very big kudos to them!

Organization Team

And now get some good impressions of all the stuff in form of some cool pictures and tweets from the last week by Gábor Hojtsy

[embedded content]

Also don't miss out of the Drupalfolk Song!

[embedded content]

Drupalfolk from Rafa Terrero on Vimeo.

Thanks to everyone who made this happen and everyone who attended the week, which made this time just so amazing!

See you all next year again at the next DrupalDevDays, where ever they will be or at any other upcoming DrupalCamps (like Frankfurt, add Spain here?) or Cons (like Amsterdam).

Jan 17 2014
Jan 17

[embedded content]

The Internationalization Tag Set 2.0 has now the status of an official W3C-recommendation. Cocomore participated in the development of this standard for encoding information that increases the quality and efficiency of translation and internationalization on the web. Within the EU sponsored LT-Web project we did not only contribute to the standard. We also created a number of reference implementations that put it into practice and demonstrate its benefits. A lot more detail on what we did in the project can be found in the official project deliverables that are now online (we were responsible for D3.1.1, D3.1.5, D5.1.1). Below are short summaries.

Drupal Modules

Within D3.1.1 of the MultilingualWeb-LT project Cocomore implemented modules for translation and ITS2.0 handling within the open-source CMS Drupal. The implementations are based on the translation management (TMGMT) module available for Drupal as a community module (https://drupal.org/project/tmgmt). The implementations provide the following functionality:
  • Base TMGMT module models translation workflow with external LSPs in Drupal
  • Cocomore’s extensions added the following abilities:
    • Handle ITS 2.0 throughout the whole workflow
    • Apply global ITS 2.0 metadata at content node level
    • Handle ITS 2.0 annotation in Drupal WYSIWYG-editors (where content is produced). Annotation via menu bar, context menu, keyboard shortcuts.
    • Standalone ITS 2.0 editor (jquery Plugin) to support annotation in a separate process step, without modifying the actual content. Annotation via menu bar, context menu, keyboard shortcuts.
    • Localization chain interface: Round-tripping of data to/from LSP‘s TMS, including automatic data export and re-import
    • Interface with Enrycher for automatic annotation
These functionalities are embodied in the following modules:
  • Drupal TMGMT Workflow (TMGMT-module extension) to allow workflows with ITS 2.0 annotation
  • Drupal WYSIWYG editor: Plugin for ITS 2.0 annotation
  • Drupal TMGMT Translator Linguaserve: Localization chain interface (see also D3.2.2 and D4.1.3)
  • JQuery plugin for ITS 2.0 annotation in a separate step (new implementation)
  • Drupal Enrycher Integration (see also D3.1.3)
The modules are released under GNU General Public License 2 and can be downloaded and modified. They are available at the following URLs:

ITS 2.0+CMS: Best Practices

One important application for ITS 2.0 is the preparation of web content within a CMS for optimized localization/translation. This is best done by implementing ITS 2.0 directly inside a CMS. The experiences gathered in this context within the MultilingualWeb-LT project are summarized in a best practice documentation published as D3.1.5. It discusses topics that occur when using ITS 2.0 in connection with a CMS, and suggests ways to deal with these topics. The document is informed by the experiences gathered in the MultilingualWeb-LT project, where an ITS 2.0 aware translation workflow was implemented within the open source CMS Drupal. Its aim however is to provide guidance independent of the CMS as far as possible. An important aspect are therefore the characteristics of the CMS that interact with ITS usage and handling. However, not all internationalization-related issues can be resolved by the special markup described in ITS 2.0. The best practices in this document therefore go beyond application of ITS markup to address a number of problems that can be avoided by correctly designing the XML format, and by applying a few additional guidelines when developing content. This document and Internationalization Tag Set (ITS) Version 2.0 implement requirements formulated in the W3C Working Draft Requirements for Internationalization Tag Set (ITS) 2.0.

Drupal Machine Translation Training Module

Within D5.1.1 of the MultilingualWeb-LT project Cocomore implemented a module to send aligned original and translated data with ITS 2.0 markup to a machine translation (MT) provider for data driven creation or optimization of machine translation engines or models. The most common use case will be to train or tune a statistical MT model based on the aligned data and give special consideration on top of the standard techniques to the knowledge that is encoded in the ITS 2.0 markup. But other use cases, like the systematic identification of problematic cases for manual adjustment of a rule based MT system are also conceivable.. While ITS aware MT training was explored in more detail in D 5.2, the scope of this deliverable is the extraction of annotated and aligned bilingual data from the Drupal CMS. This process is based on the ITS 2.0 capabilities added to Drupal as described in the deliverables for WP 3. It was successfully tested in the context of the business case described in these deliverables (translation of VDMA press releases). Based on 141 press releases that were translated from German to French and Chinese. we could provide a three-way parallel annotated corpus of some 12.000 sentences.
Jul 31 2013
Jul 31

On Saturday 20th, Jesús and I visited Santander for attending the Drupal Day. The Drupal Day is an itinerant event organized by the Spanish Drupal Association with a local Drupal community.

Around 80 drupalistas were there, and we had very interesting session, mostly centered around the new things that are coming with Drupal 8. Is a great thing that more and more people in the Spanish community is getting involved in core contributions and attending international events, and IMHO this is making Spanish events more interesting every time.

Drupal Day Spain Santander Group Photo

For trying to attract more contributors, we celebrated a short sprint the evening before, and some new people were introduced about core development workflows, but could have been better if we could have spent more than just two or three hours. We should iterate on improving that for next events, but was nice anyway.

Sessions were recorded, so videos of every session should be available soon in the Spanish Association video channel on Vimeo.

Drupal Day Santander Logo

We want to thank to the local community in Santander, they did a gorgeous job organizing the event and innovating with Drujitos (a blue version of mojito) for the party. And of course, thanks Cocomore for sponsoring our assistance there!

Oct 23 2012
Oct 23

A case study in re-platforming latingrammy.com

Requirements

The previous version of the site was built on Ruby on Rails in a custom content management system that allowed administrators of the site to have content types, categories, and even translations. This was all stored in a MySQL database with a simple schema that allowed for a pretty easy migration into Drupal.

The task was to re-create the entire site within Drupal, keeping the exact same content types, content, and existing design with the exception of a new homepage, new header and new footer. The new homepage design is based off of the current Grammy.com's homepage design.

Previous Homepage:
old

Newest Homepage:
new

The Recording Academy wanted to re-platform this on Drupal for a couple of reasons. The first is that since Grammy.com is on Drupal 6 and will be upgraded to Drupal 7 before the next annual awards show, we could leverage some of the work in building the Latin Grammys website with Drupal 7 for the upgrade of Grammy.com itself. The second reason was to bring the site more inline with Grammy.com in terms of capabilities in content editing, advertising, and future enhancements to the site could be leveraged from any improvements that end up being made on Grammy.com.

Migration

For the migration work on this project, we decided to create a custom drush command that could run the various migration scripts. The scripts are split out by content type: each script migrating the pertinent information for a particular content type. They are comprised of a simple function that runs bootstrapped Drupal code to take data from the old Ruby database and transform it for the new Drupal database.

You can find the code for this custom drush command, $ drush lmi in this gist.

We then have one simple bash script that runs drush commands in succession, like so:

# Clean install using our installation profile written with profiler.
drush site-install lagra -y
drush upwd admin --password="admin"
drush fra --force -y
drush dis overlay -y
drush cc all

# Migrate taxonomy terms.
drush lmi tag
drush lmi genre
drush lmi award

# Migrate content.
drush lmi event
drush lmi nominee
drush lmi page
drush lmi photo
drush lmi podcast
drush lmi press_release
drush lmi sponsor
drush lmi video import

You may also notice that within that bash script, we are installing Drupal from scratch with a custom install profile called 'lagra'. This installation profile is using Profiler and does some simple enabling of core modules, contrib modules, custom features, and sets a few initial variables within the variables table. If you haven't looked into using Profiler on your projects, you should. It allows you to do some pretty complex operations with very simple syntax right in your profile's .info file.

You can find the code for this custom install profile in this gist.

What this all leads to is a relatively simple and quite an efficient way to completely reinstall the entire project from scratch at any given point. All of the features of the site are in custom Features modules, and the migration scripts run automatically, so a fresh install of the project is as easy as running $ ./docroot/scripts/reset.sh at any given time. We found this led to a very rewarding workflow during the entire duration of the project.

Translation

Another huge requirement for the site (in fact, one we underestimated) was the use of three different languages on the site: English, Spanish, and Portuguese. For this we had to add a whole slew of i18n_* modules. Here's the list:

  • Internationalization (i18n)
  • Block languages (i18n_block)
  • Menu translation (i18n_menu)
  • Multilingual content (i18n_node)
  • Path translation (i18n_path)
  • String translation (i18n_string)
  • Taxonomy translation (i18n_taxonomy)
  • Translation sets (i18n_translation)
  • Variable translation (i18n_variable)
  • Views translation (i18nviews)
  • I18n page views (i18n_page_views)

Challenges

The old Ruby system had a very competent system for managing translations of content. However, not all content in the system was translated, and so there were some challenges in making sure that we could switch to a different language and not have the page show up empty simply because the content was not translated for that particular views listing. The listing being empty was not ideal from a user's standpoint, nor from a content editor's standpoint. So we opted to do a little extra work in the migration scripts for the particular content types that did not have translations. We simply created the English version of the nodes, and at the same time used the same copy for the translations. This resulted in populated views for each language, and an ideal way for content editors to browse the listings and quickly know what content needed to be translated, hit an edit button, and then translate.

Another challenge we didn't account for was all of the strings that are not translated automatically. The String translation module was easy enough to use for most cases, but for the times we found it lacking, we ended up using the String Overrides module to fill in the gaps.

We also found that keeping string translations in code was problematic. We opted for using the $conf array like so:

<?php
global $conf;
$conf['locale_custom_strings_es'][''] = array(
 
"You must be logged in to access this page." => "Debes estar registrado para acceder a esta página.",
);
?>

However, this also became an issue once we decided to start using the String Overrides module because the $conf array would simply override any translations we would put in the String Overrides UI. So, we opted to use this $conf array method to get the values into the database initially (hitting save in the String Overrides UI) and then just remove the $conf array. Then, we could use the UI to translate the few strings that remained.

This is still something we haven't solved, so if you have any suggestions on easily keeping string translations in code (à la Features), we would love to know about it in the comments!

Involvement

The following were involved in this project at various stages and in various roles:

In order of code contributions.

brockboland

Brock Boland: Developer at Lullabot

sirkitree

Jerad Bitner: Senior Developer & Technical Project Organizer at Lullabot

davexoxide

David Burns: Senior Developer at Lullabot

makangus

Angus Mak: Developer at Lullabot

blc

Ben Chavet: Systems Administrator at Lullabot

Bao_Truong

Bao Truong: Software/Web Developer at The Recording Academy

Sep 07 2012
Sep 07

Drupal 8 Multilingual Initiative Code Sprint weekend

I took a train from Frankfurt (Germany) down to Munich the Saturday before the DrupalCon. When I joined the Multilingual Sprint on Sunday morning, many of them had already been sprinting for a full day and a number of issues were ready for review, so I dived in, observing the behavior of Drupal 8 before and after applying patches, proof-reading the patches for anything odd (e.g. typos in the documentation), discussing the issues in comments and in IRC with people who were sitting just across the room (other times actually speaking in person). By the end of the day, instead of the dozen or so people that Gábor Hojtsy, the Multilingual Initiative team lead, had expected, there were close to 50 people at the location, some joining us in the work on Multilingual issues, some working on other Drupal 8 tasks, and some who were just arriving in Munich and followed the Tweets to where we were. Luckily, the location rented for the Saturdays and Sundays before and after the DrupalCon week was big enough to accommodate all the extra arrivals.

While on the topic of the venue we used for those weekends, I’d like to personally thank Stephan Luckow and Florian (“Floh”) Klare of the Drupal-Initiative e.V. for all that they did to find a nice place that would still leave us with a budget for food and for their valiant work on stretching the food budget while still serving up excellent fare, in keeping with the fantastic meals we enjoyed the rest of the week. Instead of ordering delivery, they prepared almost everything themselves, including beautiful open-face sandwiches, fruit platters, and lovely grilled specialties at a club we went to where you can barbecue in the Biergarten.

…thanks for the huge help to the local organizers, especially Florian Klare and Stephan Luckow. They helped us manage collecting and spending sponsor money wisely with the Drupal Initiative e.V, prepared great sandwiches and fruit plates for us and even organized a sprinter party night with grill food. It was amazing to work with such helpful and flexible local organizers.
Gábor Hojtsy, September 5, 2012

Luckow and SirFiChi of the Drupal Initiative, organized the location and made us great food!

Since people were “fresh”, I think a lot of work got done on the first weekend and the Monday before the conference (more than 50 people joined us and worked on various core initiatives on Monday in the room we later used for core most conversations at the Sheraton), which also meant that issues were still fresh in our minds while we had days of sessions and conversations, so when we started sprinting again on Friday we had lots of new ideas for the tasks we were still working on. Friday’s sprints were at the Westin Grand, where there was great attendance both upstairs in the main room as well as a large room downstairs from it, where Drupalize.me hosted a core contribution workshop to ease people into the process of contributing to core. I decided to go to that workshop since I’m still pretty new to it all and found a few people sitting nearby who were I was also able to interest in some Multilingual tasks, so while the main group sprinted upstairs, we also worked downstairs. Later on, I came upstairs, and since there were not a lot of simpler tasks for “core newbies”, like myself, I took some time to sprint on a module I contributed some time back, before there was much of anything for Drupal 7 in the area of “multilingual”… and tried to make my module more multilingual-friendly. I got a few good commits and a new release out for Internal Links and also recruited a colleague to look at the code with me, provide some ideas, and become another maintainer. So I personally found Friday quite productive.

*/ First off, a sprint on this scale would not be possible without sponsors and significant on-site help. DrupalCon provided us with space on Monday and Friday, and some great food on Friday. The rest of the days would not have been doable without comm-press, dotProjects.be, Open8.se, OSINet and Acquia. The [ … ] financial sponsorships they provided paid for our weekend venue [ … ].

I continued sprinting with the Multilingual initiative at the Film Coop Saturday and Sunday, leaving mid-afternoon on Sunday to get back to the train station. When I left the other sprinters, Webchick was only finally getting some rest after her trip home and we had about 20 issues that were marked “RTBC”. In all, there were dozens of issues tackled over the weekend. For a complete overview of all the issues we made progress on, see Gábor’s post about the sprints, where you can also check out his excellent DrupalCon core conversation presentation, “Drupal 8’s Multilingual Wonderland”. There is still a lot to do in the time between now and the “feature freeze” deadline, but we made good progress in the DrupalCon sprints, so hopefully we can push on and get the rest of the critical tasks done in the time remaining.

One of the less trivial tasks I took on during the final sprint weekend was documenting the new language_select field type, which involved checking out the Drupal API (documentation) project, updating the Form API table to include a new Element column (language_select) and Property row (#languages), as well as information about these (below the table) and linking them in all the appropriate places. Currently, updating this page is a bit of a pain, but hopefully we will move to a better system for maintaining this information, perhaps even automated generation. While I’d worked on other Drupal documentation pages before, this was the first time I’d actually contributed patches to update the API, so it was a good learning experience.

If you’d like to help out with the Multilingual initiative or other core contribution, you might first want to take a look at the Drupal 8 Initiatives page, where announcements about coming IRC meeting can be seen. This page also has links to the news, roadmaps, filtered issues, and other pertinent information. Drupalladder.org is also a great place to go for lessons to help you work through the steps of being ready to contribute to Drupal core.

I look forward to seeing you all in IRC and in coming code sprints.

Sep 07 2012
Sep 07

I started writing this post at the DrupalCon and then continued work on it on the train back home after a long week, last Sunday after the code sprints—even now, more than a week later (after being ill for a week—I think I was burning the candle at both ends for a bit too long), it’s hard to believe that it’s finally over. I arrived the weekend before to participate in the pre-con code sprints and stayed for the Friday–Sunday after the conference to continue that effort. I’ll write about the sprints in another post. This one will cover the highlights of the actual DrupalCon, what I think worked well, and recommendations for those attending their first DrupalCon; with two new continents getting a ’con this year, I think there will be more than a few at their first.

The food at DrupalCon Munich was great

For me, one of the major highlights of this conference was the outstanding food quality. It was so good I was distracted enough I never pulled out my camera to take photos of i, but it was attractive, gourmet, and delicious and there was something for everyone, even a fantastic salad buffet as well as more desserts than anyone could try… and hot dishes with plenty of options for both vegetarians and omnivores, alike. In the closing plenary, it was revealed that the catering costs for the event were about €352,000 for the 1800+ of us in attendance; not surprising for the quality and abundant variety of fare they served us. Food service tables were put in place in all areas of the conference so that there was no crowding into one area and the same dishes were provided at both the Sheraton and the Westin Grand, which were a few minutes’ walk away from each other. The conference occupied the three conference center floors of the Westin Grand and a few smaller rooms in the Sheraton, which were primarily “core conversations”. One might think I would gorge myself, but most days I had simple salad items, walnuts, and seeds… and gave myself a break before finishing with some fresh fruit and a light mousse from the dessert buffet. Despite the fact that the days were hot and many of the rooms weren’t well conditioned, people were alert and in good spirits and I think the food had more than a bit to do with that.

To continue a moment in the vein of “food”, since I really do think it was notable at this DrupalCon, I hope this reflects some new recognition of the importance of good sustenance when organizing a successful event like this. And I hope that future Drupal events will also place emphasis on food quality. That said, I also think that the community would pull together if we had commercial kitchen space and quality ingredients—we could prepare similar gourmet meals without quite the budget we used for catering at this conference; on the other hand, such a model might work better at one of the large DrupalCamps (a few hundred attendees) than at a huge (North American or European) DrupalCon. Of course preparing our own food would provide another place for people to connect (food preparation and more volunteer service), which I think would offset the downsides (not being able to be someplace else whenever you have “kitchen duty”).

The Venue

munich_olympic-park.jpg

Munich is a beautiful city I’d never really visited before the DrupalCon. Public transportation was not too expensive, but I got to see a bit more of Munich by walking almost everywhere, so my walks back from the pre-conference sprints and out to dinner (beer) in the evening were mostly through parks where I got to see the huge Olympics installation and unusual sights like Munich’s famous river surfing.

Surfers have a man-made wave on the Eichbach

Sessions and participation

Choosing sessions

This was my second time attending a DrupalCon and I decided I wanted to primarily attend the “core conversations” track (with a few exceptions). For those who don’t know, the “core conversations” sessions are where plans for the future of Drupal are presented, discussed, and refined. It’s truly an amazing experience to sit in a room with dozens of top-notch developers as they hash out the architecture for new Drupal features or present the innovations they have already completed. Of course participating in the Drupal 8 (Multilingual initiative) sprints in Barcelona (a couple months ago) and before and after the DrupalCon session days probably also spurred my interest in the areas being covered by other initiatives, but it is definitely an interesting track if you are not sure what to attend. In the past, core conversations were often not fully recorded, another reason I chose to attend this track, but it looks like you can view most core conversations pretty well now, online. If you missed them and are interested in the future of Drupal (i.e. Drupal 8), there are many that you might want to watch.

Volunteering

Another first for me was helping the DrupalCon staff as a volunteer, mostly monitoring the rooms I was in and taking a head-count in mid-session. Other activities of a room monitor included being a bit early and making sure the speakers had everything they needed; I got to loan out a display adapter for one session and was prepared with multiple power adapters if anyone happened to be missing a way to plug in—we also tried to make sure that questions were recorded in session audio (either by having those with questions come to a microphone or the speaker repeating the question). I found volunteering rewarding and I thank Adam Hill, the DrupalCon Munich volunteer coordinator, for being a great guy to work with.

DrupalCon Munich Volunteers

Drupal 8 will be great!

Angie Byron’s current overview of Drupal 8 (aka “”) had not changed a lot since I last saw her similar presentation at the “Developer Days” in Barcelona a couple of months earlier, but it filled the largest session room, so there may have been close to 1,000 in attendance. Some features are more polished, some of the features are not yet written, but are better conceptualized than they were a couple of months ago, but the general ideas are mostly the same so in a presentation providing an overview of Drupal 8, while much has changed, it wasn’t much that affected the presentation. I’ve take the liberty to add a few specifics which were actually covered in separate sessions (sessions which covered each core initiative, for example), just for the sake of brevity and consolidation of information.

Webchick presents an overview of Drupal 8 features and initiatives

One key point that was made by all Drupal 8 core initiative leads is that we are only 3 months away from “Feature freeze” for Drupal 8 (December 1st, 2012), so it’s time to pitch in and try to help get all the great planned features into Drupal 8. All of the major initiatives need help and have areas where they are behind schedule as far as being ready for the freeze deadline with all the features the community would like to have in core.

Key Drupal 8 initiatives and components

- This finally ends the problem of having an evolving set of configuration on the development/staging sites which needs to be moved to production… but can’t be since the configuration (in Drupal 6 and 7) tends to be all over the place. Having a set of YAML documents stored in your sites “files” directory is a good way to manage and deploy common patterns to multiple sites, update configuration on production sites, etc. And it gets around the issue that pushing a database update from a development/staging server to production might overwrite actual content. So we now have a working configuration management system based on YAML files and a developers’ API, but no user interface for adjusting configurations; the UI still needs to be written. We also need ways to determine if configuration has been changed on the production server, have a range of multilingual configuration issues to still resolve, and performance issues, among other outstanding tasks. Join the #drupal-cmi IRC channel during the CMI meeting times and work on the issue queue if you want to help get the CMI full-featured for Drupal 8. Most active work is in the CMI sandbox repository.

deals with helping sort out inconsistencies and inflexibility in the core blocks functionality. It’s been described as, “Like panels in core, only better”… well at least that’s the goal. Everything on a page has context and is a block or layout/nested layout. Since blocks are rendered independently, caching is well-supported. A responsive layout designer from Spark can allow you to figure out your layouts for different screen sizes without a ton of divs complicating their HTML. If you would like to help with improving Drupal 8 layouts, there are office hours every Friday in Drupal IRC in the #drupal-scotch channel and you can read more about their current issues by looking at the “sandbox” project for the Drupal 8 Blocks and Layouts Everywhere initiative (it is not yet in the 8.x master branch of Drupal).

features will be in core and better than ever before. Interface translation, content translation, base language functionality and language configuration are all being greatly simplified so that it can all be in core with a nice, normal workflow. A lot of the real “pain points” with multilingual sites (or even simply non-English ones) have already been addressed and there is a ton that’s been done, but there is still a lot more to complete in the next three months if we want to really consider this a success. A lot of great progress was made during the code sprints before and after the conference. If you would like to help improve the Multilingual workflow in Drupal 8, there are lots of ways for anyone new to Drupal core development to still pitch in. There many open issues and many ways to move them forward without even writing a single patch. The best place to find active issues is probably to look at Gábor Hojtsy’s “focus issues” list. You can join the Drupal Multilingual initiative meetings in IRC (#drupal-i18n). See the meeting schedule on the main Drupal 8 initiatives’ help page.

is one of the biggest initiatives in terms of importance to Drupal 8’s success… ensuring that a site is responsive to the display size and has toolbars which nicely resize for device type is one of the major aspects of this work. We need good front-end performance for running on smaller, lower-powered devices; we need good, solid, clean, uncomplicated HTML5 code, and we need to be able to support easily using Drupal as a back-end for native mobile apps, purely responsive web design, web apps, or anything in between. There are some big parts of this which are not far along yet, so this is a great place for front-end developers and others interested in Drupal 8 mobile experience to get involved. One current obstacle to the Mobile initiative achieving its goals is greater completion of the Web Services initiative (WSCCI) also achieving its goals. Otherwise, John Albin Wilkins, the Mobile initiative project lead indicated two other areas which need a lot of work: front-end performance and the Drupal 8 mobile admin interface, likely designed with Spark’s Responsive Layout Builder. There are regular meetings on IRC (see meeting schedule on the mobile initiative’s official Drupal Groups page) and the Drupal 8 issue queue has a tag for "mobile" so it’s easy to jump in and help make mobile support rock in Drupal 8. You don’t need to be a rocket scientist to help move the issue queue along. As Dries and others have indicated, this might be the primary initiative for determining Drupal’s future success, given current trends.

: One of the highlights of DrupalCon Munich sessions certainly had to be Angie Byron and the Spark team’s presentation of all the awesomeness that comes from the Spark-distribution modules. Spark is only still in “alpha”, but you can already tell how amazing the features are. The idea is that while they design the perfect authoring experience for Drupal 8, the community can use, test, and help to refine the new functionality (in Drupal 7 via the Spark distribution) so that the feature-set will be well-tested and as awesome as possible when Drupal 8 is launched. Spark allows you to simply edit content, in-place (via the Aloha editor used by the Edit module) and also has a number of nice tools for designing responsive layouts, and has a tool palette which pulls out from the side and responsively adapts to the device. The goal is for the editor system to output only clean code without a mess of ugly divs and inline styling… and the editor is already living up to most of that promise. Words don’t really do Spark justice, so rather than take my word, you can try the demo. Note: Since anyone can make changes to the demo site that might be a bit weird, if things are really messed up, you can check back later. And of course reviewing patches in the Spark issue queue and creating new issues, where applicable, can help smooth the way to getting the envisioned “perfect” content authoring experience into Drupal 8.x core.

The Aquia Spark team prepare their presentation at DrupalCon Munich.

: Theming/Templating improvements in Drupal 8 include the use of Twig, a templating system also designed by Fabien Potencier of Symfony. It eliminates PHP from the theming layer for simpler code and removal of many security threats. The work on Twig does figure heavily into some of the initiatives, but is not an official core initiative on its own. Work is being done in a Twig sandbox led by Andreas Sahle of Wunderkraut. If you are interested in helping build this up, you can check out this sandbox and assist with the issues.

: Drupal 7 was released in January 2011, but it took over a year before there were enough of the important contrib modules ready enough for it that Drupal 6 was finally surpassed (in terms of numbers of Drupal 7 installations). Getting Views into core will hopefully help boost the uptake of Drupal 8 use as soon as it’s released. This will be a lot of work and there is a fund to help pay for development time. A lot of Drupal 8 Views features actually already work. Major parts of cTools are now in core. There is a funding request for getting Views into core (I threw 10 € into the donation box at the DrupalCamp in Barcelona), and the more we can donate, the more the Views team can allocate paid developer time to ensure that Drupal has a nice version of Views available when it ships. Of course you can also help with the Views for Drupal 8.x issues.

in core (only better). There is still a lot to do, but the idea is that the site can take any kind of request and send appropriate responses without a lot of headache. A lot of Symfony components being brought into Drupal are especially important here. Symfony integration helps bridge a gap between ours and the also-dynamic PHP-based developer community around Symfony, so should help provide a lot more experienced developers for Drupal. There is still a lot to do here; you can check out the current status via the WSCCI sandbox and help with the issue queue. See the core initiatives overview page for IRC meeting times and details. If you weren’t there for Larry Garfield’s Munich presentation, Web Services and Symfony Core Initiative, you can still watch it to get a good overview.

Automated testing in Drupal 8 is much faster and the Symfony components also help allow us to have more modular modules… ones which can more easily be unit-tested. In Drupal 8, PHPUnit will replace Simpletest although the latter may remain in core for a transition period.

The social side of the DrupalCon

What happens between sessions is the real reason that most of us go to DrupalCons. There is nothing quite like participating in code sprints with Webchick sitting across the room, committing the patches you’ve just been helping with. And of course you can take your favorite Drupal developer out for a beer or something. It’s great to be in an atmosphere where there are thousands of people who actually have an idea what you are talking about when you tell them your occupation—and of course it’s nice, for a change, to be able to leave out any explanation of Drupal. If you go to a DrupalCon, it’s a given that you will leave having made new friends—new friends who will feel a bit more like “old friends” the next time you see them.

More DrupalCons in the coming year than ever before

If you have never been to a DrupalCon, there are more DrupalCons coming in the next year than we’ve ever had in a year period, before. Granted, the two new (Australia / South America) cons are planned as smaller events that would actually be dwarfed by some of the larger DrupalCamps, but this is all a sign that Drupal is growing, world-wide. Note that the U.S. and European DrupalCons are both being held a bit later than in previous years. I look forward to seeing you all at a coming DrupalCon.

Jun 19 2012
Jun 19

It’s been a busy past several days in Barcelona (for the Drupal Developer Days) and most of us who’d been sprinting during the week before seemed to be in the same condition by Sunday—rapidly running out of energy from progressive sleep deprivation from an increasingly later return to our hotels. But it’s been an exciting week for Drupal core (and contrib) development and significant work has been completed on the Drupal core (mostly building up Drupal 8, but also some for added features in Drupal 7) while a lot of important decisions have been made which will likely shape development in a number of initiatives for the coming months until the sprints at DrupalCon Munich.

In addition to the Sprint I was primarily involved in (I was just trying to get my feet wet with assisting the Drupal 8 core development process by joining the multilingual sprint, but I did write my first committed core patch—admittedly this was a very basic patch), there were also sprints running for “Views in core”, Entity API, Media initiative, Mapping in Drupal 7, configuration management, abstracting social networking, search-related sprints, the Drupal.org upgrade… and possibly more still. I’ll cover some of the highlights of the week that I’m most knowledgeable about.

Multilingual Initiative

The multilingual initiative sprinted all week before the Developer Days sessions, and even continued through the weekend. And a lot of key decisions were made and important code changes committed and pushed to the central Drupal 8.x repository.

New user interface translation improvements in Drupal 8

This is something I got to do a bit with, but Swiss developer, Michael Schmid (Schnitzel on d.o), of Amazee Labs, was the primary developer working on this task during the Sprint. He and his colleague, Vasi Chindris, were among the stars of the week. It was a real privilege to get to look over their shoulders and to get Michael’s support when it came to using Git to manage code in the sandbox we were using for the issue. (Thank you, once again, Michael!) Once everyone was happy with the work, it got committed to core. This new sandbox workflow, used for larger issues, helps avoid a lot of bugs creeping into the main branch, as has happened during previous periods of intense core development. Of course the tests and test bots catch a lot of issues which could otherwise be major headaches for all concerned (automated testing was also a part of Drupal 7 development). If you recall, the long wait for Drupal 7’s release was due to hundreds of critical bugs. Now this should be a thing of the past since we have an established threshold for critical issues; and the core team only commit new patches to the central repository when we are below that threshold (15 “critical” bugs, 100 “major” bugs… among other thresholds specified).

New system for translating Drupal’s user interface

The new user interface translation system allows you to keep imported (community contributed) translations separate from customized translations and search for a particular translation within either or both categories as well as filter by translated strings, untranslated strings, or both. If you have any unsaved translations, they are highlighted to help remind you not to leave the page without saving them and there discussion about providing a dialogue to prevent a site admin from accidentally leaving the page with unsaved changes, too. There is also an issue to allow the string search to be non-case-sensitive (checkbox) to find more strings that contain a particular word or phrase, regardless of text case. Since this feature came up in discussion after the rest of the user-interface changes had already been made, we elected to put the discussion about adding this feature in a separate issue. If you have ideas for what might further improve the Drupal 8 user-interface translation workflow, your input is valued.Customized and imported (community) translations are stored separately

*/

New content language options

Drupal 8 has new language settings per content typeYou can enable translation for a particular content type and also choose to hide the language selector (automatically selecting the language for a new piece of content by any of a number of contextual rules). The automatically selected language for a new piece of content can be any particular language enabled on your site, “not specified”, “not applicable”, “multiple”, the “site’s default language”, the “current interface language”, or the “author’s preferred language”. While all these settings might arguably be a bit confusing for new users, they should help smooth the content creation and translation workflow for most sites. Of course the option to “enable translation” is hidden if the default language for the content type cannot be resolved to a single language (i.e. for “not specified”, “not applicable”, or “multiple”), since translation does not make sense here.

Translate the English UI to… English!

Drupal 8 — Enable English UI translationIn the edit preferences for the English language, you can enable translation to English and then it’s easy to change, for instance, the “Log out” link to “Sign out” (or “Disembark”, “Abandon ship”, “Terminate session” or anything else you might want on a particular site). Of course this could also be useful for fixing any oddities you find in the UI strings provided by contributed modules if you find a mistake in a field description, for instance, you don’t need to wait for a module developer to commit your patch or add a “site English” custom language just to modify a few strings.

Configuration Management related to Multilingual sites

Drupal core team leads and other sprinters discussed multilanguage configuration

One of the biggest issues of the week was determining how multilingual configuration would be handled in Drupal 8. The core team knew that they wanted to store language configuration in files rather than in the database, so that it’s easy to “push” new language configurations to an established site that already has content, among other benefits of this approach. But this brought with it a number of challenges which the Multilingual Initiative team, Configuration Management Initiative team, and other interested parties discussed in several sprint discussions through the week. Many of the standard configurations for a site might also differ, depending on the language: you might, for example, want a different site name or site slogan or logo for each language. There were three different proposals for how to handle multilingual configuration, and to keep a long story short, the final decision was to go with “Plan B” (or a minor variant, thereof). You can still lend your voice to the “review” process in the main issue for the language configuration system in Drupal 8. If you would like an overview of the plans, there is a nice graphic by Gábor Hojtsy (the Multilingual Team lead) which outlines the differences between the three proposals and some variants.

Drupal 8 Configuration Management

Greg Dunlap (“heyrocker” on drupal.org) presented the new configuration management

Angie Byron, aka “webchick” gave a quick overview of the configuration management initiatives goals, tooOne great session from the weekend was the Introduction to the Drupal 8 Configuration Managment System by Greg Dunlap (“heyrocker” on Drupal.org), the Configuration Management Initiative team lead. There has been some good progress in determining what this is going to look like, some of which took place during the sprints in Barcelona. Basically, this will be a bunch of smaller files stored within a logical directory structure in the sites/[…]/files directory. The new configuration system is currently planned to be YAML-based (rather than PHP or XML, which were used in earlier visualizations of the system). And the goal, as described by a slide in Angie Byron’s Sunday-morning keynote, “Drupal 8: What you need to know” is to be like “Features in core, only better”. The aim is to help us remove the complications involved in pushing configuration changes, modified in a development or staging environment, to a site that already has user-created content that we don’t want to lose. The main problem with the current system is that there is no consistent system: configuration settings are scattered across multiple tables, variables, files, and other locations and there is no consistent structure in any case. The idea is now to have a contexts, which Drupal responds to, when determining which configurations files to use.

Angela Byron (“webchick”) talks about the problems the new configuration management system aims to solve

What it should look like when loading a configuration from module code, is something like this:

  $config = config('image.style.large.yml';
  $config->get('effects.image_scale_480_480_1.data');

And when setting and saving configuration data:

  $config = config('system.performance');
  $config->set('cache', $form_state['values']['cache']);
  $config->save();

The YAML code for the image example, which saves configuration for the “large” image style would look something like this:

  name: large
  effects:
    image_scale_480_480_1:
      name: image_scale
      data:
          width: '480'
          height: '480'
          upscale: '1'
      weight: '0'
      ieid: image_scale_480_480_1

This should be pretty easy for developers and site builders to learn to work with and of course an interface is planned which should automatically build the configuration files, when edited by site builders. Configurations will be loaded into the “active store”. Changes are saved back to the active store and back to the YAML files so they can easily be moved between sites (staging and production sites, or completely different sites if they should have some settings in common). Building up an ideal import/export system for configurations is one of the major remaining hurdles. Update: heyrocker’s presentation slides are now available for download, so you can see other examples of Drupal 8 configuration.

Other Drupal 8 news

Twig library committed to core!

Drupal 8 now has Twig in the core/vendor directoryOne of the new developments which has received some press is that Twig, the templating system designed by Fabien Potencier, the innovator behind Symfony, which also bundles Twig, has now been added to the Drupal core repository.

However, the fact that the Twig library is in the repository does not mean that it’s ready for any kind of use yet, except for those who are working to build a new templating engine for Drupal, which uses it. How this works is still open to discussion; according to webchick, it may be that we keep both PHP-based and Twig-based templating engines to ease the pain of this change. On the other hand, while there is a learning curve involved, there are many advantages to Twig, especially in terms of security (removing PHP vulnerabilities from themes, altogether), and the saying that “the drop is always moving” applies here. It may be that Twig is the only templating engine which will be supported by Drupal 8, but if you feel strongly about this or have ideas for how to do this “right”, it’s a good time to get involved.Twig vs PHP template syntax

Context-based layout and blocks

Angela Byron lays out the plan for Drupal 8 layout with contexts

Everything in Drupal 8 will be a block or a layout area and blocks can have multiple contexts which determine their behavior (and whether or not they are displayed). This is going to be a major change which should produce much more flexible layouts and site designs. Of course this will touch on every major Drupal initiative: configuration, HTML5, mobile, multilingual… all are involved.

Drupal 8 will have clean, semantic HTML5 (and will abandon IE)!

Say goodbye to the messy nested div hell! Drupal 8 code is going to be much smaller and cleaner which will make designer/themer types love Drupal and make it possible to produce code that renders nicely, regardless of display size. Oh, and don’t worry about trying to support older versions of Internet Explorer; the community has decided it’s time to put that tiresome task to rest. Yay!

Drupal 8 development needs you!

Webchick, heyrocker, Gábor Hojtsy… all made the same point: As a community effort that’s still underway, the Drupal 8 effort needs more of the community at large to get involved and find ways to help out. There is a lot of complexity, but there will be smaller tasks that anyone could work on, so there’s going to be something for everyone. Even non-coders can help by testing, filing bug reports, helping manage the issue queues, making suggestions, documenting finished features and APIs. There are several places where you can get involved:

  • The core initiatives overview page provides information about when the different teams meet in IRC and in which channels among other information which can help people who want to find ways to get involved.
  • Drupal Ladder is a project aimed at helping more people learn how to contribute to Drupal
  • [ … ] (Comment below if you have other tips for where to get involved)

Big thanks to the organizers, sprint leads, and session speakers

The Drupal Developer Days in Barcelona were a big success because of all of you pulling together to make things happen. The local organizers made us all feel welcome and provided a lovely venue and took us out on the town just about every night. The sprint leaders helped find ways for everyone to play a part in building Drupal 8 or contributing in other ways, and the sessions were awesome.

Jun 14 2012
Jun 14
Morning stand-up meeting at the Drupal 8 Multilingual Sprint

I was supposed to get into Barcelona at 10:30PM on Tuesday evening, but with delays in my flight, it wasn’t till after midnight that our plane landed; it was after 1 a.m. by the time I reached my hotel. Normally travel, when it runs late and long, makes me feel exhausted, but I was excited to be joining my first Drupal core sprint. I’ve been wanting to do a bit more to help build Drupal and it’s great to not only be somewhat aware of what’s coming in Drupal 8, but to also know that I’ve at least played a small part in making it happen.

I wasn’t sure I would attend the Drupal Dev Days in Barcelona till a couple of weeks ago, but I’m glad I’m here. We have a fairly sizable group of developers here at the Citilab helping work on cutting through the issues for Drupal 8 Multilingual Initiative (D8MI). I’ve been helping with some user interface quirks and since it had been long enough since I’d actually done string translations of the user interface, I started out yesterday as a “tester”… at least trying to look at the problem of translating the interface (e.g. translating “Add content” to German) as if I had never done anything like that before. And we did find some issues and, even better, we were able to address and correct those issues during yesterday’s coding. Others have been working on multilingual issues related to the new configuration management system, and a number of other issues which you, too, can help with, if you’d like to join us remotely (or in person, if you happen to already be in Barcelona — the Sprints continue through Friday, too). There are currently about 40 of us in the IRC channel for i18n and I'd say that at least half of those are working on the Sprint. There are about a dozen (give or take, since people are working on other sprints, too) who are here in Barcelona working on D8MI.

You can help make Drupal 8 better, too!

Jump on IRC (#drupal-i18n) and look at the focus issues for Drupal 8 Multilingual Initiative if you’d like to join use remotely. There is a lot going on right now and it’s not all on Multilingual issues, so if you have some time, I’d like to encourage others to join me in helping ease the burden on the few who do so much and at least do a small bit to make Drupal 8 as awesome as it can be.

Aug 29 2011
Aug 29

Sometimes, when troubleshooting a Drupal issue on a site, it's best to determine how much time you are willing to spend on fully solving an issue and be willing to accept a reasonable compromise. We encountered such a situation recently with a rather odd issue: If an authenticated user attempted to post a comment on any of the German blog posts here, they were unable to complete the operation since the "save" button was missing ("preview before save" was required) and for some odd reason, "preview" was not working for admin or other authenticated user roles. If logged out, there was no problem. Actually, it took a while to determine it was the preview, itself, that's not working. We also determined that this may be a bit obscure and could take time to troubleshoot and be better put on the "back burner" for now.

If you want to post a comment, please log out and then try again...

Preview of comments on German blog posts only works for anonymous user

The issue was that we had comment settings on blog post configured to "preview required". It worked fine on English posts, but on German posts, the "preview" would never appear, so neither would the "Speichern" ("Save") button ever be available. Oddly, this issue was only seen on German posts, and also only seemed to affect authenticated users. If a user was not logged in (was seen as an "anonymous user"), they would get the preview and then be able to save their comment.

The simple interim solution: Make 'Preview Comment' Optional...

Simple solution - Make preview optional instead of required.

Preview was set to 'Required' in the Comment settings for the content type, "Blog Entry". Since it wasn't immediately apparent what was interfering with the preview functionality for authenticated users posting comments on the German blog posts, when the issue came to my attention, I immediately set this configuration to "Optional", which meant that while the "Preview" button still doesn't work for authenticated users posting comments on German blog posts, they can at least save their comment without logging out and making their comment as "anonymous". This was a workable interim solution which I had time to implement.

Troubleshooting... trying different things to determine a pattern...

During troubleshooting of this issue, I noticed that an older "localhost" (development) installation of the site worked as expected, even though it also included the language switching by domain and almost entirely the same configuration. What was different? Well, my older localhost was not up-to-date and had a slightly outdated version of the Cocomore Drupal Core. It also had a new version of Captcha (there is a hidden Captcha on the comment form). I wondered, first, whether the Captcha module could be involved, so I turned off Captcha for the comment form and found the problem persisted. Admin and other authenticated users still could not get a 'preview' of a comment posted on a German blog post.

After restoring Captcha for the comment form, I decided to check whether authenticated users (with rights to create a blog entry) could preview a German blog entry node. I determined that preview worked, on both the localhost and production sites when creating German or English blog entry content. So the issue really is limited to comments. I also tried changing the input format for the comment (as "admin" I could select "full HTML" instead of our "blog HTML" input format). But the admin user could still not see a preview.

Wondering whether this affected other content types, I tried responding to a forum post in the German section, where "preview required" also seems to be set. The preview worked as normal. So far, this issue only seems to affect previews of comments on blog entries.

There are more things I could do to troubleshoot an issue like this, but it takes time and simply not having a functional preview of comments, while not ideal, is also not worth wasting a lot of time on, if none of the "obvious" troubleshooting steps yields more useful information. For now we will just have no "preview" of comments added to German blog posts, at least for authenticated users. This is ameliorated by the fact that the authenticated users can edit their comments, so can use "save" (and then "edit") in place of preview if they notice any real need to fix something.

Has anyone else seen something like this?

Any ideas? If you have experienced a similar issue and you did happen to track down the cause, please comment here. In the meantime, I'll simply be paying attention this issue and see if it clears up "on its own" (e.g. after another core update or something) and/or keep my eyes open for possible causes or solutions. You can't always justify spending a lot of time getting one small feature of a site "perfect", especially if the "client" is yourself, but these things can be puzzling till the cause is identified.

In any case, I trust I'll know what's going on before too long, but won't give high priority to solving this issue, at least not for now. Sometimes it's best to just keep such issues in the list of "things which need an explanation". There are plenty of other things which are higher on my current "to do" list. At some point, I'll have other reasons to get my development version of this site back in complete sync with the production server and maybe, then, I'll be able to replicate this problem on my local machine, and do things to troubleshoot it that I'd rather not do a on production server. Until then, this is a just a bizarre quirk of our production environment. I'll post an update when the mystery is solved.

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web