Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 37 min 2 sec ago

Tag1 Consulting: Drupal Load Testing with Locust.io

Thu, 04/13/2017 - 17:48
div class=field field--name-body field--type-text-with-summary field--label-hidden field--itemApache JMeter and I have a long and complicated relationship. It is definitely a trusted and valuable tool, but I am also quite confident that certain parts of it will make an appearance in my particular circle of hell. Due to this somewhat uncomfortable partnership, I am always interested in new tools for applying load to an infrastructure and monitoring the results. Locust.io is not exactly a new tool, but I have only recently begun to use it for testing. What Is Locust? Locust is a load-testing framework which allows you to write your load plan in regular Python. This is a welcome experienca href=https://tag1consulting.com/blog/drupal-loadtest-locust class=Read more hreflang=enRead more/a/div spanspan lang= about=https://tag1consulting.com/user/narayan-newton typeof=schema:Person property=schema:name datatype= xml:lang=nnewton/span/span spanThu, 04/13/2017 - 08:48/span

Mediacurrent: DrupalCon Baltimore - Mediacurrent#039;s GamePlan

Thu, 04/13/2017 - 15:54
img typeof=foaf:Image src=https://www.mediacurrent.com/sites/default/files/styles/thumb_blog_spotlight/public/gameplan1.png?itok=qGHKPTEP width=200 height=152 alt=DrupalCon Baltimore Mediacurrent Gameplan title=DrupalCon Baltimore Mediacurrent Gameplan / pDrupalCon Baltimore here we come! We are Gold sponsors once again this year and there are a ton of ways to connect with our team. Here are some of the highlights:/p

Acquia Developer Center Blog: 12 Questions that Project Managers Should Ask Before a Drupal Project Kickoff

Thu, 04/13/2017 - 15:38
div class=field field-name-field-blog-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image class=img-responsive src=https://dev.acquia.com/sites/default/files/styles/blog__190_x110_/public/blog/project-management.jpg?itok=29e5Wp3p width=140 height=85 alt=Project management title=project management //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpYou are a Project Manager, sitting at your desk, maybe sipping a fresh-brewed coffee. Suddenly you receive a heads-up that a new Drupal Project is headed your way. Sprint 0 will be starting in the next two days. /p pYou can assume that the SOW (Statement of Work) is signed, or almost signed, and a few SWAGs (Sophisticated Wild Ass Guesses) have already been ventured. /p/div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/tags/acquia-drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=acquia drupal planet/a/div/div/div

Amazee Labs: Render a menu tree from custom code in Drupal 8

Thu, 04/13/2017 - 12:54
spanRender a menu tree from custom code in Drupal 8/span div class=field field-node--field-lead field-name-field-lead field-type-text-long field-label-hidden div class=field-items div class=field-itempHaving menus rendered on a site in Drupal 8 is pretty simple. Most of the time this can be accomplished with site building, in a few clicks. And if you need some more advanced features on top of what the Drupal 8 core has, you can also have a look at modules like a href=https://www.drupal.org/project/menu_blockMenu Block/a, or have a look at this (a bit outdated) a href=https://www.drupal.org/node/627128contributed modules for menus/a page./p pHowever, you may have some special requirements, for example, to display some small portion of a menu inside the template of a node. There is no simple 'site building' solution for that. You most probably need to code a bit./p/div /div /div spana href=/en/vasi-chindris title=View user profile. lang= about=/en/vasi-chindris typeof=schema:Person property=schema:name datatype= class=usernameVasi Chindris/a/span spanThu, 04/13/2017 - 12:54/span div class=field field-node--field-image field-name-field-image field-type-image field-label-hidden div class=field-items div class=field-itemimg class=image-style-blog-full src=https://www.amazeelabs.com/sites/default/files/styles/blog_full/public/Screen%20Shot%202017-04-06%20at%2009.50.33.png?itok=MhyJMdvW width=580 height=532 alt=simple visual representation title=simple visual representation typeof=foaf:Image / /div /div /div div class=field field-node--body field-name-body field-type-text-with-summary field-label-hidden div class=field-items div class=field-itempLet's say you have these requirements: a node which can be part of the main menu, and which could also have menu items bellow it, should display the first level of those menu items somewhere inside its template (so just as you would display a regular field)./p pThe image above shows a very simple visual representation of what we'd like to achieve./p pNow let's break this down into smaller and independent pieces. You can also a href=#entire-codeskip to the entire code/a. Basically, you have to:/p ulliLoad and render a menu (or parts of a menu)./li liHave a custom field available on the emManage display/em page for a content type, so that you can place it on the node page./li /ulpLet's actually start with the second part, as it is simpler./p h2Custom (extra) fields/h2 pThere is the a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_extra_field_info/8.2.xhook_entity_extra_fields_info/a hook which can be used to expose custom or extra fields on the entities. We'll use this hook to provide a custom field on a node./p script src=https://gist.github.com/chindris/e51d0c1cb16a3d7ed9aa29381a92931b.js/scriptpThe emvisible/em flag represents the default visibility setting of the field. Usually, you want this to be false, so you decide when the element is displayed and not when it is NOT displayed./p pNow clear the cache and go to emStructure gt;gt; Content types gt;gt; YourContentType/em, click on the emManage display/em tab and you should see your new field available there./p pThe next thing is to implement the a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_ENTITY_TYPE_view/8.2.xhook_ENTITY_TYPE_view/a and particularly, in this case, emhook_node_view/em. Here it is:/p script src=https://gist.github.com/chindris/196a2fab86063aa821c58261063f295e.js/scriptpSave it, clear the cache, make sure that the field is visible in the display setting for that content type and visit a node of that type. You should see the custom text displayed./p pSo, we're done with the second part. Let's go and actually load the menu for this node and display the first level of menu items./p h2Render the menu/h2 pFor this, we'll have to load a menu using a menu tree service and a set of parameters which define the root to start with, how many levels to load, and so on, then to apply a set of manipulators on the loaded tree that would check the access, do the sorting, etc, and finally to build the menu tree./p h3The root menu item/h3 pOne of the tricky things is to get the correct root menu item. We know that the node can be part of a menu. It would be great if we could load a menu link based on the route name and some route parameters. For that, you can use the emplugin.manager.menu.link/em service./p script src=https://gist.github.com/chindris/ea8f0bbf88b03d62cd9f1403942c1b9c.js/scripth3Menu tree parameters/h3 pWhen loading a menu, we have to provide some parameters. For example, what the root of the menu you want to load (if you want to load a subtree, which is our case) is, or how many levels to load. These parameters are specified using a em\Drupal\Core\Menu\MenuTreeParameters/em object./p script src=https://gist.github.com/chindris/e57dc512292ee770b8e0c1b9fe58e04e.js/scriptpMore details about the MenuTreeParameters can be found a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21MenuTreeParameters.php/class/MenuTreeParameters/8.2.xhere/a./p h3Load the menu/h3 pTo load the menu, we will use the emmenu.link_tree/em service./p script src=https://gist.github.com/chindris/2cb89f1726434af664cbfff14ba39ae8.js/scripth3Menu tree manipulators/h3 pAfter we have the menu loaded, it is time to actually apply some manipulators on its menu items. These manipulators will deal with access checking, sorting according to the weights, or whatever other things you want to do with the menu tree. The code looks like that:/p script src=https://gist.github.com/chindris/bedbdc00e5c14309069da3816ec81dca.js/scriptpSo, in this case, we want to check for the access and sort the items. There's a default tree manipulator service in Core which is emDrupal\Core\Menu\DefaultMenuLinkTreeManipulators./em That already provides a few basic manipulators you can apply to a menu tree, which is enough in our case. But of course, you can add any other callable to that array and use the implementation from Core as a guideline./p h3Build the menu/h3 pFinally, we have to build the menu. This is as simple as:/p script src=https://gist.github.com/chindris/f98d27be90cf8404ab800d52f8282169.js/scriptpThis would replace the/p pre $build['my_custom_menu'] = [   '#markup' =gt; 'Some custom menu', ]/pre pthat you used as a placeholder in the custom_node_view() hook./p pAnd that's it. The first level of navigation, having the current node as root, will be displayed inside the template of your node./p pa name=entire-code id=entire-code/a/p pHere is the entire code:/p script src=https://gist.github.com/chindris/2c3e46c9521c0da14df10f91c5bed04b.js/script/div /div /div

