Planet Drupal

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

Zivtech: Empowering Drupal 8 Content Editors with EVA: Attach All the Displays!

Thu, 04/20/2017 - 15:00
div class=field-body p dir=ltra href=https://www.drupal.org/project/eva target=_blankEntity Views Attachment/a, or EVA, is a Drupal module that allows you to attach view displays to entities of your choosing. We used it recently on a project and loved it. You know it’s good because it has a no-nonsense name and an even better acronym. (Plus, the maintainers have taken full advantage of the acronym and placed a spaceman on the project page. Nice!)/p div class=asset-wrapper asset aid-283 asset-image editor contenteditable=false data-asset-cid=1492007371518 div class=content div class=field-asset-imageimg alt= height=425 src=//d3c8ywfe3gnnss.cloudfront.net/cdn/farfuture/UJfWBoSqzaxQrt-GgTNm97F48TCJNsp_w7hF0FACB8k/mtime:1492007371/sites/default/files/styles/asset_image_full/public/assets/images/EVA__Entity_Views_Attachment___Drupal_org.png width=630 //div div class=field-asset-image-copyright /div div class=field-asset-image-description /div /div /div p dir=ltr /p p dir=ltrSince the now-ubiquitous a href=https://www.drupal.org/project/paragraphs target=_blankParagraphs/a module provides the “paragraph” entity type, I figured these two will make good dancing partners./p p dir=ltrGetting them to tango is simple enough. You create a paragraph bundle, target that bundle in the settings on an EVA view display, then arrange the view in the paragraph’s display settings. Voila – your view display shows up wherever you add this paragraph!/p p dir=ltrBy attaching a view display to a paragraph entity and enabling that paragraph on a node’s paragraph reference field, you give your content editors the ability to place a view wherever they want within their page content. Better still, they can contextualize what they are doing since this all happens in the edit form where the rest of the node content lives. As far as I can tell, no other approach in the Drupal ecosystem (I’m looking at you Blocks and Panels) makes adding views to content this easy for your editors./p h2 dir=ltrCase Study/h2 p dir=ltrThe concept is pretty straightforward, but with a little cleverness it allows you to build some complex page elements. Let’s walk through an example. Consider the following design:/p div class=asset-wrapper asset aid-287 asset-image editor contenteditable=false data-asset-cid=1492609188938 div class=content div class=field-asset-imageimg alt= height=937 src=//d3c8ywfe3gnnss.cloudfront.net/cdn/farfuture/XyjRrWPi_hQJynjGB7-4JrSHNH2fQA-QI2kKPlRSJF8/mtime:1492609189/sites/default/files/styles/asset_image_full/public/assets/images/Mockup%20%282%29.png width=693 //div div class=field-asset-image-copyright /div div class=field-asset-image-description /div /div /div p dir=ltr /p p dir=ltrThis mockup represents strongSection/strong nodes and lists of strongSubpage/strong nodes that reference them. In addition, the buttons links should point to the parent Section node. With a little elbow grease, we can build a system to output this with our friends EVA and Paragraphs. /p p dir=ltrHere’s how I’m breaking this down conceptually:/p div class=asset-wrapper asset aid-288 asset-image editor contenteditable=false data-asset-cid=1492609328615 div class=content div class=field-asset-imageimg alt= height=1012 src=//d3c8ywfe3gnnss.cloudfront.net/cdn/farfuture/EJdy-_pRhE4xdJzubQoj-vAGjbzdjBK1oynJQiFWfGY/mtime:1492609328/sites/default/files/styles/asset_image_full/public/assets/images/Mockup__2__annotated.png width=685 //div div class=field-asset-image-copyright /div div class=field-asset-image-description /div /div /div p dir=ltr /p p dir=ltrWe have three things to build:/p olli dir=ltr p dir=ltrA create a container paragraph bundle/p /li li dir=ltr p dir=ltrA child paragraph bundle with a Section entity reference field/p /li li dir=ltr p dir=ltrAn EVA of subpages to attach to the child paragraph bundle/p /li /olh3 dir=ltrBuilding the Subpage EVA/h3 p dir=ltrAs I mentioned before, strongSubpage/strong nodes will reference strongSection/strong nodes. With this in mind, we can build the EVA that lists subpages and expects a section node ID to contextually filter to subpages that reference that node./p h3 dir=ltrBuilding the Section paragraph type/h3 p dir=ltrNext, we’ll create the strongSection/strong paragraph type that will handle each grouping of a section node with its related subpages. The strongSection/strong paragraph will have one field, an entity reference field limited to Section nodes, that gives us all the data we need from our section. /p p dir=ltrWe’ll attach our EVA to this paragraph type and configure it to pass the referenced node’s ID as the contextual filter using tokens in the EVA settings. You will need to install the a href=https://www.drupal.org/project/token target=_blankToken module/a to do this. Go to strong/admin/help/token/strong to see all available tokens once installed. You need to grab the node ID through your entity reference field, so your token argument should look something like this:/p code class=language-markdown[paragraph:field_node_reference:entity:nid]/code p dir=ltr /p p dir=ltrWe pass that token to our contextual filter, and we can tell our view to use that argument to create a link to the section node for our “View All Subpages” link. To do this, we’ll add a global text area to the view footer and check the “Use replacement tokens from the first row” checkbox. Then we’ll write some HTML to create a link. It’ll look something like this:/p code class=language-htmllt;a href=/node/{{ raw_arguments.nid }}gt;View all Subpageslt;/agt;/code h3 dir=ltrBuilding the Section List paragraph type/h3 p dir=ltrLastly, we’ll create thestrong /strongstrongSection List/strong paragraph type. This only really needs a paragraph reference field that only allows the user to add Section paragraphs, but I also added a title field that will act as a header for the whole list./p p dir=ltrTip: Install a href=https://www.drupal.org/project/fences target=_blankFences module/a to control your field’s wrapper markup. I used this here to wrap the title in lt;h2gt; tags./p h3 dir=ltrWe’re finished!/h3 p dir=ltrNow that everything is built, we can allow users to select the strongSection List/strong paragraph type in a paragraph reference field of our choosing. A user adds astrong /strongstrongSection List/strong, then adds strongSections/strong via the entity reference. It looks like this in the node edit form:/p div class=asset-wrapper asset aid-286 asset-image editor contenteditable=false data-asset-cid=1492007531351 div class=content div class=field-asset-imageimg alt= height=507 src=//d3c8ywfe3gnnss.cloudfront.net/cdn/farfuture/W7M0gyOn7xAODHcVwm5bfM_3vk0f02FBMTOr2Yx6JKY/mtime:1492007531/sites/default/files/styles/asset_image_full/public/assets/images/Edit_Basic_page_Clarifi_Service_Areas___Clarifi.png width=800 //div div class=field-asset-image-copyright /div div class=field-asset-image-description /div /div /div p /p pDo you have any cool ways you use the EVA module in your builds? Let us know in the comments section below./p p /p /div nav role=navigation class=links-inline/nav

Evolving Web: Migrate translations from CSV, JSON or XML to Drupal 8