Agiledrop.com Blog: AGILEDROP: Agiledrop going to the WebCamp

Thu, 04/13/2017 - 09:19
a href=http://www.agiledrop.com/blog/agiledrop-going-webcampimg src=https://www.agiledrop.com/sites/default/files/2017-04/web%20camp.jpg //a We must admit that in the past we were not so informative about where we will be and on which (Drupal) event we will go. We promise we'll do better from now on. This means that if you would like to talk to us in person, you'll know where to find us (you can also find us in our office of course). We'll start with a Web Camp we will attend next. A WebCamp will be held in Ljubljana on Saturday 22nd April 2017 in the Faculty of Computer and Information Science, Ljubljana. This is a place very familiar to our development director Bostjan Kovac because he got his bachelor’s degree there. An event… a href=http://www.agiledrop.com/blog/agiledrop-going-webcampREAD MORE/a

Valuebound: How to build a simple form using AJAX in Drupal 8

Thu, 04/13/2017 - 09:15
p dir=ltrAjax is a script on the client side communicating asynchronously with the server without a complete page refresh.The best description I came across about Ajax as “the method of exchanging data with a server, and updating parts of a web page – without reloading the entire page.”/p pIn our project, while creating a new account if we give the existing username, on submitting the page it will throw an error. But, instead of reloading the page, we can just update certain parts of DOM. This can be achieved using AJAX. So, here is the example how to implement this ajax in drupal 8 forms./p p dir=ltrIn order to build a simple form using AJAX in Drupal 8 , we created a form with Username field. Using ajax we are going to validate that field. To achieve this, create a…/p

erdfisch: Drupal Camp Northern Lights (Part 3)