Thu, 04/20/2017 - 14:38
a href=https://evolvingweb.ca/blog/migrate-translations-csv-json-or-xml-drupal-8?utm_source=feedutm_medium=feed_image img src=https://evolvingweb.ca/sites/default/files/styles/ewsite8_blog_image/public/2017-04/iStock-458557039-reduced.jpg?itok=BW3QK3sM width=720 height=281 alt=Photo of baggage labels from 1980s airlines such as TWA. typeof=Image class=img-responsive //apIn my last post, I showed you a href=https://evolvingweb.ca/node/356how to migrate translated content from Drupal 6 to Drupal 8/a. But clients often don't start with their data in Drupal 6. Instead there's some other source of data that may include translations, like a CSV spreadsheet. In this article, I'll show you how to migrate multilingual content from such sources 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 two CSV files containing some data about a href=https://en.wikipedia.org/wiki/Chemical_elementchemical elements/a in two languages. One file contains data in a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/import/element/element.data.en.csvEnglish/a and the other file, in a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/import/element/element.data.es.csvSpanish/a. Our goal is to migrate these records into a Drupal 8 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./li liTo execute the migrations in this example, you can download the a href=https://github.com/evolvingweb/migrate_example_i18nmigrate example i18n/a. The module should work without any trouble for a standard Drupal 8 install. See a href=https://github.com/evolvingweb/migrate_example_i18n#quick-startquick-start/a for more information./li /ulh3Migrating JSON, XML and other formats/h3 pThough this example shows how to work with a CSV data source, one can easily work with other data sources. Here are some quick pointers:/p ulliFind and install the relevant migrate source module. If you do not have a standard source module available, you can: ullitry converting your data to a supported format first./li liwrite your own migration source plugin, if you're feeling adventurous./li /ul/li liModify the migration definitions to include custom parameters for the data source./li liSome useful source formats are supported by these projects: ulliJSON / XML / SOAP are supported by the a href=https://www.drupal.org/project/migrate_plusmigrate_plus/a project./li liODS / XLS / XLSX / CSV are supported by a href=https://www.drupal.org/project/migrate_spreadsheetmigrate_spreadsheet/a project./li /ul/li /ulh3The module/h3 pTo write the migrations, we create a module—in our case, it is named 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 lets us read migration source data from CSV files./li /ulh3How to migrate translations/h3 ul/ulpBefore we start writing migrations, it is important to mention how Drupal 8 translations work. In a nutshell:/p ulliFirst, we create content in its base language, say in English. For example, we could create a brand new node for the element emHydrogen/em, which might have a unique node ID 4./li liNow that the embase/em node is in place, we can translate the node, say to Spanish. Unlike some previous versions of Drupal, this won't become a new node with its own node ID. Instead, the translation is saved against the same node generated above, and so will have the same node ID—just a different language setting./li /ulpHence, the migration definition for this example includes the following:/p ulliWe migrate the base data in English using in a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_element_en.ymlexample_element_en/a migration./li liWe migrate the Spanish translations using the a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_hybrid_i18n.ymlexample_/aa href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_element_es.ymlelement_es/a migration, and link each translation to the original English version./li liWe group the two migrations in the a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration_group.example_hybrid.ymlexample_/aa href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration_group.example_element.ymlelement/a migration group to keep things clean and organized./li /ulpThus, we can execute the migrations of this example with the command codedrush migrate-import --group=example_element/code./p h4Warning/h4 pNote that this plan only works because every single node we are importing has at least an English translation! If some nodes only existed in Spanish, we would not be able to link them to the (non-existent) original English version. If you encounter data like this, you'll need to handle it in a different way./p h3Step 1: Element base migration (English)/h3 pTo migrate the English translations, we define the a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_element_en.ymlexample_element_en/a migration. Here is a quick look at some important parameters used in the migration definition./p h4Source/h4 pre code class=highlightsource: plugin: csv path: 'element.data.en.csv' header_row_count: 1 keys: - Symbol fields: Name: 'Name' Symbol: 'Symbol' 'Atomic Number': 'Atomic number' 'Discovered By': 'Name of people who discovered the element' constants: lang_en: en node_element: 'element'/code/preullistrongplugin:/strong Since we want to import data from a CSV file, we need to use the emcsv/em plugin provided by the a href=https://www.drupal.org/project/migrate_source_csvmigrate_source_csv/a module./li listrongpath:/strong Path to the CSV data source so that the source plugin can read the file. Our source files for this example actually live within our module, so we modify this path at runtime using codehook_migration_plugins_alter()/code in a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/migrate_example_i18n.modulemigrate_example_i18n.module/a./li listrongheader_row_count:/strong Number of initial rows in the CSV file which do not contain actual data. This helps ignore column headings./li listrongkeys:/strong The column(s) in the CSV file which uniquely identify each record. In our example, the chemical symbol in the column emSymbol/em is unique to each row, so we can use that as the key./li listrongfields:/strong A description for every column present in the CSV file. This is used for displaying source details in the UI./li listrongconstants:/strong Some static values for use during the migration./li /ulh4Destination/h4 pre code class=highlightdestination: plugin: 'entity:node'/code/preullistrongplugin:/strong Nothing fancy here. We aim to create emnode/em entities, so we set the codeplugin/code as codeentity:node/code./li listrongtranslations:/strong Since we are importing the content in base language, we do not specify the codetranslations/code parameter. This will make Drupal create new nodes for every record./li /ulh4Process/h4 pre code class=highlightprocess: type: constants/node_element title: Name langcode: constants/lang_en field_element_symbol: Symbol field_element_discoverer: plugin: explode delimiter: ', ' source: Discovered By/code/prepThis is where we map the columns of the CSV file to properties of our target nodes. Here are some mappings which require a special mention and explication:/p ullistrongtype:/strong We hard-code the content type for the nodes we wish to create, to type codeelement/code./li listronglangcode:/strong Since all source records are in English, we tell Drupal to save the destination nodes in English as well. We do this by explicitly specifying codelangcode/code as codeen/code./li listrongfield_element_discoverer:/strong This field is a bit tricky. Looking at the source data, we realize that every element has one or more discoverers. Multiple discoverer names are separated by commas. Thus, we use codeplugin: explode/code and codedelimiter: ', '/code to split multiple records into arrays. With the values split into arrays, Drupal understands and saves the data in this column as multiple values./li /ulpWhen we run this migration like codedrush migrate-import example_element_en/code, we import all the nodes in the base language (English)./p h3Step 2: Element translation migration (Spanish)/h3 pWith the base nodes in place, we define a migration similar to the previous one with the ID a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/config/install/migrate_plus.migration.example_element_es.ymlexample_element_es/a./p pre code class=highlightsource: plugin: csv path: 'element.data.es.csv' header_row_count: 1 keys: - 'Simbolo' constants: lang_en: en # ... destination: plugin: 'entity:node' translations: true process: nid: plugin: migration source: Simbolo migration: example_element_en langcode: constants/lang_es content_translation_source: constants/lang_en # ... migration_dependencies: required: - example_element_en/code/prepLet us look at some major differences between the codeexample_element_es/code migration and the codeexample_element_en/code migration:/p ullistrongsource:/strong ullistrongpath:/strong Since the Spanish node data is in another file, we change the path accordingly./li listrongkeys:/strong The Spanish word for emSymbol/em is emSímbolo,/em and it is the column containing the unique ID of each record. Hence, we define it as the source data key. Unfortunately, Drupal migrate support keys with non-ASCII characters such as codeí/code (with its accent). So, as a workaround, I had to remove all such accented characters from the column headings and write the codekey/code parameter as codeSimbolo/code, without the special codeí/code./li listrongfields:/strong The field definitions had to be changed to match the Spanish column names used in the CSV./li /ul/li listrongdestination:/strong ullistrongtranslations:/strong Since we want Drupal to create translations for English language nodes created during the codeexample_element_en/code migration, we specify codetranslations: true/code./li /ul/li listrongprocess:/strong ullistrongnid:/strong We use the codeplugin: migration/code to make Drupal lookup nodes which were created during the English element migration and use their ID as the codenid/code. This results in the Spanish translations being attached to the original nodes created in English./li listronglangcode:/strong Since all records in a href=https://github.com/evolvingweb/migrate_example_i18n/blob/8.x/import/element/element.data.es.csvelement.data.es.csv/a are in Spanish, we hard-code the codelangcode/code to codees/code for each record of this migration. This tells Drupal that these are emSpanish/em translations./li listrongcontent_translation_source:/strong Each translation of a Drupal node comes from a previous translation—for example, you might take the Spanish translation, and translate it into French. In this case, we'd say that Spanish was the emsource language/em of the French translation. By adding this process step, we tell Drupal that all our Spanish translations are coming from English./li /ul/li listrongmigration_dependencies:/strong This ensures that the base data is migrated before the translations. So to run this migration, one must run the codeexample_element_en/code migration first./li /ulpVoilà! Run the Spanish migration (codedrush migrate-import example_element_es)/code and you have the Spanish translations for the elements! We can run both the English and Spanish migration at once using the migration group we created. Here's how the output should look in the command-line:/p pre code class=language-bash highlight$ drush migrate-import --group=example_element Processed 111 items (111 created, 0 updated, 0 failed, 0 ignored) - done with 'example_element_en' Processed 105 items (105 created, 0 updated, 0 failed, 0 ignored) - done with 'example_element_es'/code/prepIf we had another file containing French translations, we would create another migration like we did for Spanish, and import the French data in a similar way. I couldn't find a CSV file with element data in French, so I didn't include it in this example—but go try it out on your own, and leave a comment to tell me how it went!/p h3Next steps/h3 ulliCheck out the code for the a href=https://github.com/evolvingweb/migrate_example_i18nmigrate_example_i18n/a module on GitHub./li liRead about a href=https://evolvingweb.ca/node/356migrating translated content from Drupal 6 to Drupal 8/a./li /ula href=https://evolvingweb.ca/blog/migrate-translations-csv-json-or-xml-drupal-8?utm_source=feedutm_medium=more target=_blank+ more awesome articles by Evolving Web/a

Dropsolid: Making a difference, One Drupal security patch at a time

Thu, 04/20/2017 - 13:52
div data-history-node-id=508 class=node node--type-blog node--view-mode-rss ds-1col clearfix div class=field field--name-field-header-image field--type-image field--label-hidden field__item img src=http://dropsolid.com/sites/default/files/styles/header_image/public/2017-04/security.png?itok=Ul6HX_97 width=940 height=400 alt=security typeof=foaf:Image class=image-style-header-image //div div class=blog-top div class=field field--name-node-post-date field--type-ds field--label-hidden field__item20 Apr/div div class=tussengroep div class=field field--name-field-detail-title field--type-string field--label-hidden field__itemh1Making a difference, one Drupal security patch at a time/h1/div div class=blog-bottom div class=field field--name-node-author field--type-ds field--label-hidden field__itemspan lang= about=http://dropsolid.com/en/user/1852 typeof=schema:Person property=schema:name datatype= xml:lang=Nick/span/div /div /div /div div class=clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__itemh2 dir=ltrstrongAdvisory by the Drupal security team/strong/h2 p class=text-align-justify dir=ltrRecently, the emReferences /emmodule started receiving some attention (read a href=https://www.reddit.com/r/drupal/comments/65373x/references_how_bout_that_security_vuln_eh/ target=_blankhere/a, a href=http://securityaffairs.co/wordpress/58136/hacking/drupal-references-module-flaw.html target=_blankhere/a and a href=https://drupal.sh/vulnerable-drupal-contrib-module-puts-120000-sites-at-risk target=_blankhere/a). The reason for this is that the Drupal security team posted an advisory to migrate away from the Remeferences /emmodule for Drupal 7 and move to the ementity_reference/em module. At the time of writing (20 April), strong121.091/strong strongsites /strongare actively reporting to Drupal.org that they are using this module. That makes for a lot of unhappy developers./p p class=text-align-justifyThings kicked off after a security vulnerability was discovered in the a href=https://www.drupal.org/project/references target=_blankReferences module/a. The security team tried to contact the existing maintainers of that module, but there was no response. The security team had no choice but to mark the module as abandoned and send out a href=https://www.drupal.org/node/2869138 target=_blankthe following advisory/a explaining that the details would be made public in a month and that everyone should upgrade, as there was no fix available./p h2Migrate efficiently/h2 p class=text-align-justifyAt Dropsolid, we noticed that for many of our older Drupal 7 installs we were still using this module extensively. Migrating all of the affected sites would have meant a very lengthy undertaking, so I was curious to find a way to spend less time and effort while still fixing the problem. We immediately contacted one of the people who reported the security issue and tried to get more information other than what was publicly available. That person stayed true to the rules and did not disclose any information about the issue./p p class=text-align-justifyWe didn’t give up, but made an official request to the security team offering to help and requesting access to the security vulnerability issue. The Drupal security team reviewed the request and granted me access. In the Drupal Security issue queue there was some historical information about this vulnerability, some answers and a proposed patch. The patch had not been tested, but this is where Dropsolid chimed in. After extensively testing the patch on all the different scenarios on an actual site that was vulnerable, we marked the issue as Reviewed and Tested by the Community (RTBC) and stepped up maintain the emReferences /emmodule for future security issues./p h2It pays off to step in/h2 p class=text-align-justifyI’d like to thank a href=https://www.drupal.org/u/nielsaers target=_blankNiels Aers/a, one of my colleagues, as his involvement was critical in this journey and he is now the current maintainer of this module. He jumped straight in without hesitation. In the end, strongwe spent less time fixing the actual issue compared to the potential effort for changing all our sites to use a different module/strong. So remember: you can also make a similar impact to the Drupal community by stepping up when something like this happens. Do not freak out, but think how you can help your clients, company and career by fixing something for more than just you or your company./p /div /div

Pronovix: Documenting web APIs with the Swagger / OpenAPI specification in Drupal

Thu, 04/20/2017 - 10:19
pAs part of our work to make Drupal 8 the leading CMS for developer portals, we are implementing a mechanism to import the OpenAPI (formerly known as Swagger) specification format. This is a crucial feature not only for dedicated developer portals, but also for all Drupal sites that are exposing an API. Now that it has become much easier to create a RESTful API service in Drupal 8, the next step is to make it more straightforward to create its API reference documentation. That is why we think our work will be useful for site builders, and not just for technical writers and API product owners./p

marvil07.net: Re-activating Vote Up/Down

Thu, 04/20/2017 - 04:27
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpa href=https://www.drupal.org/project/vote_up_downVote Up/Down/a is a drupal module that uses a href=https://www.drupal.org/project/votingapiVoting API/a to provide a way to vote.br / These notes are about part of the history of the module, and the recent news about it, including a couple of releases!/p h3A long time ago.../h3 pThe project itself is really ancient, it started in 2006 by frjo, in Drupal 4.7, and the same code has evolved until Drupal 7.br / I took co-maintainership of the project around 2009-2010, when I met with lut4rp, at the time the one maintainer of the project; who made a rewrite to modularize it at the start of 6.x-2.x.br / At that time we were still using CVS officially (and some of us git locally), and we were thrilled to receive and integrate a href=https://www.drupal.org/node/615548a patch from merlinofchaos/a, that extended the module a lot, and make it more maintainable.br / With the past of the time, I became the only active maintainer of the module./p pAt the start I was pretty active as a maintainer there; but over the years, I have not been responsive enough, especially around the D7 port.br / During that time the community provided several patches and finally amitaibu created a sandbox, that I end up integrating into the project.br / Also, I managed to write another submodule, vud_field, in that process.br / For me it was clear, I a href=https://www.drupal.org/node/1295574advocated to remove vud_node, vud_term, and vud_comment form the project in favour of vud_field/a.br / From my perspective it was more beneficial: (a) vud_field provided mostly the same functionality on nodes, taxonomy terms, and comments; but also (b) provided voting on any entity, embracing D7 new APIs; and also (c) made things more maintainable.br / Sadly, the removal did not happened at that time, and that was one of the reasons why D7 version was never out of alpha status./p h3Recent news/h3 pAfter quite some time of inactivity in vote_up_down, this January, I started to port the module to D8, but I only started: only 4 porting commits got into the new 8.x-1.x branch./p pThen, I decided to add a GSoC project as student's suggestion to port Vote Up/Down to D8 for this year./p pIn preparation, this week I have branched out D7 into two different versions 7.x-1.x and 7.x-2.x, adding respective releases to make things more clear:/p ulliem7.x.1-x/em (with a href=https://www.drupal.org/project/vote_up_down/releases/7.x-1.0-beta17.x-1.0-beta1/a release): It still keeps all submodules, but it is not planned to be maintained for much longer anymore. I applied there all related code pending about vud_node, vud_comment, and vud_term./li liem7.x-2.x/em (with a href=https://www.drupal.org/project/vote_up_down/releases/7.x-2.07.x-2.0/a release): Instead, it only contains vud and vud_field, and it is planned to be maintained as the stable branch. Sadly there in not a complete upgrade path neither from 6.x-2.x nor from 7.x-1.x, but I a href=https://www.drupal.org/node/1363928added some starting code to do that on the related issue #1363928/a, and maybe someone would like to continue that./li /ulpHopefully one of the students proposing the port to Vote Up/Down to D8 gets accepted.br / It will be great to see the module active again!/p /div/div/divdiv class=field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above clearfixh3 class=field-labelEtiquetas: /h3ul class=linksli class=taxonomy-term-reference-0a href=/etiqueta/drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=drupal/a/lili class=taxonomy-term-reference-1a href=/etiqueta/development typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=development/a/lili class=taxonomy-term-reference-2a href=/etiqueta/drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=drupal-planet/a/li/ul/div

Mediacurrent: Debug Drupal PHP in Vim with Vdebug

Thu, 04/20/2017 - 00:51
img typeof=foaf:Image src=https://www.mediacurrent.com/sites/default/files/styles/thumb_blog_spotlight/public/drupal-bits-bytes.png?itok=RnuV7DHd width=200 height=152 alt=alt=”” title=Drupal bits and bytes / pI know quite a few developers that love Vim but think they have to use an IDE to be able to debug their applications. In this post I will show you how to set up Vim as a Xdebug client./p pThe a href=https://github.com/joonty/vdebugVdebug plugin/a for Vim provides a way to do debugging inside Vim using the tools that Vim provides to great advantage. As the project page says,/p p /p

Aten Design Group: Radios, Checkboxes, and Drupal’s Admin Interface

Thu, 04/20/2017 - 00:09
img src=https://atendesigngroup.com/sites/default/files/custom-inputs.png width=1000 height=600 alt= /pCustom styled form elements are a common thing to see in a design. That’s because default form styles vary visually from browser to browser and OS to OS. It makes sense that we’d want these elements styled consistently. Styling them is pretty straightforward, with the exception of span class=geshifiltercode class=text geshifilter-textselect/code/span dropdowns which can be more complex. Recently, I ran into an unexpected problem when working on a site that needed a branded admin experience./p h3Styling Radio and Checkbox Buttons/h3 pThere’s a simple method of styling radio buttons and checkboxes I’ve been using for a while. I first saw it from the people at a href=https://webdesign.tutsplus.com/articles/quick-tip-easy-css3-checkboxes-and-radio-buttons--webdesign-8953Tuts+/a, and they provided this a href=http://codepen.io/tutsplus/pen/bgqYJzPen demoing the technique/a. Briefly explained, we visually hide the span class=geshifiltercode class=text geshifilter-textinput/code/span for our radios/checkboxes and draw a new one using span class=geshifiltercode class=text geshifilter-text:before/code/span and span class=geshifiltercode class=text geshifilter-text:after/code/span pseudo elements on the span class=geshifiltercode class=text geshifilter-textlabel/code/span element. CSS’ span class=geshifiltercode class=text geshifilter-text:checked/code/span selector allows us to toggle our styles based on if the span class=geshifiltercode class=text geshifilter-textinput/code/span is checked or not. This technique relies on appropriately marked up span class=geshifiltercode class=text geshifilter-textinput/code/spans and span class=geshifiltercode class=text geshifilter-textlabel/code/spans, for example:/p div class=geshifilterpre class=geshifilter-textlt;div class=”form-element”gt; lt;input type=”checkbox” id=”click-me”gt; lt;label for=”click-me”gt;Click Melt;/labelgt; lt;/divgt;/pre/div pClicking the label (containing the fake checkbox styling) will toggle the state of the real checkbox that’s visually hidden./p h3Drupal’s Admin Interface/h3 pOne thing I learned while working with some of Drupal’s admin interfaces is that they only supply the span class=geshifiltercode class=text geshifilter-textinput/code/span, and not an accompanying span class=geshifiltercode class=text geshifilter-textlabel/code/span. This seemed especially true in tabled interfaces, where you’d check off rows of content and perform some action on the selected items. Since we’re hiding an span class=geshifiltercode class=text geshifilter-textinput/code/span that doesn’t have a span class=geshifiltercode class=text geshifilter-textlabel/code/span to attach the visuals to, we just end up with a blank space. There were several options we had for how to address this issue./p h41. Drop the Custom Styles/h4 pThe simplest is to just rely on browser defaults for checkboxes and radios. It’s not a great option, but it is an affordable one for tight budgets./p h42. Create the Missing Labels/h4 pThis ended up being my first approach to fixing this, and became more akin to a game of Whack-a-Mole than I anticipated. After going through various preprocess functions, alters, and render functions I was still encountering inputs that were missing labels. Some I was never able to fully track down where the markup was coming from. Manually finding and fixing every missing label might be a viable solution if your website or application has only a handful of places you need to update. However this is not the most scalable solution, and if your product grows this can quickly become a financial black hole./p h43. Create the Missing Labels… with Javascript/h4 pInstead of trying to find every place that creates a checkbox or radio on the server side, we could use Javascript to target every checkbox or radio input that is not followed by a label. From there, we just create the label element and insert it after the selected inputs. a href=http://codepen.io/jnettik/pen/wJbQYVThis is how that might look using jQuery/a, though it can also be done with Vanilla JS./p pThis is great, as it solves the problem for every input in one fell swoop. One downside here is the Javascript dependency. Should your Javascript not run for any reason, you’re still left with the original problem of missing inputs. Another is page rendering. User’s might be left with a janky experience as Javascript inserts these elements into the DOM./p h44. Drop the Custom Styles… for Older Browsers/h4 pIn the end, a href=http://codepen.io/jnettik/pen/mWYGeZ?editors=1100#0this was the solution that won out/a. Using a href=https://developer.mozilla.org/en-US/docs/Web/CSS/@supportsCSS Feature Queries/a and a href=https://developer.mozilla.org/en-US/docs/Web/CSS/appearanceCSS’ span class=geshifiltercode class=text geshifilter-textappearance/code/span property/a, we’re able to provide styled inputs for most modern browsers and then fall back to default styles in browsers that lack the support we need. This gives us our custom styles, without the scaling problem of #2, and the Javascript dependency of #3. The downside to this solution is that all versions of Internet Explorer and Firefox will use their browser defaults./p pFirefox was a surprise to me, as the documentation says it supports span class=geshifiltercode class=text geshifilter-textappearance/code/span. However in practice what I got was a less appealing version of the browser default styles. Also surprisingly was by checking for only span class=geshifiltercode class=text geshifilter-text-webkit-appearance/code/span support, Edge still gets our custom styles applied. This all sat well with me for a working solution. Every team and project has it’s own constraints, so your mileage may vary./p