Wed, 04/12/2017 - 18:03
span class=field field-node--title field-name-title field-type-string field-label-hiddenDrupal Camp Northern Lights (Part 3)/span span class=field field-node--created field-name-created field-type-created field-label-hidden12.04.2017/span span class=field field-node--uid field-name-uid field-type-entity-reference field-label-hiddenspan lang= about=/users/michael-lenahan typeof=schema:Person property=schema:name datatype=Michael Lenahan/span/span div class=field field-node--body field-name-body field-type-text-with-summary field-label-visually_hidden div class=field-label visually-hiddenBody:nbsp;/div pThis has, for reasons we are not quite sure of, ended up being a three-part blog post./p pa href=/node/374Part 1 is here/a and a href=/node/375part 2 is here/a./p pSo, where we left off was at the tomato farm, where it felt like being in a future farm in outer space./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6113_2.JPG //p pBut the tomato farm is not only that. It is a pony (sorry, Icelandic horse) farm as well!/p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6107_1.JPG //p pOn our way back to Reykjavik that evening, we were told we have to hurry because a big storm is on its way./p pWhen we woke up the next day, Reykjavik had experienced the biggest snow fall in 80 years, and all roads were closed./p pThere are some beautiful pictures of this here: a href=http://www.standard.co.uk/lifestyle/travel/icelands-capital-reykjav-k-saw-recordbreaking-snowfall-and-pictures-are-incredible-a3479036.htmlhttp://www.standard.co.uk/lifestyle/travel/icelands-capital-reykjav-k-s…/a/p pNone of this extraordinary weather deterred the incredible team who organized this event./p h2The Drupal camp at Drupal Camp Northern Lights/h2 pThe amount of effort that went in to making sure we had a great time was truly amazing, and this was carried over into the sessions as well./p pstrongSprint room/strong/p pOftentimes, I don't go into the sprint room at Drupal camps, you can have the feeling that you are interrupting something very important that you don't understand./p pThis time I thought no, I'm among friends now so I ventured in to the sprint room, and sheepishly explained that I'm new and looking for something to work on./p pEnzo was there, and he helped me get started on a Drupal Console issue./p pHere's how you get started:/p pa href=https://gist.github.com/jmolivas/97bbd07f328217be3564a434c5bd2618https://gist.github.com/jmolivas/97bbd07f328217be3564a434c5bd2618/a/p pAnd here is the issue I fixed a few weeks after coming back. I feel so proud!/p pa href=https://github.com/hechoendrupal/drupal-console/issues/3197https://github.com/hechoendrupal/drupal-console/issues/3197/a/p pThanks, Enzo!/p pstrongDrupal Twig - Mauricio Dinarte/strong/p pa href=https://twitter.com/dinarconhttps://twitter.com/dinarcon/a/p pThis session was full of insider tips on how to get the most out twig, with lots of entertaining examples out of Drupal core./p pYou can see the slides here:/p pa href=http://bit.ly/twig-recipeshttp://bit.ly/twig-recipes/a/p pstrongGitpal.org - real version control of content - Rouven Volk/strong/p pRouven explained an interesting way of managing content using a git repository. We're used to having code in git, but there are times when the content needs to be equally trackable./p pRouven's approach is to use Drupal's content revisioning system together with git-wrapper to write all content revisions as commits into a git repository./p pThat means you can track changes to your content like this:/p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/2017-04-12-160245_1.png //p pIf you want to get involved with this, join us and work on it at a href=https://drupal.slack.com/messages/gitpalhttps://drupal.slack.com/messages/gitpal/a/p pstrongThe Continuing Saga of Layouts in Drupal 8 - Tim Plunkett/strong/p pDespite being a certified front-end developer I'm not really a front-end developer at all./p pFor this reason I'm very supportive of efforts to make Drupal front-end work less insane./p pI was surprised and happy to discover that Tim's talk on Layouts was easy to understand, I even asked a question related to the way panels can be used without a UI./p pI think all of this must have had something to do with the magic of Iceland, and this particular Drupal camp, where the entire atmosphere was so friendly that you felt you could chat with anyone about anything./p pstrongThe Flexibility of Drupal 8 - Michael Miles (mikemiles86)/strong/p pMike Miles is a very entertaining and fun speaker to listen to. His talk showed 8 different ways to do a simple change in Drupal./p pSlides and link to the code are here: a href=https://mikemiles86.github.io/dnlights-drupal-flexhttps://mikemiles86.github.io/dnlights-drupal-flex/a/p pOr just go and watch the video already a href=https://www.youtube.com/watch?v=8https://www.youtube.com/watch?v=8/aUV1-NfSR1E/p pstrongWrapping up/strong/p pAll that's left to say is thank you, thank you, thank you./p pTo the organizers a href=https://www.drupal.org/u/baddysonjahttps://www.drupal.org/u/baddysonja/a and a href=https://www.drupal.org/u/drupalvikinghttps://www.drupal.org/u/drupalviking/a and all the others who I haven't named here./p pAs you said, Baddy: this was the coolest Drupal camp ever and an experience I think all of us will always remember./p /div div class=field field-node--field-blog-tags field-name-field-blog-tags field-type-taxonomy-term-reference field-label-visually_hidden div class=field-label visually-hiddenSchlagworte/Tags:nbsp;/div a href=/blog/taxonomy/term/345/0planet/a a href=/blog/drupal-planetdrupal-planet/a /div section class=field field-node--field-comments field-name-field-comments field-type-comment field-label-above comment-wrapper div class=comment-form-area div class=comment-form-area--container form class=comment-comment-form comment-form action=/comment/reply/node/376/field_comments method=post id=comment-form accept-charset=UTF-8 div class=form-item form-type-textfield form-item-name label for=edit-nameIhr Name/label input data-drupal-default-value=Anonymous type=text id=edit-name name=name value=Anonymous size=30 maxlength=60 class=form-text / /div input type=hidden name=form_build_id value=form-XrZbMLZUeng7-qJyYIOvUER2uFxzOZ4MEFtAmu2TPCc / input type=hidden name=form_id value=comment_comment_form / input type=hidden name=honeypot_time value=1492015952 / div class=field-type-text-long field-name-comment-body field-widget-text-textarea form-wrapper id=edit-comment-body-wrapper div class=text-format-wrapper form-item div class=form-item form-type-textarea form-item-comment-body-0-value label for=edit-comment-body-0-value class=form-requiredKommentar/Comment/label div class=form-textarea-wrappertextarea class=text-full form-textarea required resize-vertical id=edit-comment-body-0-value name=comment_body[0][value] rows=5 cols=60 placeholder= required=required aria-required=true/textarea/div /div /div /div div class=form-actions form-wrapper id=edit-actionsbutton type=submit id=edit-submit name=op value=Kommentar hinzufügen/Add comment class=button button--primary form-submitspanKommentar hinzufügen/Add comment/span/button /div div class=url-textfielddiv class=form-item form-type-textfield form-item-url label for=edit-urlLeave this field blank/label input autocomplete=off type=text id=edit-url name=url value= size=20 maxlength=128 class=form-text / /div /div /form /div /div /section

erdfisch: Drupal Camp Northern Lights (Part 2)

Wed, 04/12/2017 - 17:35
span class=field field-node--title field-name-title field-type-string field-label-hiddenDrupal Camp Northern Lights (Part 2)/span span class=field field-node--created field-name-created field-type-created field-label-hidden12.04.2017/span span class=field field-node--uid field-name-uid field-type-entity-reference field-label-hiddenspan lang= about=/users/michael-lenahan typeof=schema:Person property=schema:name datatype=Michael Lenahan/span/span div class=field field-node--body field-name-body field-type-text-with-summary field-label-visually_hidden div class=field-label visually-hiddenBody:nbsp;/div pThanks for sticking around. There will be more than just photos of us goofing around in Iceland, I promise./p pFor stuff about the actual Drupal Camp, a href=/node/376please jump to the end of part three./a/p pSo, a href=/node/374when we left you in part one/a, we were exploring the beautiful Golden Circle in Iceland./p pWe did, indeed, feel like true explorers./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6095_0.JPG //p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6098_0.JPG //p pWe saw this awesome waterfall, the same one that was made famous by Kim Kardashian in her Iceland Waterfall tweet./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6102_0.JPG //p pAnd then we went for dinner at this incredible place that grows tomatoes year-round using geothermal energy/p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6104_0.JPG //p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6110_0.JPG //p pa href=/node/376More in part three/a which also features an Icelandic horse./p /div div class=field field-node--field-blog-tags field-name-field-blog-tags field-type-taxonomy-term-reference field-label-visually_hidden div class=field-label visually-hiddenSchlagworte/Tags:nbsp;/div a href=/blog/taxonomy/term/345/0planet/a a href=/blog/drupal-planetdrupal-planet/a /div section class=field field-node--field-comments field-name-field-comments field-type-comment field-label-above comment-wrapper div class=comment-form-area div class=comment-form-area--container form class=comment-comment-form comment-form action=/comment/reply/node/375/field_comments method=post id=comment-form--2 accept-charset=UTF-8 div class=form-item form-type-textfield form-item-name label for=edit-name--2Ihr Name/label input data-drupal-default-value=Anonymous type=text id=edit-name--2 name=name value=Anonymous size=30 maxlength=60 class=form-text / /div input type=hidden name=form_build_id value=form-3naF1K_zSE9v9UTDznR25sn1k8A694v89qJXzt8MLRs / input type=hidden name=form_id value=comment_comment_form / input type=hidden name=honeypot_time value=1492015952 / div class=field-type-text-long field-name-comment-body field-widget-text-textarea form-wrapper id=edit-comment-body-wrapper--2 div class=text-format-wrapper form-item div class=form-item form-type-textarea form-item-comment-body-0-value label for=edit-comment-body-0-value--2 class=form-requiredKommentar/Comment/label div class=form-textarea-wrappertextarea class=text-full form-textarea required resize-vertical id=edit-comment-body-0-value--2 name=comment_body[0][value] rows=5 cols=60 placeholder= required=required aria-required=true/textarea/div /div /div /div div class=form-actions form-wrapper id=edit-actions--2button type=submit id=edit-submit--2 name=op value=Save class=button button--primary form-submitspanSave/span/button /div div class=url-textfielddiv class=form-item form-type-textfield form-item-url label for=edit-url--2Leave this field blank/label input autocomplete=off type=text id=edit-url--2 name=url value= size=20 maxlength=128 class=form-text / /div /div /form /div /div /section