Aten Design Group: Migrating Wordpress into Drupal 8

Wed, 04/19/2017 - 21:17
img src=https://atendesigngroup.com/sites/default/files/wordpress-to-drupal-8-migration.png width=1000 height=600 alt= /pQuite a bit has changed for the Migrate module in Drupal 8: the primary module is part of core and some of the tools have been split into their own modules. Recently, we migrated a Wordpress site into Drupal 8 and this article will help guide you in that process. If you’re looking for information about a href=https://atendesigngroup.com/blog/painlessly-migrate-wordpress-drupalWordpress to Drupal 7 migrations/a, check out Joel Steidl’s article on that a href=https://atendesigngroup.com/blog/painlessly-migrate-wordpress-drupalhere/a./p pAt the time of writing this post, the migration modules are considered experimental so be aware of that as well. The module's location in core also means that all Drupal core modules also have migration-related code to help out with your Drupal upgrades. We used the a href=https://www.drupal.org/project/wp_migrateWP Migrate module/a (Migrate Wordpress) as a starting point in bringing this content to Drupal./p pThis module will give you a good basis for migration, but it is missing a few things that you might want to consider:/p ul liIt will create all vocabularies and taxonomies based on what is in Wordpress but you will need to add some code to connect the taxonomies with posts./li liAlso, it will not bring in featured images./li liWP content might be using the line break to paragraphs functionality, which you need to account for either in your text format for posts or in the migration./li /ul pAnd if you are looking for information about a href=https://atendesigngroup.com/blog/painlessly-migrate-wordpress-drupalWordpress to Drupal 7 migrations/a, check out Joel Steidl's article on that a href=https://atendesigngroup.com/blog/painlessly-migrate-wordpress-drupalhere/a./p h2Taxonomy/h2 pThere's code existing to pull in Wordpress's terms and vocabularies, but you will need to do some work to put them into the right fields with your posts. For this, I ended up taking a more efficient route by querying the source database in prepareRow():/p div class=geshifilterpre class=geshifilter-phpspan style=color: #000000; font-weight: bold;lt;?php/span nbsp; span style=color: #808080; font-style: italic;// place in Posts.php prepareRow()/span nbsp; span style=color: #808080; font-style: italic;// get terms for this blog post/span span style=color: #0000ff;$tags/span = span style=color: #0000ff;$this/span-gt;span style=color: #006600;select/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_term_relationships'/span, span style=color: #ff0000;'r'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;join/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_term_taxonomy'/span, span style=color: #ff0000;'t'/span, span style=color: #ff0000;'t.term_taxonomy_id=r.term_taxonomy_id'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;fields/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'r'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'t.taxonomy'/span, span style=color: #ff0000;'tags'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'object_id'/span, span style=color: #0000ff;$row/span-gt;span style=color: #006600;getSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'id'/spanspan style=color: #66cc66;#41;/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;execute/spanspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$tags/span = span style=color: #0000ff;$tags/span-gt;span style=color: #006600;fetchAll/spanspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$tags/span = a href=http://www.php.net/array_mapspan style=color: #000066;array_map/span/aspan style=color: #66cc66;#40;/spanspan style=color: #000000; font-weight: bold;function/spanspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$tag/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span a href=http://www.php.net/intvalspan style=color: #000066;intval/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$tag/spanspan style=color: #66cc66;#91;/spanspan style=color: #ff0000;'term_taxonomy_id'/spanspan style=color: #66cc66;#93;/spanspan style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span, span style=color: #0000ff;$tags/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$row/span-gt;span style=color: #006600;setSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'tags'/span, span style=color: #0000ff;$tags/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #808080; font-style: italic;// get categories for this blog post/span span style=color: #0000ff;$category/span = span style=color: #0000ff;$this/span-gt;span style=color: #006600;select/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_term_relationships'/span, span style=color: #ff0000;'r'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;join/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_term_taxonomy'/span, span style=color: #ff0000;'t'/span, span style=color: #ff0000;'t.term_taxonomy_id=r.term_taxonomy_id'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;fields/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'r'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'t.taxonomy'/span, span style=color: #ff0000;'category'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'object_id'/span, span style=color: #0000ff;$row/span-gt;span style=color: #006600;getSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'id'/spanspan style=color: #66cc66;#41;/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;execute/spanspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$category/span = span style=color: #0000ff;$category/span-gt;span style=color: #006600;fetchAll/spanspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$category/span = a href=http://www.php.net/array_mapspan style=color: #000066;array_map/span/aspan style=color: #66cc66;#40;/spanspan style=color: #000000; font-weight: bold;function/spanspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$tag/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span a href=http://www.php.net/intvalspan style=color: #000066;intval/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$tag/spanspan style=color: #66cc66;#91;/spanspan style=color: #ff0000;'term_taxonomy_id'/spanspan style=color: #66cc66;#93;/spanspan style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span, span style=color: #0000ff;$category/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$row/span-gt;span style=color: #006600;setSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'categories'/span, span style=color: #0000ff;$category/spanspan style=color: #66cc66;#41;/span;/pre/div pAnd then I updated the migration template with those new values:/p div class=geshifilterpre class=geshifilter-text# add to the process section field_tags: tags field_category: tags/pre/div h3Featured Images/h3 pWordpress stores featured images as attachment posts and stores the relationship in the postmeta table. To bring these in as image fields, we need to make file entities in Drupal which means configuring a new migration./p pFirst, create a migration template called wp_feature_images.yml. Note that I stole some of this from Drupal's core file module:/p div class=geshifilterpre class=geshifilter-textid: wp_feature_images label: Wordpress Feature Images migration_tags: - Wordpress migration_group: wordpress source: plugin: feature_images destination: plugin: entity:file process: filename: filename uri: uri status: plugin: default_value default_value: 1 # migration_dependencies: # required: # - wp_users/pre/div pAnd then create a source plugin:/p div class=geshifilterpre class=geshifilter-phpspan style=color: #000000; font-weight: bold;lt;?php/span span style=color: #808080; font-style: italic;/** * @file * Contains \Drupal\migrate_wordpress\Plugin\migrate\source\FeatureImages. *//span nbsp; namespace Drupal\migrate_wordpress\Plugin\migrate\source; nbsp; use Drupal\migrate\Row; use Drupal\migrate\Plugin\migrate\source\SqlBase; use Drupal\Core\a href=http://www.php.net/filespan style=color: #000066;File/span/a\FileSystemInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\Core\State\StateInterface; nbsp; span style=color: #808080; font-style: italic;/** * Extract feature images from Wordpress database. * * @MigrateSource( * id = quot;feature_imagesquot; * ) *//span span style=color: #000000; font-weight: bold;class/span FeatureImages span style=color: #000000; font-weight: bold;extends/span SqlBase span style=color: #66cc66;#123;/span nbsp; span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span __constructspan style=color: #66cc66;#40;/spana href=http://www.php.net/arrayspan style=color: #000066;array/span/a span style=color: #0000ff;$configuration/span, span style=color: #0000ff;$plugin_id/span, span style=color: #0000ff;$plugin_definition/span, MigrationInterface span style=color: #0000ff;$migration/span, StateInterface span style=color: #0000ff;$state/span, FileSystemInterface span style=color: #0000ff;$file_system/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span parent::__constructspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$configuration/span, span style=color: #0000ff;$plugin_id/span, span style=color: #0000ff;$plugin_definition/span, span style=color: #0000ff;$migration/span, span style=color: #0000ff;$state/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$this/span-gt;span style=color: #006600;fileSystem/span = span style=color: #0000ff;$file_system/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span a href=http://www.php.net/staticspan style=color: #000066;static/span/a span style=color: #000000; font-weight: bold;function/span createspan style=color: #66cc66;#40;/spanContainerInterface span style=color: #0000ff;$container/span, a href=http://www.php.net/arrayspan style=color: #000066;array/span/a span style=color: #0000ff;$configuration/span, span style=color: #0000ff;$plugin_id/span, span style=color: #0000ff;$plugin_definition/span, MigrationInterface span style=color: #0000ff;$migration/span = span style=color: #000000; font-weight: bold;NULL/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span span style=color: #000000; font-weight: bold;new/span a href=http://www.php.net/staticspan style=color: #000066;static/span/aspan style=color: #66cc66;#40;/span span style=color: #0000ff;$configuration/span, span style=color: #0000ff;$plugin_id/span, span style=color: #0000ff;$plugin_definition/span, span style=color: #0000ff;$migration/span, span style=color: #0000ff;$container/span-gt;span style=color: #006600;get/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'state'/spanspan style=color: #66cc66;#41;/span, span style=color: #0000ff;$container/span-gt;span style=color: #006600;get/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'file_system'/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span queryspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$query/span = span style=color: #0000ff;$this/span -gt;span style=color: #006600;select/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_postmeta'/span, span style=color: #ff0000;'m'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;fields/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'p'/span, span style=color: #66cc66;#91;/spanspan style=color: #ff0000;'ID'/span, span style=color: #ff0000;'guid'/spanspan style=color: #66cc66;#93;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$query/span-gt;span style=color: #006600;join/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'wp_posts'/span, span style=color: #ff0000;'p'/span, span style=color: #ff0000;'p.ID=m.meta_value'/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$query/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'m.meta_key'/span, span style=color: #ff0000;'_thumbnail_id'/span, span style=color: #ff0000;'='/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'p.post_type'/span, span style=color: #ff0000;'attachment'/span, span style=color: #ff0000;'='/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;condition/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'p.guid'/span, span style=color: #ff0000;''/span, span style=color: #ff0000;'lt;gt;'/spanspan style=color: #66cc66;#41;/span span style=color: #808080; font-style: italic;// this prevents some duplicates to get the count closer to even/span -gt;span style=color: #006600;groupBy/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'ID, guid'/spanspan style=color: #66cc66;#41;/span; span style=color: #b1b100;return/span span style=color: #0000ff;$query/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span fieldsspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$fields/span = a href=http://www.php.net/arrayspan style=color: #000066;array/span/aspan style=color: #66cc66;#40;/span span style=color: #ff0000;'ID'/span =gt; span style=color: #0000ff;$this/span-gt;span style=color: #006600;t/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'The file ID.'/spanspan style=color: #66cc66;#41;/span, span style=color: #ff0000;'guid'/span =gt; span style=color: #0000ff;$this/span-gt;span style=color: #006600;t/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'The file path'/spanspan style=color: #66cc66;#41;/span, span style=color: #66cc66;#41;/span; span style=color: #b1b100;return/span span style=color: #0000ff;$fields/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span prepareRowspan style=color: #66cc66;#40;/spanRow span style=color: #0000ff;$row/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$url/span = span style=color: #0000ff;$row/span-gt;span style=color: #006600;getSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'guid'/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$parsed_url/span = a href=http://www.php.net/parse_urlspan style=color: #000066;parse_url/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$url/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$filename/span = a href=http://www.php.net/basenamespan style=color: #000066;basename/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$parsed_url/spanspan style=color: #66cc66;#91;/spanspan style=color: #ff0000;'path'/spanspan style=color: #66cc66;#93;/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$row/span-gt;span style=color: #006600;setSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'filename'/span, span style=color: #0000ff;$filename/spanspan style=color: #66cc66;#41;/span; span style=color: #0000ff;$public_path/span = span style=color: #ff0000;'public://'/span . span style=color: #0000ff;$parsed_url/spanspan style=color: #66cc66;#91;/spanspan style=color: #ff0000;'path'/spanspan style=color: #66cc66;#93;/span; span style=color: #0000ff;$row/span-gt;span style=color: #006600;setSourceProperty/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'uri'/span, span style=color: #0000ff;$public_path/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #808080; font-style: italic;// download the file if it does not exist/span span style=color: #b1b100;if/span span style=color: #66cc66;#40;/span!a href=http://www.php.net/file_existsspan style=color: #000066;file_exists/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$public_path/spanspan style=color: #66cc66;#41;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$public_dirname/span = a href=http://www.php.net/dirnamespan style=color: #000066;dirname/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$public_path/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #808080; font-style: italic;// create directories if necessary/span span style=color: #b1b100;if/span span style=color: #66cc66;#40;/span!a href=http://www.php.net/file_existsspan style=color: #000066;file_exists/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$public_dirname/spanspan style=color: #66cc66;#41;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$this/span-gt;span style=color: #006600;fileSystem/span-gt;span style=color: #006600;mkdir/spanspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$public_dirname/span, span style=color: #cc66cc;0775/span, span style=color: #000000; font-weight: bold;TRUE/spanspan style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;// try to download it/span span style=color: #0000ff;$copied/span = @a href=http://www.php.net/copyspan style=color: #000066;copy/span/aspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$url/span, span style=color: #0000ff;$public_path/spanspan style=color: #66cc66;#41;/span; span style=color: #b1b100;if/span span style=color: #66cc66;#40;/span!span style=color: #0000ff;$copied/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span span style=color: #000000; font-weight: bold;FALSE/span; span style=color: #66cc66;#125;/span span style=color: #66cc66;#125;/span span style=color: #b1b100;return/span parent::span style=color: #006600;prepareRow/spanspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$row/spanspan style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span bundleMigrationRequiredspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span span style=color: #000000; font-weight: bold;FALSE/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span getIdsspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span a href=http://www.php.net/arrayspan style=color: #000066;array/span/aspan style=color: #66cc66;#40;/span span style=color: #ff0000;'ID'/span =gt; a href=http://www.php.net/arrayspan style=color: #000066;array/span/aspan style=color: #66cc66;#40;/span span style=color: #ff0000;'type'/span =gt; span style=color: #ff0000;'integer'/span, span style=color: #ff0000;'alias'/span =gt; span style=color: #ff0000;'p'/span, span style=color: #66cc66;#41;/span, span style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #66cc66;#125;/span/pre/div pIn Migrate, the template defines what source, processing, and fields are created. The source plugin is used by that migration to allow you to specify what is created. The source plugin above will get the feature images for posts, but also try and download the image into Drupal's files directory./p pYou can add this as a dependency for the wp_posts migration. A word of warning though: if one migration (emMigration A/em) depends on a different migration (emMigration B/em), all of the content from emA/em must be migrated before emB/em can be run. If there are images that cannot be resolved for some reason (maybe leftover DB references after an image or post is deleted), this might stop the migration because the dependency cannot be resolved./p pAnd finally, you will also need to add wp_feature_images to your manifest_wordpress.yml before running the migration./p h3Converting content/h3 pSo far we have updated migration source plugins, but there are also process plugins, which can be used to change row values. As mentioned, the WP content often uses the emautop/em filter to create paragraph/line breaks automatically so we need to change those to HTML for Drupal. (You can also just use this functionality in your text format and skip this step if having this on will not cause issues with other content)/p pFirst, create a src/Plugin/migrate/process directory if one does not exist in the module and add this processor:/p div class=geshifilterpre class=geshifilter-phpspan style=color: #000000; font-weight: bold;lt;?php/span nbsp; namespace Drupal\migrate_wordpress\Plugin\migrate\process; nbsp; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; nbsp; span style=color: #808080; font-style: italic;/** * Apply the automatic paragraph filter to content * * @MigrateProcessPlugin( * id = quot;wp_contentquot; * ) *//span span style=color: #000000; font-weight: bold;class/span WpContent span style=color: #000000; font-weight: bold;extends/span ProcessPluginBase span style=color: #66cc66;#123;/span nbsp; span style=color: #808080; font-style: italic;/** * {@inheritdoc} * * Split the 'administer nodes' permission from 'access content overview'. *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span transformspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$value/span, MigrateExecutableInterface span style=color: #0000ff;$migrate_executable/span, Row span style=color: #0000ff;$row/span, span style=color: #0000ff;$destination_property/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #b1b100;return/span _filter_autopspan style=color: #66cc66;#40;/spanspan style=color: #0000ff;$value/spanspan style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #66cc66;#125;/span/pre/div pThen, update the process section of wp_posts.yml to include this processor:/p div class=geshifilterpre class=geshifilter-text'body/value': plugin: wp_content source: post_content/pre/div pAll of this should put you on the road to getting Wordpress content migrated into a Drupal 8 site, although you’ll probably have to adjust code to your specific circumstances along the way./p