OpenLucius: 16 Cool Drupal modules For site builders | April 2017

Wed, 04/12/2017 - 17:25
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpimg src=https://blog.openlucius.com/sites/default/files/16-coole-drupal-modules-voor-site-builders-april-2017.jpg width=1920 height=1080 alt= //p pIt took a while before I could write a new edition, I was just busy with the production of customer social intranet projects :) Here again with a brand new version, what struck me in module updates in the past month:/p h31. D8 Editor Advanced link/h3 /div/div/div

Acquia Developer Center Blog: ES6 for Drupal Developers: ES6 Modules, Classes, and Promises

Wed, 04/12/2017 - 17:10
div class=field field-name-field-blog-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image class=img-responsive src=https://dev.acquia.com/sites/default/files/styles/blog__190_x110_/public/blog/javascriptimage_2.jpg?itok=71INrYjR width=140 height=85 alt=javascript code title=javascript code //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpSome of the most important new features in ES6 originate from existing solutions for problems shared by a large swath of JavaScript applications. This is particularly true of ES6 modules, a new system of class-based inheritance, and promises. Prototypal inheritance can be difficult for those new to JavaScript. And at some point, modules and promises have both been present in various JavaScript libraries, but until now, they were impossible to implement natively./p/div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/tags/acquia-drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=acquia drupal planet/a/div/div/div

erdfisch: Drupal Camp Northern Lights (Part 1)

Wed, 04/12/2017 - 16:32
span class=field field-node--title field-name-title field-type-string field-label-hiddenDrupal Camp Northern Lights (Part 1)/span span class=field field-node--created field-name-created field-type-created field-label-hidden12.04.2017/span span class=field field-node--uid field-name-uid field-type-entity-reference field-label-hiddenspan lang= about=/users/michael-lenahan typeof=schema:Person property=schema:name datatype=Michael Lenahan/span/span div class=field field-node--body field-name-body field-type-text-with-summary field-label-visually_hidden div class=field-label visually-hiddenBody:nbsp;/div ptl;dr: a href=https://dcnlights.drupal.is/Drupal Camp Northern Lights/a was even better than the actual Northern Lights./p pThis was the best Drupal event I have ever attended. So, even though it is two months late, it deserves a blog post./p p95 very, very lucky people attended./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6062-the-chosen-few-95.JPG //p pInstead of a camp t-shirt, the organizers gave us some memories we will always live with./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6064.JPG //p pWe had dinner at the Icelandic broadcasting corporation's offices. This was the view from the roof of RÚV./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6073.JPG //p pApologies to any real Drupal Vikings out there for this photo./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6079.JPG //p pHere we are at the intercontinental divide between North America and Europe. North America is to the left and is, as you can see, by far the more impressive of the two tectonic plates./p pimg src=https://erdfisch.de/sites/default/files/styles/large/public/IMG_6091-1_0.JPG //p pWe felt like true explorers./p pMore of this in a href=/node/375part two/a./p pOr you can skip to a href=/node/376part three/a where the stuff about the Drupal camp actually is./p /div div class=field field-node--field-blog-tags field-name-field-blog-tags field-type-taxonomy-term-reference field-label-visually_hidden div class=field-label visually-hiddenSchlagworte/Tags:nbsp;/div a href=/blog/taxonomy/term/345/0planet/a a href=/blog/drupal-planetdrupal-planet/a /div section class=field field-node--field-comments field-name-field-comments field-type-comment field-label-above comment-wrapper div class=comment-form-area div class=comment-form-area--container form class=comment-comment-form comment-form action=/comment/reply/node/374/field_comments method=post id=comment-form--3 accept-charset=UTF-8 div class=form-item form-type-textfield form-item-name label for=edit-name--3Ihr Name/label input data-drupal-default-value=Anonymous type=text id=edit-name--3 name=name value=Anonymous size=30 maxlength=60 class=form-text / /div input type=hidden name=form_build_id value=form-Wn0gCmE18iNHzohCSZ1gstvdi4g0oV9zRbeDoFGNKjM / input type=hidden name=form_id value=comment_comment_form / input type=hidden name=honeypot_time value=1492015952 / div class=field-type-text-long field-name-comment-body field-widget-text-textarea form-wrapper id=edit-comment-body-wrapper--3 div class=text-format-wrapper form-item div class=form-item form-type-textarea form-item-comment-body-0-value label for=edit-comment-body-0-value--3 class=form-requiredKommentar/Comment/label div class=form-textarea-wrappertextarea class=text-full form-textarea required resize-vertical id=edit-comment-body-0-value--3 name=comment_body[0][value] rows=5 cols=60 placeholder= required=required aria-required=true/textarea/div /div /div /div div class=form-actions form-wrapper id=edit-actions--3button type=submit id=edit-submit--3 name=op value=Save class=button button--primary form-submitspanSave/span/button /div div class=url-textfielddiv class=form-item form-type-textfield form-item-url label for=edit-url--3Leave this field blank/label input autocomplete=off type=text id=edit-url--3 name=url value= size=20 maxlength=128 class=form-text / /div /div /form /div /div /section

Another Drop in the Drupal Sea: On being the change I want to see in the community

Wed, 04/12/2017 - 15:39
pYes, this is another one of those posts./p pNo, this is not another one of those posts./p pa href=https://blog.isaacsonwebdevelopment.com/blog/2017/04/12/being-change-i-want-see-community target=_blankread more/a/p

Evolving Web: Migrate translated content from Drupal 6 to Drupal 8