Acquia Developer Center Blog: Acquia in action at DrupalCon Baltimore!

Wed, 04/19/2017 - 18:01
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/team_acquia_at_drupalcon_asia.jpg?itok=1WIAjKaJ width=140 height=85 alt=Acquia#039;s team at DrupalCon Asia Mumbai title=Acquia#039;s team at DrupalCon Asia Mumbai //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:encodedpIf you’re coming to DrupalCon Baltimore and you’re curious about Acquia, there are a couple of ways to meet the company and see what we’re about beyond the marketing and sales efforts that get directed at potential clients. One great way is to come to our sessions!/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

ThinkShout: Meet the ThinkShout Team at DrupalCon Baltimore

Wed, 04/19/2017 - 18:00
pWe’re packing our bags for Baltimore and polishing up our slide decks for DrupalCon! We’re so excited to join the Drupal community for a full week of Drupal-y things. We’ve got some great content planned for this year’s conference, and we’re very excited to share it with you all - here’s what you need to know:/p h2 id=exhibit-hallExhibit Hall/h2 pThe ThinkShout Headquarters this year is strongbooth 432/strong! We’ll be giving away free t-shirts and raffling off an Amazon Echo. You can enter to win for the low, low price of one business card. If you have any questions about a href=https://thinkshout.com/work/our work/a, current available a href=https://thinkshout.com/careers/job opportunities/a, or what the a href=https://isitraining.in/Portlandweather’s like in Portland/a (spoiler: it’s probably raining), stop by - we’d love to chat with you!/p h2 id=thinkshout-sessionsThinkShout Sessions/h2 pThe ThinkShout team has two sessions in the DrupalCon agenda this year. We’re also very excited to be leading a discussion in our first DrupalCon Nonprofit Summit. Take a look at our lineup and mark your calendars/p p“a href=https://events.drupal.org/baltimore2017/nonprofit-summitRapid Response Campaigns amp; Digital Tools/a” - Monday (4/24), 12:30 - 1:15pm, Nonprofit Summit/p pThe news cycle doesn’t stop, and your website must help you respond to emergencies, not act as a barrier. Drupal can help you react quickly, in concert with your other channels, to turn current events into opportunities to spread your message and further your mission. In this breakout session, Brett Meyer and Lev Tsypin will talk about the tools you have at your disposal in Drupal, scenarios that call for rapid response solutions and how to implement them, and strategies that will help you turn these situations into lasting engagement with your constituents./p p“a href=https://events.drupal.org/baltimore2017/sessions/demystifying-rendered-content-drupal-8-twig-filesDemystifying Rendered Content in Drupal 8 Twig Files/a” - Tuesday (4/25), 3:45 - 4:45pm/p pAmy Vaillancourt-Sals is going to show you the ins and outs of Twig! a href=http://twig.sensiolabs.org/Twig/a is a robust and elegant template engine for PHP. It’s lightweight, fairly quick to pick up, very readable, and it grants users ultimate control over the markup, including wrapping elements and rendering exactly the output you need. In this session, you’ll learn about the debugging process of sorting through twig variables, using xdebug in PHPStorm, the other helpful debugging tools at your disposal, plus common patterns Amy found helpful for rendering content in twig files./p p“a href=https://events.drupal.org/baltimore2017/sessions/content-strategy-popular-culture-part-deuxContent Strategy in Popular Culture, Part Deux/a” - Thursday (4/27), 10:45 - 11:45am/p pBrett Meyer’s got a sequel to a href=https://www.youtube.com/watch?v=sJxtCPRde4khis session from DrupalCon New Orleans/a. Another year, another array of pop culture obsessions to examine and apply to the work we do. By exploring how crucial aspects of content strategy play out in movies, music, comic books, and video games, we’ll continue to expand the palette of language we can use to explain and convince more people about the importance of content strategy online, and ensure they understand that it’s not just vital, but fun as well./p h2 id=lets-chatLet’s Chat/h2 pIf you’d like to schedule some time to chat with us in advance, drop us a line via our a href=https://thinkshout.com/contact/contact form/a. We’d be happy to meet up with you in Baltimore!/p

Lullabot: Cross-Pollination between Drupal and WordPress

Wed, 04/19/2017 - 17:27
div class=rich-textdiv class=rich-text__contentpWordPress controls a whopping 27% of the CMS market share on the web. Although it grew out of a blogging platform, it can now can handle advanced functionality similar to Drupal and is a major (yet friendly) competitor to Drupal. Like Drupal, it#x2019;s open source and has an amazing community. Both communities learn from each other, but there is still much more to share between the two platforms./p pRecently I had the opportunity to speak at a href=https://2017.miami.wordcamp.org/WordCamp Miami/a on the topic of Drupal. WordCamp Miami is one of the larger WordCamps in the world, with a sold-out attendance of approximately 800 people./p /divdiv class=rich-text__embedundefined/divdiv class=rich-text__content h2What makes Drupal so great?/h2 pDrupal commands somewhere in the neighborhood of 2% of the CMS market share of the web. It makes complex data models easy, and much of this can be accomplished through the user interface. It has very robust APIs and enables modules to share one another#x2019;s APIs. Taken together, you can develop very complex functionality with little to no custom code./p h2So, what can WordPress take away from Drupal?/h2 h3Developer Experience: More and better APIs included in WordPress Core/h3 pThe WordPress plugin ecosystem could dramatically benefit from standardizing API#x2019;s in core./p ulliSomething analogous to Drupal#x2019;s a href=https://www.drupal.org/docs/8/api/render-apiRender API/a and a href=https://www.drupal.org/docs/8/api/form-apiForm API/a would make it possible for WordPress plugins to standardize and integrate their markup, which in turn would allow plugins to work together without stepping on each other#x2019;s toes./li liWordPress could benefit from a way to create a custom post type in the core UI. Drupal has this functionality out the the box. WordPress has the functionality available, but only to the developer.#xA0;This results in WordPress site builders searching for very specific plugins that create a specific post type, and hoping it does what they want./li liWordPress already has plugins similar to Drupal#x2019;s Field API. Plugins such as a href=https://www.advancedcustomfields.com/Advanced Custom Fields/a and a href=https://wordpress.org/plugins/cmb2/CMB2/a go along way to allowing WordPress developers to easily create custom fields. Integrating something similar to this into WordPress core would allow plugin developers to count on a stable API and easily extend it./li liAn API for plugins to set dependencies on other plugins is something that Drupal has done since its beginning. It enables mini-ecosystems to develop that extend more complex modules. In Drupal, we see a module ecosystems built around Views, Fields, Commerce, Organic Groups, and more. WordPress would benefit greatly from this./li liA go-to solution for custom query/list building would be wonderful for WordPress. Drupal has a href=https://www.drupal.org/docs/8/core/modules/views/overviewViews/a, but WordPress does not, so site builders end up using plugins that create very specific queries with output according to a very specific need. When a user needs to make a list of #x201C;popular posts,#x201D; they end up looking through multiple plugins dedicated to this single task./li /ul pA potential issue with including new APIs in WordPress core is that it could possibly break WordPress#x2019; a href=https://make.wordpress.org/core/handbook/about/release-cycle/version-numbering/commitment to backwards compatibility/a, and would also dramatically affect their plugin ecosystem (much of this functionality is for sale right now)./p h3WordPress Security Improvements/h3 pWordPress has a much-maligned security reputation. Because it commands a significant portion of the web, it#x2019;s a large attack vector. WordPress sites are also frequently set up by non-technical users, who don#x2019;t have the experience to keep it (and all of its plugins) updated, and/or lock down the site properly./p pThat being said, WordPress has some low-hanging fruit that would go a long way to help the platform#x2019;s reputation./p ulliBrute force password protection (flood control) would prevent bots from repeatedly connecting to wp-login.php. How often do you see attempted connections to wp-login.php in your#xA0;server logs?./li liRaise the minimum supported PHP version from 5.2 (a href=http://php.net/supported-versions.phpwhich does not receive security updates/a). Various WordPress plugins are already doing this, and there#x2019;s also talk about a href=https://wptavern.com/wordpress-to-bump-recommended-php-version-from-5-6-to-7-0-by-the-middle-of-2017changing the #x2018;recommended#x2019; version of PHP to 7.0/a./li liAn official public mailing list for all WordPress core and plugin vulnerabilities would be an easy way to alert developers to potential security issues.#xA0;Note that there are third-party vendors that#xA0;offer mailing lists like this./li /ul h2Why is WordPress#x2019; market share so large?/h2 pEasy: It can be set up and operated by non-developers#x2014;and there are a lot more non-developers than developers!#xA0;Installing both Drupal and WordPress is dead simple, but once you#x2019;re up and running, WordPress becomes much easier./p h3Case in Point: Changing Your Siteapos;s Appearance/h3 pChanging what your site looks like is often the first thing that a new owner will want to do. With WordPress, you go to Appearance gt; Themes gt; Add New, and can easily browse themes from within your admin UI. To enable the theme, click Install, then click Activate./p /divdiv class=rich-text__embedundefined/divdiv class=rich-text__content pWith Drupal, you go to Appearance, but you only see core themes that are installed. If you happen to look at the top text, you read in small text that quot;alternative themes are available.quot; Below that there is a button to #x201C;Install a New Theme.#x201D;/p /divdiv class=rich-text__embedundefined/divdiv class=rich-text__content pClicking the button takes you to a page where you can either 1) paste in a URL to the tarball/zip, or upload a downloaded tarball/zip. You still have to know how to to download the zip or tarball, and where to extract it, and then browse to appearance, and enable the theme./p pSo it goes with Drupal. The same process goes with modules and more. Drupal makes things much more difficult.#xA0;/p h2So, what can Drupal#xA0;learn from WordPress?/h2 pTo continue to grow, Drupal needs to enable non-developers. New non-developers can eventually turn into developers, and will become #x201C;new blood#x201D; in the community. Here#x2019;s how Drupal can do it:/p ulliA built in theme and module browser would do wonders for enabling users to discover new functionality and ways to change their site#x2019;s appearance. A working attempt at this is the a href=https://www.drupal.org/project/project_browserProject Browser/a module (available only for Drupal 7). The catch 22 of this is that you have to download this the old-fashioned way in order to use it./li liThe ability to download vetted install profiles during the Drupal installation process would be amazing. This would go a long way to enable the #x201C;casual explorers,quot;#xA0;and show them the power of Drupal. A discussion of this can be found a href=https://www.drupal.org/node/2818085here/a./li liAutomatic security updates is a feature that would be used by many smaller sites. Projects have been steered toward WordPress specifically because smaller clients don#x2019;t have the budget to pay developers to keep up with updates. This feature has been a href=https://www.drupal.org/node/2367319#comment-11419457conceptually signed off on/a by Drupal#x2019;s core committers, but significant work has yet to be done./li /ul h3Mitigating Security Risks/h3 pThe downside for this functionality is that Drupal would need to have a writable file-system, which at it#x2019;s core, is less secure. Whether#xA0;that balances out with automatic updates is debatable./p pAutomatic security updates and theme/module installation would not have to be enabled out of the box. The functionality could be provided in core modules that could be enabled only when needed./p h2What has Drupal already learned from WordPress?/h2 pCross-pollination has already been happening for a while. Let#x2019;s take a look at what the Drupal community has already, or is in the process of, implementing:/p ullia href=https://www.drupal.org/core/release-cycle-overviewSemantic versioning/a is one of the most important changes in Drupal 8. With semantic versioning, bug fixes and new features can be added at a regular cadence. Prior to this, Drupal developers had to wait a few years for the next major version. WordPress has been doing this for a long time./li liA better authoring experience is something that Drupal has been working on for years (remember when there was no admin theme?). With Drupal 8, the default authoring experience is finally on par with WordPress and even surpasses it in many areas./li liMedia management#xA0;is the ability to upload images and video, and easily reference them from multiple pieces of content. There#x2019;s currently a a href=https://www.drupal.org/node/2786785media initiative/a to finally put this functionality in core./li liEasier major version upgrades is something that WordPress has been doing since it#x2019;s inception./li /ul pDrupal has traditionally required significant development work in between major versions. That however, is changing. In a a href=http://buytaert.net/making-drupal-upgrades-easy-foreverrecent blog post/a, the lead of the Drupal project, Dries Buytaert said,/p div class=quote quote--highlightblockquote class=quote__quotediv class=quote__contentUpdating from Drupal 8apos;s latest version to Drupal 9.0.0 should be as easy as updating between minor versions of Drupal 8./div/blockquote/div pThis is a very big deal, as it drastically limits the technical debt of Drupal as new versions of Drupal appear./p h2Conclusion/h2 pDrupal and WordPress have extremely intelligent people contributing to their respective platforms. And, because of the GPL, both platforms have the opportunity to use vetted and proven approaches that are shortcuts to increased usability and usage. This, in turn, can lead to a more open (and usable) web./p pSpecial thanks to a href=http://www.daggerhart.com/Jonathan Daggerhart/a, a href=https://medium.com/@johntucker_48673John Tucker/a,#xA0;a href=/about/matthew-tiftMatthew Tift/a, and a href=/about/juampy-nrJuampy NR/a for reviewing and contributing to this article./p /divdiv class=rich-text__embedundefined/divdiv class=rich-text__content /div/div