Wed, 04/12/2017 - 15:15
a href=https://evolvingweb.ca/blog/migrate-translated-content-drupal-6-drupal-8?utm_source=feedutm_medium=feed_image img src=https://evolvingweb.ca/sites/default/files/styles/ewsite8_blog_image/public/2017-04/allenby%20bridge.jpg?itok=IDZgVrUP width=720 height=478 alt=Multiple languages, multiple borders typeof=Image class=img-responsive //apNow that Drupal 6 has reached end-of-life, many sites are moving to Drupal 8. If you had multilingual content in Drupal 6, this upgrade used to be very difficult—but since Drupal 8.2 there is support for migrating all your translations! In this article, we will discuss how to migrate translated content from Drupal 6 to Drupal 8./p pThis article would not have been possible without the help of my colleague a href=https://evolvingweb.ca/about-evolvingweb/dave-vasilevskyDave/a. Gracias Dave!/p h3The problem/h3 pWe have a a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/dump/sandbox_d6.sqlDrupal 6 database/a containing emstory/em nodes about a href=https://en.wikipedia.org/wiki/List_of_genetic_hybridsanimal hybrids/a. Some nodes have translations in English, Spanish and French; some are untranslated; and others are language-neutral (non-translatable). Our goal is to migrate the D6 nodes into a D8 website, preserving the translations./p h3Before we start/h3 ulliSince this is an advanced migration topic, it is assumed you already know the basics of migration. If are new to migrations in Drupal 8, I recommend that you read about a href=https://evolvingweb.ca/blog/drupal-8-migration-migrating-basic-data-part-1migrating basic data to Drupal 8/a first./li liIf you'd like to run the migrations in this example yourself, see the a href=https://github.com/evolvingweb/migrate_example_i18n#quick-startquick-start/a documentation in our a href=https://github.com/evolvingweb/migrate_example_i18ndrupal migration i18n example/a repository,/li /ulh3The module/h3 pTo write the migrations, we create a module - in our case, emmigrate_example_i18n/em. There's nothing special about the module declaration, except for the dependencies:/p ullia href=https://www.drupal.org/project/migrate_plusmigrate_plus/a and a href=https://www.drupal.org/project/migrate_toolsmigrate_tools/a provide various features for defining and executing migrations./li lia href=https://www.drupal.org/project/migrate_source_csvmigrate_source_csv/a: Will be used for demonstrating migration of translated content from non-Drupal sources in an upcoming article./li listrongmigrate_drupal:/strong This module provides tools for migrating data from older versions of Drupal. It comes with Drupal 8.x core. Since this migration uses a Drupal 6 site as a source for its data, we need the emmigrate_drupal/em module./li /ulh3How do translations work?/h3 ul/ulpBefore jumping into writing these migrations, it is important to mention that Drupal 6 and Drupal 8 translations work very differently. Here's the difference in a nutshell:/p ullistrongDrupal 6:/strong When we translate a node, a new node is created with a different ID. This translated node has a property named codetnid,/code which stores the ID of the original node, linking the two nodes together. For language-neutral or untranslated content, the codetnid/code is set to 0./li listrongDrupal 8:/strong When we translate a node, no new node is created! The translation is saved in the fields of the original node, but with a different language code./li /ulpTo map between the D6 and D8 translation models, we'll use two migrations:/p ulliThe a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_hybrid_base.ymlexample_hybrid_base/a migration will migrate the original content of each node, untranslated./li liThe a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_hybrid_i18n.ymlexample_hybrid_i18n/a migration will migrate in all the translations, and connect each one to the original node from example_hybrid_base../li /ulpWe group the two migrations using the a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration_group.example_hybrid.ymlexample_hybrid/a migration group to keep things clean and organized. Then we can execute both migrations with codedrush migrate-import --group=example_hybrid --update/code./p h3Step 1: Base migration/h3 pLet's start with the a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_hybrid_base.ymlexample_hybrid_base/a, to migrate all the base data (non-translations) in this migration. Described below are some noteworthy parameters:/p h4Source/h4 pre code class=highlightsource: plugin: d6_node node_type: story key: drupal_6 constants: node_article: article body_format: full_html/code/preullistrongplugin:/strong Since we want to import data from a Drupal installation, we need to set the source plugin to coded6_node/code. The coded6_node/code source plugin is introduced by the codemigrate_drupal/code, module and it helps us read nodes from a Drupal 6 database without having to write queries manually./li listrongnode_type:/strong This tells the source plugin that we are interested in just one particular Drupal 6 node type, namely emstory/em./li listrongkey:/strong Our Drupal 6 data doesn't come from our main Drupal 8 database—instead it comes from a secondary database connection. We choose a key to identify each such connection, and we need to tell the source which such key to use. The keys themselves are defined in the code$databases/code variable in our codesettings.php/code or codesettings.local.php/code. See the example a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/dump/settings.local.phpsettings.local.php/a file to see how it's done./li listrongconstants:/strong We define some hard-coded values under this parameter./li listrongtranslations:/strong Notice there is strongno/strong codetranslations/code parameter here. The default value (codefalse)/code tells the source plugin that we're only interested in migrating non-translations, i.e. content in the base language and language-neutral content./li /ulh4Destination/h4 pre code class=highlightdestination: plugin: 'entity:node'/code/preullistrongplugin:/strong Since we want to create node entities in Drupal 8, we specify this as codeentity:node/code. That's it./li listrongtranslations:/strong Again we do strongnot/strong define the translations parameter while migrating base data. Omitting the parameter tells the destination plugin that we are interested in creating fresh nodes for each record, not translations of existing nodes./li /ulh4Process/h4 pre code class=highlightprocess: type: constants/node_article langcode: plugin: default_value source: language default_value: und 'body/value': body 'body/format': constants/body_format title: title field_one_liner: field_one_liner sticky: sticky status: status promote: promote/code/prepThis is where we map the old node properties to the new node properties. Most of the properties have been assigned as is, without alteration, however, some noteworthy properties have been discussed below:/p ullistrongtype:/strong We specify that we want to create emarticle/em nodes./li listronglangcode:/strong The codelangcode/code parameter was formerly codelanguage/code in Drupal 6, so we rename it here. Also, if a Drupal 6 node is language-neutral, it will have no value at all here. In that case,  we default to codeund/code./li listrongbody:/strong We can assign this property directly to the codebody/code property. However, the Drupal 6 data is treated as plain text in Drupal 8 in that case. So migrating with codebody: body/code, the imported nodes in Drupal 8 would show visible HTML markup on your site. To resolve this, we explicitly assign the old codebody/code to codebody/value/code and specify that the text is in HTML by assigning codefull_html/code to codebody/format/code. That tells Drupal to treat the body as emFull HTML/em./li listrongnid/strongstrong: /strongThere is strongno/strong nid parameter here, because we don't care what nid each new node has in Drupal 8. Drupal can just assign a new nid to each node in the normal way./li /ulpThis takes care of the base data. If you run this migration with codedrush migrate-import example_hybrid_i18n --update/code, all Drupal 6 nodes which are in base language or are language-neutral will be migrated into Drupal 8./p h3Step 2: Translation migration/h3 pWe are halfway through now! All that's missing is migrating translations of the nodes we migrated above. To do this, we create another migration with the ID a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_hybrid_i18n.ymlexample_hybrid_i18n/a:/p pre code class=highlightsource: plugin: d6_node node_type: story translations: true # ... destination: plugin: 'entity:node' translations: true process: nid: plugin: migration source: tnid migration: example_hybrid_base langcode: language # ... migration_dependencies: required: - example_hybrid_base/code/prepThe migration definition remains mostly the same but has the following important differences as compared the base migration:/p ullistrongsource:/strong ullistrongtranslations:/strong We set this to codetrue/code to make the source plugin read only translations./li /ul/li listrongdestination:/strong ullistrongtranslations:/strong We set this to codetrue/code to make the destination plugin create translations for existing nodes instead of creating fresh new nodes for each source record./li /ul/li listrongprocess:/strong ullistrongnid:/strong In this case, we strongdo/strong care what the Drupal 8 nid is for each node. It has to match the nid for the untranslated version of this content, so that Drupal can add a translation to the correct node. This section uses the a href=https://www.drupal.org/docs/8/api/migrate-api/migrate-process/process-plugin-migrationcodemigration/code/a process plugin to figure out the right nid. It tells Drupal to check the previously-executed codeexample_hybrid_base/code migration for a D6 node that has the same codetnid/code as this D6 node. It will then then reuse the resulting nid here./li listronglangcode:/strong We define the language in which the translation should be created./li /ul/li listrongmigration_dependencies:/strong Since we cannot add translations to nodes that do not yet exist, we tell Drupal that this migration depends on the base migration codeexample_hybrid_base/code. That way, the base migration will run before this migration./li /ulpThat's it! We can run our translation migration with codedrush migrate-import example_hybrid_i18n --update/code and the translations will be imported into Drupal 8. Alternatively, we can use the migration group we defined to run both these migrations at once - the embase/em migration will automatically be executed first and then the emi18n/em migration. Here's how the output should look:/p pre code class=language-bash highlight$ drush migrate-import --group=example_hybrid --update Processed 8 items (8 created, 0 updated, 0 failed, 0 ignored) - done with 'example_hybrid_base' Processed 9 items (9 created, 0 updated, 0 failed, 0 ignored) - done with 'example_hybrid_i18n'/code/prepYou can check if everything went alright by clicking the codeTranslate/code option for any translated node in Drupal 8. If everything went correctly, you should see that the node exists in the original language and has one or more translations./p h3Next steps/h3 ulliCheck out the code for the a href=https://github.com/evolvingweb/migrate_example_i18nexample_migrate_i18n/a module on GitHub./li liRead about a href=https://evolvingweb.ca/blog/drupal-8-migration-migrating-basic-data-part-1migrating basic data to Drupal 8/a./li liRead about a href=https://evolvingweb.ca/blog/drupal-8-migration-migrating-taxonomy-term-references-part-2migrating taxonomy terms to Drupal 8/a./li liRead about a href=https://evolvingweb.ca/blog/drupal-8-migration-migrating-files-images-part-3migrating files / images to Drupal 8/a./li liRead about migrating translated content from non-Drupal sources into Drupal 8 (coming soon)./li /ula href=blog/migrate-translated-content-drupal-6-drupal-8?utm_source=feedutm_medium=more target=_blank+ more awesome articles by Evolving Web/a