Valuebound: How to create custom Form with CRUD(Create, Delete, Update) operations in Drupal 8

Wed, 04/19/2017 - 16:38
pCustom form with CRUD Operations is basically building the form with different fields like UID, Name, Mobile Number, Address, Email id etc. The CRUD operations for these fields is Deleting the value of the fields from the database or updating the existing value with new value, and printing the updated value. /p h3How To Create a Custom form with CRUD Operations?/h3 pTo create a a href=http://valuebound.com/resources/blog/step-by-step-method-to-create-a-custom-form-in-drupal-8custom form/a with CRUD Operations, we need to follow the following folder structure as shown in the image. To perform the same operation of crud in drupal we need to follow the following folder structure./p p…/p

Chromatic: Chromatic at DrupalCon Baltimore

Wed, 04/19/2017 - 15:00
img src=http://chromatichq.com/sites/default/files/social-media/articles/article-chromatic-drupalcon-baltimore.jpg /pAll the ways Chromatic will be representing at DrupalCon Baltimore next week./p

Dave Hall Consulting: Drupal, We Need To Talk

Wed, 04/19/2017 - 14:00
pDrupal has a problem. No, a href=https://www.garfieldtech.com/blog/tmi-outing rel=nofollownot/a a href=http://buytaert.net/living-our-values rel=nofollowthat/a aproblem/a./p pWe live in a post peak Drupal world. Drupal peaked some time during the Drupal 8 development cycle. I’ve had conversations with quite a few people who feel that we’ve lost momentum. a href=https://www.drupal.org/association/drupalcon/locations rel=nofollowDrupalCon attendances peaked in 2014/a, a href=https://trends.google.com/trends/explore?date=allamp;q=drupal rel=nofollowGoogle search impressions haven’t returned to their 2009 level/a, a href=https://www.drupal.org/project/usage/drupal rel=nofollowcore downloads have trended down since 2015/a. We need to accept this and talk about what it means for the future of Drupal./p pTechnically Drupal 8 is impressive. Unfortunately the uptake has been very slow. A factor in this slow uptake is that from a developer's perspective, Drupal 8 is a new application. The upgrade path from Drupal 7 to 8 is another factor./p pIn the five years Drupal 8 was being developed there was a fundamental shift in software architecture. During this time we witnessed the rise of microservices. Drupal is a monolithic application that tries to do everything. Don't worry this isn't trying to rekindle the a href=https://developmentseed.org/blog/2009/oct/28/smallcore-manifesto-help-us-build-better-teddy-bear/ rel=nofollowsmallcore debate from last decade/a./p pToday it is more common to see an application that is built using a handful of Laravel micro services, a couple of golang services and one built with nodejs. These applications often have multiple frontends; web (react, vuejs etc), mobile apps and an API. This is more effort to build out, but it likely to be less effort maintaining it long term./p pI have heard so many excuses for why Drupal 8 adoption is so slow. After a year I think it is safe to say the community is in denial. Drupal 8 won't be as popular as D7./p pWhy isn't this being talked about publicly? Is it because there is a commercial interest in perpetuating the myth? Are the businesses built on offering Drupal services worried about scaring away customers? Adobe, Sitecore and others would point to such blog posts to attack Drupal. Sure, admitting we have a problem could cause some short term pain. But if we don't have the conversation we will go the way of Joomla; an irrelevant product that continues its slow decline./p pDrupal needs to decide what is its future. The community is full of smart people, we should be talking about the future. This needs to be a public conversation, not something that is discussed in small groups in dark corners./p pI don't think we will ever see Drupal become a collection of microservices, but I do think we need to become more modular. It is time for Drupal to pivot. I think we need to cut features and decouple the components. I think it is time for us to get back to our roots, but modernise at the same time./p pDrupal has always been a content management system. It does not need to be a content delivery system. This goes beyond Decoupled (Headless) Drupal. Drupal should become a content hub with pluggable workflows for creating and managing that content./p pWe should adopt the unix approach, do one thing and do it well. This approach would allow Drupal to be just another service that compliments the application. /ppWhat do you think is needed to arrest the decline of Drupal? What should Drupal 9 look like? Let's have the conversation./p

Code Positive: Why Drupal?

Wed, 04/19/2017 - 12:13
img src=http://www.codepositive.com/sites/default/files/styles/rss_banner/public/2017-04/whistle-924346_1920.jpg?itok=prTCkqwh width=940 height=230 alt=Drupal - bells, whistles.....and maybe bagpipes! title=Drupal - bells, whistles.....and maybe bagpipes! typeof=Image class=image-style-rss-banner /hr /pDrupal is more than a pretty face - it's safe as houses, lets you fit in, and offers bells, whistles.....and maybe bagpipes!/p hr /p /p p /p

Agiledrop.com Blog: AGILEDROP: Adding another DrupalCon to the list

Wed, 04/19/2017 - 09:47
a href=http://www.agiledrop.com/blog/adding-another-drupalcon-listimg src=https://www.agiledrop.com/sites/default/files/2017-04/drupal%20con%20baltimore%202.jpg //a Last week we promised that from now on, we'll be more informative about where you will be able to find us. Therefore, Web Camp was our first described destination. That event is a local thing for us since our headquarters are in Ljubljana, Slovenia. Now, we are proud to say that after Web Camp we are heading towards DrupalCon Baltimore! DrupalCon is organized by Drupal Association three times a year at three different locations. Next week, from 24th to 28th April it's time for the United States to shine. The biggest Drupal event, which brings together thousands of people from all around the… a href=http://www.agiledrop.com/blog/adding-another-drupalcon-listREAD MORE/a

Gábor Hojtsy: Diversity by example

Wed, 04/19/2017 - 09:33
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenp(Disclaimer: Dries did not ask/order/suggest/request me to post this neither to make any changes whatsoever.)/p/div/div/div

Paul Johnson: Dear Drupalists I need your help