Valuebound: How to use Configuration Split Module to Split Configurations in Drupal 8

Wed, 04/12/2017 - 13:53
pThe configuration Split module allows users to define sets of configuration that will get exported to separate directories when exporting and get merged together when importing./p ulli class=text-align-justifyDrupal split module depends on Config Filter for the integration with the import/export pipeline of the Drupal UI and drush./li li class=text-align-justifyIt is possible to define in settings.php which of these sets should be active and considered for the export and import/li /ulpstrong                                Here are a few things that are considered configuration:/strong/p pConfiguration split exposes a configuration entity which controls what you want to split off. Currently, you can/p ulliBlacklist modules: Any configuration that…/li/ul

Liip: Drupal 8 – Multilanguage Improvements

Wed, 04/12/2017 - 11:19
pAs 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./p pWith Drupal 8, things changed.br / 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./p pspan id=more-8881/span/p div id=attachment_8884 style=width: 1034px class=wp-caption alignnoneimg class=wp-image-8884 size-large src=https://blog.liip.ch/content/uploads/2017/04/maxresdefault-1024x575.jpg alt=Drupal 8 multilanguage srcset=https://blog.liip.ch/content/uploads/2017/04/maxresdefault-1024x575.jpg 1024w, https://blog.liip.ch/content/uploads/2017/04/maxresdefault-300x169.jpg 300w, https://blog.liip.ch/content/uploads/2017/04/maxresdefault-768x431.jpg 768w sizes=(max-width: 1024px) 100vw, 1024px /p class=wp-caption-textemImage: drupal8multilingual.org/em/p/div h2Drupal 8 delissues/del multilanguage challenges/h2 h3Challenge 1: Node add / edit menu handling/h3 pThe 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./p h3Challenge 2: Untranslated Nodes show up in Menu/h3 pAnother 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. a href=http://hojtsy.hu/blog/2015-nov-18/drupal-8-multilingual-tidbits-20-combination-use-cases-content-and-menushere/a and a href=https://www.drupal.org/node/2466553here/a). 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./p h3Challenge 3: Language Switcher shows all languages #8211; always./h3 pSomewhat 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/p pAn example to illustrate the above-written challenges./p pimg class=alignnone wp-image-8887 src=https://blog.liip.ch/content/uploads/2017/04/Welcome-to-drupal-8.3.0-drupal-8.3.01-1.png alt=multilanguage issues with Drupal 8 srcset=https://blog.liip.ch/content/uploads/2017/04/Welcome-to-drupal-8.3.0-drupal-8.3.01-1.png 901w, https://blog.liip.ch/content/uploads/2017/04/Welcome-to-drupal-8.3.0-drupal-8.3.01-1-300x100.png 300w, https://blog.liip.ch/content/uploads/2017/04/Welcome-to-drupal-8.3.0-drupal-8.3.01-1-768x255.png 768w sizes=(max-width: 898px) 100vw, 898px //p pemEnglish Front-Page with mixed navigation items./em/p pThe screen above shows an installation with 2 languages (English and German). The strongEnglish Page/strong is a basic page which has a translation. English is selected. If you choose emstrongDeutsch/strong/em on the language switcher, the strongEnglish Page/strong becomes strongDeutsche Seite/strong (see image below) and shows the German content. So far so good. But the second menu item you see with the title strongÜber uns (nur Deutsch)/strong 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./p pimg class=alignnone wp-image-8886 size-full src=https://blog.liip.ch/content/uploads/2017/04/Über-uns-nur-Deutsch-Drupal1-1.png alt=multilanguage issues with Drupal 8 srcset=https://blog.liip.ch/content/uploads/2017/04/Über-uns-nur-Deutsch-Drupal1-1.png 898w, https://blog.liip.ch/content/uploads/2017/04/Über-uns-nur-Deutsch-Drupal1-1-300x106.png 300w, https://blog.liip.ch/content/uploads/2017/04/Über-uns-nur-Deutsch-Drupal1-1-768x271.png 768w sizes=(max-width: 898px) 100vw, 898px //p pemGerman only Page #8211; Language Switcher visible. /em/p pAlso, 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./p h2How to delfix/del improve this?/h2 pLuckily, 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./p pTo sum up again: emstrongI 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./strong/em/p pSince there is no patch and still some ongoing discussions on a href=https://www.drupal.orgdrupal.org/a you need to implement it on your own. Implement the following two modules./p h3bHide untranslated menu items/b/h3 pCode from a href=https://www.drupal.org/node/2466553#comment-11991690https://www.drupal.org/node/2466553#comment-11991690/a. Credits go to michaelkoehne./p p/ppre class=crayon-plain-taglt;?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(amp;$variables) { if ($variables['menu_name'] == 'main') { $language = Drupal::languageManager() -gt;getCurrentLanguage(LanguageInterface::TYPE_CONTENT) -gt;getId(); foreach ($variables['items'] as $key =gt; $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-gt;getTranslationLanguages(); // Remove links which are not translated to the current language. if (!array_key_exists($language, $languages)) { return FALSE; } else { if (count($item['below']) gt; 0) { foreach ($item['below'] as $subkey =gt; $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-gt;getPluginId(), 2); $uuid = $menu_link[1]; $entity = \Drupal::service('entity.repository') -gt;loadEntityByUuid('menu_link_content', $uuid); } return $entity; }/prep/p h3Hide untranslated languages in language switcher/h3 pCode from a href=https://www.drupal.org/node/2791231#comment-12004615https://www.drupal.org/node/2791231#comment-12004615/a (slightly adapted. Links get a class, not removed by default). Credits to Leon Kessler./p p/ppre class=crayon-plain-taglt;?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 amp;$links, $type, $path) { if ($entity = MYOTHERMODULE_get_page_entity()) { $new_links = array(); foreach ($links as $lang_code =gt; $link) { try { if ($entity-gt;getTranslation($lang_code)-gt;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) lt; 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()-gt;getParameters()-gt;all(); $entity = reset($params); if ($entity instanceof ContentEntityInterface) { return $entity; } return FALSE; }/prep/p pPlease note: The code above is from Drupal.org and therefore thanks to the original authors linked above./p pEnable those two modules and you’re all set!/p pI 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?/p pThere are other attempts to this by altering the menu block. One of them is a href=https://www.drupal.org/project/menu_block_current_languageMenu Block Current Language/a 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)./p pI would love to hear how you guys handle those cases or how you deal with I18N in general. I#8217;m sure there are a gazillion other ways to do it./p