Wed, 04/19/2017 - 00:02
div class=field field-name-field-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image src=http://www.pauldjohnson.co.uk/sites/pauldjohnson.co.uk/files/styles/600/public/1%2A3JhrSgj2s4kqc50aom-fWA.jpeg?itok=3NMTi6yg width=690 height=179 alt= //div/div/divdiv class=field field-name-field-category field-type-taxonomy-term-reference field-label-inline clearfixh3 class=field-labelCategory: /h3ul class=links inlineli class=taxonomy-term-reference-0a href=/blog/beyondacyclist typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=BeyondACyclist/a/li/ul/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpThose who know me will be well aware that I am both a passionate cyclist. Last June I wrote a blog about cycling. It told the dreadfully sad tale of a cyclist who died close to my home following a road traffic incident. In just 24 hours the post had over 10,000 reads. This triggered me to take positive action, the result of which is my campaign BeyondACyclist, which has backing and support from a href=http://www.cyclinguk.org/aboutCyclingUK/a./p pA totally volunteer effort (entirely inspired by my work with Drupal) BeyondACyclist has a groundswell of support and active participation from the likes of a href=http://www.threedegreeswest.co.uk/showreel.htmlThree Degrees West/a film company, Cheshire Fire Service, Cheshire East Council, West Midlands Police, Christie Hospital, composer a href=https://vimeo.com/200965448Brian Lane/a, script writer Craig Roderick (a href=http://www.southpawagency.com/work/Southpaw Agency/a) and a href=https://uk.linkedin.com/in/philjones40Phil Jones MBE/a Managing Director - Brother UK to name but a few. Plans are in advanced stages to produce an ambitious cinema quality short film, supporting studio portraits and action photography, social media campaign and distribution across a variety of mediums./p p/ph2Why I am reaching out to you the Drupal community/h2 pWithin the next few months we will have the film completed. But there is a final missing link. I need a website designed, built and themed to drive traffic towards. A site to serve as central focal point for all campaign activity. The place where all traffic will arrive be that from TV news, print media, social or offline. I cannot do all of this alone. I already have a lot on my plate!/p pI'm hoping someone in the Drupal community will be reading right now and feel this is a cause they would like to get involved with. Obviously Drupal 8, it will be high traffic as I have built excellent relations with media outlets including TV, print and social. And this is a global issue. In Ireland, across USA, Australia there are currently hot news stories about cycle safety and sadly more deaths. So don't think being outside the UK is a blocker, no./p pI anticipate needing 2-3 individuals to complete the task - Designer, Site builder or Site builder and Themer (as separate roles). If you would like to discuss the idea further or are just plain interested in getting involved please a href=http://pauldjohnson.co.uk/contactuse my contact form to reach me/a. And thank you in advance. Paul./p /div/div/divdiv class=field field-name-field-gallery-images field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image src=http://www.pauldjohnson.co.uk/sites/pauldjohnson.co.uk/files/styles/600/public/Screen%20Shot%202017-04-18%20at%2022.24.07.png?itok=It_0ldG- width=631 height=438 alt= //div/div/div

Hook 42: Baltimore!! We're Excited!

Tue, 04/18/2017 - 22:30
div class=image div class=field-items class=field-items div class=field-item even rel=og:image rdfs:seeAlso resource=http://www.hook42.com/sites/default/files/styles/image_style_blog_list/public/field/image/drupalcon-baltimore-2017.jpeg?itok=8BqD7yDj class=field-item evenimg typeof=foaf:Image src=http://www.hook42.com/sites/default/files/styles/image_style_blog_list/public/field/image/drupalcon-baltimore-2017.jpeg?itok=8BqD7yDj width=240 height=220 alt=DrupalCon Baltimore 2017 title=DrupalCon Baltimore 2017 //div /div /div div class=field field-name-body field-type-text-with-summary field-label-hidden field-wrapper body field div class=field-items class=field-items div class=field-item even property=content:encoded class=field-item evenh2We're all thrilled to be heading to Baltimore soon for DrupalCon!/h2 pThe Hook 42 team is on their way to the historic city of Baltimore. Its early days helped shape the narrative of America. This year it hosts a href=https://events.drupal.org/baltimore2017DrupalCon North America/a and perhaps it will share a role in shaping the future of Drupal./p pThe team is excited to share what they are looking forward to, not only at DrupalCon, but also what the city might have in store for them during their down time./p /div /div /div

Platform.sh: Free SSL certificates for every project every environment

Tue, 04/18/2017 - 21:16
spanFree SSL certificates for every project every environment/span spanspan lang= about=https://platform.sh/user/2336 typeof=schema:Person property=schema:name datatype= xml:lang=Crell/span/span spanTue, 04/18/2017 - 19:16/span div class=field field--name-field-post-type field--type-entity-reference field--label-hidden field--itema href=https://platform.sh/taxonomy/term/8 hreflang=enNew Features/a/div div class=field field--name-field-image field--type-image field--label-hidden field--item picture!--[if IE 9]video style=display: none;![endif]--source srcset=https://platform.sh/sites/default/files/2017-04/encrypt3.jpg 1x media=all and (min-width: 1200px) type=image/jpeg/sourcesource srcset=https://platform.sh/sites/default/files/styles/max_width_992_2/public/2017-04/encrypt3.jpg?itok=g2xyrBp3 1x, https://platform.sh/sites/default/files/2017-04/encrypt3.jpg 2x media=all and (min-width: 992px) type=image/jpeg/sourcesource srcset=https://platform.sh/sites/default/files/styles/max_width_992/public/2017-04/encrypt3.jpg?itok=E2Ge9Wdf 1x, https://platform.sh/sites/default/files/styles/max_width_992_2/public/2017-04/encrypt3.jpg?itok=g2xyrBp3 2x media=all and (max-width: 991px) type=image/jpeg/sourcesource srcset=https://platform.sh/sites/default/files/styles/max_width_768/public/2017-04/encrypt3.jpg?itok=202ISjje 1x, https://platform.sh/sites/default/files/styles/max_width_768_2/public/2017-04/encrypt3.jpg?itok=VFO5-Btu 2x media=all and (max-width: 767px) type=image/jpeg/sourcesource srcset=https://platform.sh/sites/default/files/styles/blog_teaser/public/2017-04/encrypt3.jpg?itok=JEUe6iad 1x, https://platform.sh/sites/default/files/styles/blog_teaser/public/2017-04/encrypt3.jpg?itok=JEUe6iad 2x media=all and (max-width: 479px) type=image/jpeg/source!--[if IE 9]/video![endif]--img src=https://platform.sh/sites/default/files/styles/max_width_480/public/2017-04/encrypt3.jpg?itok=jDPg1UEA alt=Let's Encrypt typeof=foaf:Image class=img-responsive //picture/div div class=field field--name-body field--type-text-with-summary field--label-hidden field--itempAt Platform.sh, we believe that all websites deserve to be secure, fast, and feature-rich, and that it should be easy to have all three. Secure has always meant that a site is encrypted using SSL, which is why we’ve never charged for an SSL certificate. Fast means using a href=https://platform.sh/2017/1/http2/ rel=nofollowHTTP/2/a, which we added support for earlier this year, but most browsers only support HTTP/2 over SSL. And feature-rich means allowing the full range of newer web functionality such as geolocation, access to media devices, or notifications, many of which browsers are now only permitting over SSL connections. You know what? The modern web only works properly with SSL so let’s cut out the middleman. Let’s Encrypt emeverything/em./p pWe’re happy to announce automatic support for Let’s Encrypt SSL certificates on every production site on Platform.sh Professional, at no charge./p pStarting today for all new projects, on every deploy we will automatically provision and install an SSL certificate for you using the free a href=https://letsencrypt.org/ rel=nofollowLet’s Encrypt/a service. You don’t have to do anything. It will just be there./p pFor existing projects, we're bringing that functionality online in batches to avoid overwhelming the Let's Encrypt servers. We expect to finish getting through them all within the next few weeks. If you're about to bring a site live and want to make sure you get Let's Encrypt functionality before that, just file a support ticket and we'll bump you to the front of the line./p h2Wait, what does this mean for my site?/h2 pIf you currently just have HTTP routes defined in your coderoutes.yaml/code file, then as of your next deploy HTTPS requests will be served as HTTPS requests rather than being redirected to HTTP. Both will “just work”./p pIf you want to serve your entire site over HTTPS all the time (and yes, you do), simply change all codehttp:///code routes in your routing file to be codehttps:///code. That will automatically redirect HTTP requests to HTTPS going forward./p pSee the a href=https://docs.platform.sh/configuration/routes.html#https rel=nofollowRoutes section/a of the documentation for more details, but really, there’s not many details beyond that. It just works./p h2What about Platform.sh Enterprise?/h2 pMost Platform.sh Enterprise sites are served through a Content Delivery Network already, in which case the SSL certificate is handled by the CDN. This change has no impact on Platform.sh Enterprise customers./p h2Neat! So what should I do?/h2 pYou don’t have to do anything. HTTPS just works now. As above, you can configure your site to use HTTPS exclusively by adding the letter s to your coderoutes.yaml/code file in a few places. (We told you it was easy.)/p pOf course, now that you know your site will use SSL, you also know it will be using HTTP/2. All SSL-protected sites on Platform.sh use HTTP/2. HTTP/2 is supported by a href=http://caniuse.com/#feat=http2 rel=nofollownearly 80% of web browsers/a in the world. That makes it safe, and a good investment, to start optimizing your site for HTTP/2, layering in HTTP/2-specific capabilities like server push, and so forth./p pSecure, fast, feature-rich, and easy. Welcome to Platform.sh!/p /div div class=field field--name-field-author field--type-entity-reference field--label-hidden field--item div class=people-image div class=field field--name-field-image field--type-image field--label-hidden field--item img src=https://platform.sh/sites/default/files/styles/thumbnail/public/team/larry.png?itok=hf9dmzIX width=100 height=100 alt=Larry Garfield typeof=foaf:Image class=img-responsive //div /div div class=people-name spanLarry Garfield/span /div div class=people-title/div /div div class=field field--name-field-posted-date field--type-datetime field--label-hidden field--itemtime datetime=2017-04-20T12:00:00Z20 Apr, 2017/time/div div class=field field--name-field-disqus-comments field--type-disqus-comment field--label-hidden field--itemdrupal-render-placeholder callback=Drupal\disqus\Element\Disqus::displayDisqusComments arguments=0=Free%20SSL%20certificates%20for%20every%20project%20%26%20every%20environment1=https%3A//platform.sh/blog/free-ssl-certificates-for-every-project-every-environment2=node/473 token=OcChL_VynWd-PMbPTzfjSLDX67zQfEwAFYJoZ8tmHm4/drupal-render-placeholder/div