La Drupalera (en): Grunt, automating repetitive work

Wed, 04/12/2017 - 10:50
div data-history-node-id=146 class=node node--type-article node--view-mode-rss ds-1col clearfix img property=schema:image src=http://www.ladrupalera.com/sites/default/files/styles/max_650x650/public/2016-11/ux-787980_1920_0.jpg?itok=SyO5RGA9 width=650 height=432 alt=Grunt, automating repetitive work typeof=foaf:Image class=image-style-max-650x650 /pGrunt is a Javascript task automator that allows us to launch a series of tasks at the same time with just a single order. Being based on Javascript, both the syntax and the operation is very simple, working based on plugins/p h2Instalation/h2 pre code class=language-bashnpm install -g grunt-cli /code/pre p /p pWe will need two main files that we will place in the root of the project in which Grunt will perform its tasks:/p pstrongpackage.json/strong/p pre code class=language-json{ name: ExampleProject, version: 0.1, dependencies: { }, devDependencies: { } }/code/pre pand strongGruntfile.js/strong/p div class=field field--name-node-link field--type-ds field--label-hidden field__itema href=http://www.ladrupalera.com/en/drupal/development/javascript/grunt-automating-repetitive-work hreflang=en-x-simpleRead more/a/div /div

Verbosity: Talking migrations at DrupalCon Baltimore

Wed, 04/12/2017 - 02:00
pIf you are imporitng content to Drupal 8, or planning to do so in the future, there are two upcoming talks at a href=https://events.drupal.org/baltimore2017DrupalCon Baltimore/a that may be of interest to you.../p h3 id=migrate-with-the-maintainers-labMigrate with the Maintainers Lab/h3 pAt the a href=https://events.drupal.org/baltimore2017/sessions/migrate-maintainers-labMigrate with the Maintainers Lab/a we will walk you through the process of importing data into your Drupal 8 site, using a variety of approaches based on the Drupal Core Migrate module. In the past I have offered this as a full-day seminar at camps in New Jersey, Chicago, and San Francisco. This time we will have 3 of the core contributors as well! It is a 2h session so it will be a fast paced workshop./p h3 id=planning-managing-migrationsPlanning amp; Managing Migrations/h3 pThe a href=https://events.drupal.org/baltimore2017/sessions/planning-managing-migrationsPlanning amp; Managing Migrations/a session is a standard DrupalCon talk. I#39;m doing this one in conjunction with Aimee from a href=http://www.hook42.com/Hook 42/a. I have done a similar talk with my colleague Novella at the Ottawa DrupalCamp, and solo in other places. Aimee and I have collaborated on large-scale migrations before so this talk will cover the issues you find at scale! It presumes only basic Drupal knowledge and is aimed at project managers but it will still be beneficial to developers who want to improve their processes./p pHope to see you there!/p

Angie Byron: The Drupal Community Working Group: What it is, what it isn't

Tue, 04/11/2017 - 23:26
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpIn recent weeks, I've seen a whole lot of FUD regarding the a href=https://www.drupal.org/governance/community-working-groupDrupal Community Working Group/a, and what it is they do or don't do. While I no longer serve in the CWG (I stepped down from all extra-curricular Drupal activities back in 2015 to focus on my family), most of the portrayals I've read are misinformed at best and completely inaccurate at worst. So, as an ex-member, who was uninvolved in recent events and therefore can perhaps speak more freely(?), I’d like to try and clear up a few misconceptions I've seen./p pSome have characterized the CWG as some nebulous dark secret court of frothing SJW activists, gleefully acting as judge/jury/executioner, deliberately seeking out “bad apples in the community to oust, laughing malevolently all the way. This is patently false, and nothing could be further from the truth./p pIn reality, barring flash point incidents like the most recent one, it’s a pretty mundane gig. It mostly involves watching for something to be brought across your desk via an a href=https://www.drupal.org/governance/community-working-group/incident-reportincident report/a, then trying your best as an unpaid volunteer—appointed based on your demonstrated ability to stay neutral and diplomatic in a crisis—to help empower people in the community to solve their own problems./p pThis takes different forms. A lot of the times it’s simply giving people a safe place to post concerns where they know they’ll be looked at seriously. The CWG provides someone to speak to who will genuinely listen to your concerns, and will give both parties a chance to speak and feel heard. If the situation escalates, the CWG will sometimes suggest neutral third-parties to help mediate, or in the “bigger” cases, get directly involved with mediation themselves. And while the CWG is empowered to oust people from the community in extreme circumstances, a) to-date, they have only done so once, following a a href=https://www.drupal.org/node/2729687harassment incident/a at DrupalCon, and b) barring extreme circumstances such as that, it is only done after a last, *last* resort. All of this is laid out in the Conflict Resolution Policy and Process: a href=https://www.drupal.org/conflict-resolutionhttps://www.drupal.org/conflict-resolution/a/p pIf an individual has multiple, *multiple* complaints against them, in many cases driving others to either leave the community entirely or dramatically reduce their involvement in the project, and if every other attempt to resolve the situation has failed, which includes private mediation, one-on-one mentoring, sterner warnings, etc. then as a last-ditch effort something like an a href=https://www.drupal.org/node/2504989Action Plan/a is developed. This is summarized as:/p blockquotep The aim of an action plan is to find a path forward that avoids additional harm to the community. Drafting an action plan should help people recognise what triggers these incidents and help them learn to respond differently by using alternative approaches to problem-solving./p pHowever, the action plan may also serve as a final warning. If further complaints come to the CWG, further action may be necessary. As a group, our authority derives from Dries, and when necessary, we also consult Dries and involve him in the process. /p/blockquote pThe template includes a summary of complaints (all of which have been already vetted by the CWG for validity), the emimpact/em the person's actions have had on members of the community, and a clearly outlined set of steps to perform to prevent future complaints (e.g. if you're feeling frustrated, WALK AWAY instead of engaging in online battles in the heat of the moment). The intent is to wake the person up a bit, to help them understand that their actions — regardless of how justified they feel they are in having taken them — have consequences, often on people they care about, and to give them a clear path to re-engage with the community in a constructive and healthy way./p pThe CWG will bend over backwards to help people emnot/em get to that point, *especially* if they have an extensive contribution record. At a certain point though, if a “body trail” develops of people leaving the community because of an individual's conduct, it becomes something that emneeds/em to be addressed, especially if you sit on a governing body with the mandate to keep the community healthy. This is the situation that happened with chx, whose self-ban from the community was widely publicized, and which keeps getting brought up in the context of recent events as somehow related, which it is not./p pSome people might respond to this with Well, then contributors should just grow a thicker skin. That's certainly one approach. However, you lose a lot of great contributors that way (and indeed, we already have), as well as a lot of new blood into your project. I've previously documented a href=http://webchick.net/files/webchick-first-five-minutes-in-pound-drupal.pngmy first 5 minutes in the Drupal community/a. Had I not been contractually obligated to remain because of Google Summer of Code, that likely would've been my emlast/em 5 minutes in the Drupal community, as well. And there are 1000s of other contributors out there like past webchick. Food for thought./p pSo thanks, CWG, for doing your part of the thankless and difficult job that is ensuring that the Drupal community remains a respectful and collaborative place for all of us to do awesome things. 3/p /div/div/divdiv class=field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-abovediv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/taxonomy/term/1 typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=drupal/a/divdiv class=field-item odda href=/taxonomy/term/48 typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=community/a/div/div/div

Mediacurrent: Comparing Drupal and Adobe Experience Manager, Part 1 of 2

Tue, 04/11/2017 - 19:54
img typeof=foaf:Image src=https://www.mediacurrent.com/sites/default/files/styles/thumb_blog_spotlight/public/comparing-drupal-adobe-v2-01.png?itok=gysmRSK2 width=200 height=152 alt=Drupal vs Adobe Experience Manager Part 1 title=Drupal vs Adobe Experience Manager Part 1 / pThere is a good deal of publicly-accessible content comparing enterprise-level Content Management Systems (CMS) in terms of features, functionality, and cost. Each CMS comes with its own strengths and weaknesses in light of an organization’s requirements, and it behooves the organization to read up on these comparisons and consult with digital agencies like Mediacurrent before deciding on which CMS to use./p

LakeDrops Drupal Consulting, Development and Hosting: Prevent ambiguity in Drupal 8 migration source query

Tue, 04/11/2017 - 19:48
span class=field field--name-title field--type-string field--label-hiddenPrevent ambiguity in Drupal 8 migration source query/span span class=field field--name-uid field--type-entity-reference field--label-hiddena title=View user profile. href=https://www.lakedrops.com/en/lakedropper/richard-papp lang= about=https://www.lakedrops.com/en/lakedropper/richard-papp typeof=schema:Person property=schema:name datatype= class=username xml:lang=Richard Papp/a/span span class=field field--name-created field--type-created field--label-hiddenTue, 04/11/2017 - 19:48/span div class=clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__itemIf you customize the database query in Drupal 8 migration source plugins, you may run into an integrity constraint violation. This can be resolved by setting an alias for the table./div