Drupal Planet

Subscribe to canal de noticias Drupal Planet
Drupal.org - aggregated feeds in category Planet Drupal
Actualizado: hace 51 mins 4 segs

Hook 42: August A11y (Accessibility) Talk Review

Mar, 08/29/2017 - 01:43

Attention to web accessibility (a11y) is one of the most important tasks developers have to ensure an internet that is diverse and inclusive.

This month’s A11y Talk featured Damien McKenna from Mediacurrent. First he discussed the significance of open source contributions and the importance of contributing back to Drupal, then he led us through a live demo of the patch process on Drupal.org.

Disruptive Library Technology Jester: Adding Islandora Viewers Capability to Basic Image Solution Pack

Lun, 08/28/2017 - 22:15

Putting this here because I didn’t see it mentioned elsewhere and it might be useful for others. Thinking about the history of the Islandora solution packs for different media types, the Basic Image Solution Pack was probably the first one written. Displaying a JPEG image, after all, is — well — pretty basic. I’m working on an Islandora project where I wanted to add a viewer to Basic Image objects, but I found that the solution pack code didn’t use them. Fortunately, Drupal has some nice ways for me to intercede to add that capability!

Step 1: Alter the /admin/islandora/solution_pack_config/basic_image form
The first step is to alter the solution pack admin form to add the Viewers panel. Drupal gives me a nice way to alter forms with hook_form_FORM_ID_alter().

/** * Implements hook_form_FORM_ID_alter(). * * Add a viewers panel to the basic image solution pack admin page */function islandora_ia_viewers_form_islandora_basic_image_admin_alter(&$form, &$form_state, $form_id) { module_load_include('inc', 'islandora', 'includes/solution_packs'); $form += islandora_viewers_form('islandora_image_viewers', 'image/jpeg', 'islandora:sp_basic_image');}

Step 2: Insert ourselves into the theme preprocess flow
The second step is a little trickier, and I’m not entirely sure it is legal. We’re going to set a basic image preprocess hook and in it override the contents of $variables['islandora_content']. We need to do this because that is where the viewer sets its output.

/** * Implements hook_preprocess_HOOK(&$variables) * * Inject ourselves into the islandora_basic_image theme preprocess flow. */function islandora_ia_viewers_preprocess_islandora_basic_image(array &$variables) { $islandora_object = $variables['islandora_object']; module_load_include('inc', 'islandora', 'includes/solution_packs'); $params = array(); $viewer = islandora_get_viewer($params, 'islandora_image_viewers', $islandora_object); if ($viewer) { $variables['islandora_content'] = $viewer; }}

I have a sneaking suspicion that the hooks are called in alphabetical order, and since islandora_ia_viewers comes after islandora_basic_image it all works out. (We need our function to be called after the Solution Pack’s preprocess function so our 'islandora_content' value is the one that is ultimately passed to the theming function. Still, it works!

Chapter Three: How to Alter Entity Autocomplete Results in Drupal 8

Sáb, 08/26/2017 - 01:38

Sometimes you might want to display additional data in the autocomplete results, for instance add content language next to the title, or display entity type or any other related data. In this blog post I will demonstrate how to alter suggestions in autocomplete fields in Drupal 8. The project is available for download from github, see the link at the bottom of the page.

Here is the module structure I will be using:

Sudhanshu Gautam | Blog: GSoC 2017 | Week 12: Port Vote Up/Down

Vie, 08/25/2017 - 19:14
GSoC 2017 | Week 12: Port Vote Up/Down sudhanshu Sat, 08/26/2017 - 03:44

Glassdimly tech Blog: 8: Programatically Filter Current Nid from Views Block Listing

Vie, 08/25/2017 - 18:16

Views has a setting to exclude the current nid from the URL from the listing one is currently viewing. This is essential when you have, say, a list of related nodes that are are defined by a category that includes the current node. If you don't exclude the current node, your current node will be listed in the "related content" block on itself. Well, obviously one is related to oneself, one thinks.

First, I tired to accomplish this through the UI with these steps, below.

Drupal core announcements: Proposal to adjust experimental modules process/requirements in response to user/developer feedback

Vie, 08/25/2017 - 16:51

In order to respond to both site builder and developer feedback about core experimental modules in Drupal 8, the committer team is proposing the following changes starting with the Drupal 8.5.x branch (which is now open for development):

  1. Experimental modules that have alpha stability will only be committed to development branches of Drupal 8.
  2. If an experimental module has not achieved at least beta-level stability by the alpha1 release of the branch itself, its development will move to the next development branch and the module will not be included in the branch's alpha release. (Or, alternately, the module may be removed from core if there's no clear path to stability.)
  3. Once an experimental module reaches beta stability, we now require (a) upgrade paths, and (b) backwards compatibility (or a deprecated BC layer) for any API improvements.

For example, if an initiative team wanted to add a new experimental module to core for their desired feature, they could introduce a patch that met the requirements for an experimental module and it could be committed to 8.5.x as an alpha-stability experimental module. However, by 8.5.0-alpha1 (the week of January 17, 2018), either the module would need to be in "beta" level stability (which means its API and data model would be considered stable, with upgrade paths and API BC layers provided when needed), or it would be left in the 8.6.x branch, but removed from the 8.5.x branch before tagging the alpha. 8.5.0 would ship without this new functionality, but (if completed in time) it could be available in the 8.6.0 release.

These policy changes are intended to address a number of frustrations with the existing experimental module process and to better meet expectations for non-core site builders and developers.

For background on this decision or to provide your feedback, see the core policy issue that discusses this proposed change. The issue is open for community feedback until September 6, 2017. Thank you in advance!

Elevated Third: POWDR’s Front End Architecture Build

Vie, 08/25/2017 - 14:31
POWDR’s Front End Architecture Build POWDR’s Front End Architecture Build root Fri, 08/25/2017 - 11:31

Powdr Resorts is one of the largest ski operators in North America. Since December, we've spun up nearly a dozen decoupled Drupal website for the holding company including websites for Boreal Mountain Resort, Copper Mountain, Camp Woodward, and more. 

The work was completed with our frontend partners at Hoorooh Digital and hosting partners at Acquia. It is cutting edge and worth diving into so we've put together an eBook style review of the project's parts. 

In prior posts, we've covered Hosting a Decoupled Drupal Site, Decoupled Drupal: A 10,000 ft View, and Decoupled Drupal Technologies and Techniques

In the final installment of our decoupled Drupal series our partner, Denny Cunningham, Lead Front End Developer at Hoorooh Digital, discusses the three main areas that needed to be addressed during the build of POWDR’s front end architecture: Routing & Syncing with the API, Component Driven Content, and the Build Process & Tools. Read the whole piece on Acquia's developer center, here

Mediacurrent: The 3 C's + the 1 D of Drupal: Why Decoupled Matters

Vie, 08/25/2017 - 10:06

Whether you are a Digital Marketer looking to adopt Open Source and Drupal for the first time, or an Engineer, Strategist or Project Manager assigned to a Drupal project, it’s critical that you define your approach to the “3 C's" of Drupal: Core, Contrib and Custom.  This decision directly impacts the performance, scalability, and maintenance of the websites and/or other digital assets that you are powering with Drupal.

Himanshu Dixit | Blog: Week 12 : Google Summer Of Code Final Week

Vie, 08/25/2017 - 08:25
Week 12 : Google Summer Of Code Final Week himanshu-dixit Fri, 08/25/2017 - 16:55

Jeff Geerling's Blog: Apache, fastcgi, proxy_fcgi, and empty POST bodies with chunked transfer

Vie, 08/25/2017 - 00:45

I've been working on building a reproducible configuration for Drupal Photo Gallery, a project born out of this year's Acquia Build Hackathon.

We originally built the site on an Acquia Cloud CD environment, and this environment uses a pretty traditional LAMP stack. We didn't encounter any difficulty using AWS Lambda to post image data back to the Drupal site via Drupal's RESTful Web Services API.

The POST request is built in Node.js using:

Palantir: Yale University Art Gallery

Jue, 08/24/2017 - 17:17
Yale University Art Gallery brandt Thu, 08/24/2017 - 15:17 Enhancing the Visitor Experience of an Online Collection

Using Drupal to simplify complex publishing needs.

Highlights
  • Increased accuracy and reduced speed of nightly collection imports with updated use of Migrate module

  • Rich search experience provided by Search API module and Facet API module

  • Enhanced event calendar functionality

We want to make your project a success.

Let's Chat. Our Client

The mission of the Yale University Art Gallery is to encourage appreciation and understanding of art and its role in society through direct engagement with original works of art. The gallery’s online collection contains more than 160,000 works, spanning more than 4,000 years of human history. Many of the images in the collection are available for use as part of the University’s Open Access Policy for public domain works.

Goals and Direction

Having launched their new website in Drupal 7, the Gallery was looking to improve its functionality by making the site easier to use and by simplifying their nightly collection synchronization.

The primary high-level goals for the project were to:

  • Streamline collection imports. Provide reliable synchronization from TMS source data to Drupal content nodes
  • Present a searchable collection. Provide end-users with relevant search results across content types and within collections based content
  • Implement faceted search. Provide end-users the ability to refine search results based on key facets which describe the search data
  • Include sortable results. Provide end-users the ability to sort search results when searching collection objects
  • Implement predictive autocomplete for collections search. Provide end-users the ability to see a set of auto-complete options of artist names when searching collection objects
  • Update the event calendar. Provide end-users with the ability to use the site calendar and event system to find relevant upcoming events
Collection Handling

Like many museums, the Gallery strives to put its extensive collection online. At the time of this writing, the Gallery had only 3,800 works on view to the public, with another 160,000 either in storage or available only by appointment. With the collection online, visitors, artists, and researchers can take a deeper dive into the entire catalogue.

For its collection management, the Gallery uses The Museum System (TMS), a Windows desktop application used by more than 800 institutions worldwide. TMS is a proprietary software system that provides its own bespoke web publishing system, and the Gallery wanted a greater level of presentation control than afforded by that system. In particular, the categories used internally at the Gallery needed to be altered when used on the public website.

When Palantir first engaged with the Gallery in September 2014, they were exporting the entire TMS collection nightly and importing it into the Drupal site using the Migrate module. The process was lengthy and error-prone, so our first task was to make the data import more scalable by having the nightly import only respond to records changed in the TMS system since the last import.

The Migrate module supports this feature with the concept of highwater marks. Highwater marks map the imported data to a sortable key in the source data -- typically the last updated date -- and instructs Drupal to only return content that has been changed since the last import. Doing so cut the speed and increased the accuracy of the nightly import, which formed the basis for all further site improvements.

Search

To search the collection, the Gallery installed an Apache SOLR instance, creating search repositories for site content and for the collected works. This dual approach allowed the creation of two distinct search experiences. Overall site search returns collection objects, events, and other content, while the collection search returns a faceted list of collection objects.

Using the Search API module as a base enhanced by the Facet API module, we can provide a rich search experience similar to what one might use on Amazon.com, where search results can be further narrowed by selecting checkboxes that limit the search range. For the Gallery, a search can be filtered by six distinct filters: Department, Classification, Date Made, Culture, Image Available, and Availability in the gallery.

Using the Facet API Slider module, we constructed a custom date widget that allows the user to select a start and end date using a doubled-handled slider.

To create predictive search results, we had to create a custom autocomplete callback to handle the requirement that searches should default to pulling back artist records. (Technical note: since the search field is targeted to the SOLR full text index, the Search API Autocomplete module turned out not to work for this use-case.)

Events

The Gallery hosts numerous public exhibitions and events throughout the year. They play host to a number of traveling exhibitions and need to keep an overall calendar that includes events syndicated from Yale’s central calendar service.

Like the collection search, the calendar includes facets to help visitors narrow the list of results.

The site also tracks upcoming and past exhibitions, serving as a showcase of the breadth of the collection.

The Results

Like many organizations, the Gallery has complex publishing needs and a small staff. A major outcome of our work has been to streamline the production of the site so that it can be automated based on work already being done in external systems. Collections, exhibits, and artist information all flow through the TMS migration, allowing curators to do their work once and not spend extra time managing the website directly.

Streamlined updates aside, the primary result has been the improved experience for Gallery patrons. By improving the search and calendar functionality, visitors are now able to engage easier with the original artwork provided by the Gallery, both online and in-person at events.

We want to make your project a success.

Let's Chat. Drupal Fine Arts Museums of San Francisco artgallery.yale.edu

Lullabot: Contenta - An API First Decoupled Drupal Distribution

Jue, 08/24/2017 - 17:00
Matt and Mike are joined by the creators of Contenta, which is an API first Drupal distribution for decoupling your site's front-end from Drupal.

Elevated Third: Agile With a Lowercase ‘a’: The Art of Collaborative Project Management

Jue, 08/24/2017 - 16:18
Agile With a Lowercase ‘a’: The Art of Collaborative Project Management Agile With a Lowercase ‘a’: The Art of Collaborative Project Management Kylie Forcinito Thu, 08/24/2017 - 13:18

The discovery phase has ended. Your client is excited. The estimate is finalized. Your team is ready to take on the project with an unstoppable ferocity. And then it happens. The lull, the drag, and the ever infamous post discovery hangover. You have the budget, you have the idea, but what next? How do you get the wheels turning to put the machine into motion? How do you keep your work unified?

 

 

Our approach to battle this ever daunting feeling is to implement a system that, once in motion, is an unstoppable, self-maintaining machine. Our goal for each project is to create a unified approach. We implement projects that satisfy client contract and budget needs while keeping collaboration a priority.

This approach is not like most agile processes. We coin it agile* *with a lowercase ‘a,’ because we use the most basic concepts of the agile manifesto as a guide without creating a rigid system. The core of the process is the same but it is more scalable and adaptable to each project and project team.

Our goal is to grab the best parts of agile and modify it to fit the needs of the project, team, and client partners.

Not every project, client, or internal team is the same, so we don’t expect success out of a one size fits all process.

The Players

Collaborative project management. Think Moneyball. You don’t need a superstar in any single role, you just need to know the positions you need to fill and help your team to play off one another’s strengths. Each team member needs to understand their role, responsibility, expectations, and how to make an impact on the project.

 

 

“The best architectures, requirements and designs emerge from self-organizing teams.” -The Twelve Principles of Agile Software

The Recipe

How do you set-up teams to self-manage? That’s where the beauty of the agile framework lends stability to the process. Our approach is to take the values of agile development and bend them to fit our process.

Below is our approach to a successful implementation phase based on our interpretation of the Agile Manifesto.

Meetings and communication

Individuals and interactions over processes and tools.

1. Find tools that support your workflow versus hinder your production. Predictability is a good thing when it comes to communication. You don’t want to waste 5 minutes of a 15 minute standup figuring out what the call in number is. Communication tool consistency enables communication efficiency.

2. Support your remote team members and keep consistency with your communication tools. At Elevated Third, we leverage Slack for quick communication between team members. We also use Slack call and screen share features when working with remote teams. Communication is direct and streamlined.

3. Prioritize straight talk and develop a shared understanding of expectations with the project team.

4. Only include necessary team members in the right conversations. Plan focused, short meetings with only the relevant team members maximize the effectiveness of the meeting. We use 15 minute standups to discuss what each team member is working on that day. Each team member is allowed 2 minutes, and anything outside of the 2 minutes is addressed in a separate conversation with the necessary individuals. This method keeps one issue from monopolizing the standup time and keeps the project moving forward.

5. Share a live demo of the work to keep the full team involved with the project progress. It is crucial that the team is on the same page before the client demo.

 

 

6. Review with your client team to keep them actively involved throughout the project. This gives them the opportunity to share priority level of features during each phase of the project versus all at once at the very end (which could impact the budget).

Planning and Scoping

Customer collaboration over contract negotiation.

1. Coach your clients to be a partner. It’s important to involve clients in sprint planning and feature prioritization process from the very beginning. It helps them understand how to be a partner in the project and what the expectations are from the onset.

2. Align on project feature priorities and budget with stakeholders. Internal and client teams should be aligned on feature priorities and budget before the implementation begins. Set the team and project up for success by starting on the same page with the same expectations. Don’t set sail when the boat isn’t built.

 

 

3. Use project management tools to aid in efficiency. Efficient, simple task/budget management is invaluable. The project management tools should assist in budget and sprint management. At Elevated Third, we use Mavenlink for budget and hours tracking and Asana to keep our sprints and tasks planned during implementation.  

Documentation

Working software over comprehensive documentation.

1. Find the right balance of shared understanding and documentation for the project. Not every project will need the same type of documentation - especially when it comes to designs. Find the level of documentation needed to keep the project moving forward.

2. Prioritize living documents that are maintained and useful over throw away deliverables. At Elevated Third, we have a set of requirements that we consistently use and scale for each project.

  • User Stories - prioritize functionality

  • Risk Mitigation - document possible impacts to budget/timeline

  • Build Spec - Provide accessible content architecture plan

  • Features Estimate - Show a full list of features with estimated ranges

  • Wireframes and Styleguide/Designs - Demonstrate look and feel

  Balance the Big Picture and the Details

Responding to change over following a plan.

1. Keep your plan fluid, and don’t be discourage by or afraid of change. Embrace the change and focus on creating solutions that bring the team together for a better outcome. Projects evolve, and successful projects adapt.

2. Set aside time to take on specific problems. Project management is a balancing act. We are required to keep everyone moving while continuously working through blockers. When a potential blocker arises, address it with the key members and stakeholders as quickly as possible so the project can keep moving forward and stay on track.

Testing

Don’t bring an opinion to a data fight.

1. When implementation is complete, it’s critical to set aside time for testing. Take the time to ensure the system works together as intended for each user.

2. For successful testing make sure the client team and the project team are testing from the same documentation and that the testing only pertains to the functionality that was prioritized for the project.  

Keep Up the Momentum

Don’t fizzle out after the site has launched.

1. Be a strategic partner post launch by tracking analytics and making recommendations based on the original project and business goals.

 

 

2. Keep track of features that were out of scope for the initial phase of the project, and prioritize them for future phases.

3. Create a maintenance release cycle to iteratively improve the website or product that was built.

 

The “highest priority is to satisfy the customer through early and continuous delivery of valuable software.” - The Twelve Principles of Agile Software

This blog post was adapted from a presentation at DrupalCon Baltimore 2017. You can watch the full talk here

Chiranjeeb Mahanta | Blog: GSoC’17 Coding period | Week #12 | Uc Wishlist

Jue, 08/24/2017 - 16:08
GSoC’17 Coding period | Week #12 | Uc Wishlist chiranjeeb2410 Thu, 08/24/2017 - 15:08

Acquia Developer Center Blog: Grab Your Space in the Fall Session of the Drupal 8 Immersion Online Course

Jue, 08/24/2017 - 15:55

Here in Acquia Learning Services we just completed our first session of the Drupal 8 Developer Immersion Course w/ Certification prep – it was a great success!

Led by teacher Dallas Ramsden, 15 brave souls dug into D8 all summer with project-based learning and weekly virtual classrooms. The course just wrapped and students are already passing the D8 Developer exam.

We're kicking off the next session the week of September 5th: Reserve your space by this weekend to save $400.

Tags: acquia drupal planet

Texas Creative: Impressions of Drupal 8 as a New Developer

Jue, 08/24/2017 - 13:26

I started in web development about a year ago. When I was hired on at Texas Creative in early October of 2016, I still only knew the bare minimum but was eager to learn more to further my career path. Here at Texas Creative, we use Drupal, a CMS I had no prior experience in. The idea of that seemed daunting, but I’ve certainly learned a lot and have grown to love Drupal. 

Read More

Evolving Web: Migrating Aliases and Redirects to Drupal 8

Jue, 08/24/2017 - 11:00

When content URLs change during migrations, it is always a good idea to do something to handle the old URLs to prevent them from suddenly starting to throw 404s which are bad for SEO. In this article, we'll discuss how to migrate URL aliases provided by the path module (part of D8 core) and URL redirects provided by the redirect module.

The Problem

Say we have two CSV files (given to us by the client):

The project requirement is to:

  • Migrate the contents of article.csv as article nodes.
  • Migrate the contents of category.csv as terms of a category terms.
  • Make the articles accessible at the path blog/{{ category-slug }}/{{ article-slug }}.
  • Make blog/{{ slug }}.php redirect to article/{{ article-slug }}.

Here, the term slug refers to a unique URL-friendly and SEO-friendly string.

Before We Start Migrate Node and Category Data

This part consists of two simple migrations:

The article data migration depends on the category data migration to associate each node to a specific category like:

# Migration processes process: ... field_category: plugin: 'migration_lookup' source: 'category' migration: 'example_category_data' no_stub: true ...

So, if we execute this migration, we will have all categories created as category terms and 50 squeaky new nodes belonging to those categories. Here's how it should look if we run the migrations using drush:

$ drush migrate-import example_article_data,example_category_data Processed 5 items (5 created, 0 updated, 0 failed, 0 ignored) - done with 'example_category_data' Processed 50 items (50 created, 0 updated, 0 failed, 0 ignored) - done with 'example_article_data'

Additionally, we will be able to access a list of articles in each category at the URL blog/{{ category-slug }}. This is because of the path parameter we set in the category data migration. The path parameter is processed by the path module to create URL aliases during certain migrations. We can also use the path parameter while creating nodes to generate URL aliases for those nodes. However, in this example, we will generate the URL aliases in a stand-alone migration.

Generate URL Aliases with Migrations

The next task will be to make the articles available at URLs like /blog/{{ category-slug }}/{{ article-slug }}. We use the example_article_alias migration to generate these additional URL aliases. Important sections of the migration are discussed below.

Source source: plugin: 'csv' path: 'article.csv' ... constants: slash: '/' source_prefix: '/node/' alias_prefix: '/blog/' und: 'und'

We use the article.csv file as our source data to iterate over articles. Also, we use source/constants to define certain data which we want to use in the migration, but we do not have in the CSV document.

Destination destination: plugin: 'url_alias'

Since we want to create URL aliases, we need to use the destination plugin url_alias provided by the path module. Reading documentation or taking a quick look at the plugin source at Drupal\path\Plugin\migrate\destination\UrlAlias::fields(), we can figure out the fields and configuration supported by this plugin.

Process ... temp_nid: plugin: 'migration_lookup' source: 'slug' migration: 'example_article_data' ... temp_category_slug: # First, retrieve the ID of the taxonomy term created during the "category_data" migration. - plugin: 'migration_lookup' source: 'category' migration: 'example_category_data' # Use a custom callback to get the category name. - plugin: 'callback' callable: '_migrate_example_paths_load_taxonomy_term_name' # Prepare a url-friendly version for the category. - plugin: 'machine_name'

Since we need to point the URL aliases to the nodes we created during the article data migration, we use use the migration_lookup plugin (formerly migration) to read the ID of the relevant node created during the article data migration. We store the node id in temp_nid. I added the prefix temp_ to the property name because we just need it temporarily for calculating another property and not for using it directly.

Similarly, we need to prepare a slug for the category to which the node belongs. We will use this slug to generate the alias property.

source: plugin: 'concat' source: - 'constants/source_prefix' - '@temp_nid'

Next, we generate the source, which is the path to which the alias will point. We do that by simply concatenating '/nid/' and '@temp_nid' using the concat plugin.

alias: plugin: 'concat' source: - 'constants/alias_prefix' - '@temp_category_slug' - 'constants/slash' - 'slug'

And finally, we generate the entire alias by concatenating '/article/', '@temp_category_slug', a '/' and the article's '@slug'. After running this migration like drush migrate-import example_article_alias, all the nodes should be accessible at /article/{{ category-slug }}/{{ article-slug }}.

Generate URL Redirects with Migrations

For the last requirement, we need to generate redirects, which takes us to the redirect module. So, we create another migration named example_article_redirect to generate redirects from /blog/{{ slug }}.php to the relevant nodes. Now, let's discuss some important lines of this migration.

Source constants: # The source path is not supposed to start with a "/". source_prefix: 'blog/' source_suffix: '.php' redirect_prefix: 'internal:/node/' uid_admin: 1 status_code: 301

We use source/constants to define certain data which we want to use in the migration, but we do not have in the CSV document.

Destination destination: plugin: 'entity:redirect'

In Drupal 8, every redirect rule is an entity. Hence, we use the entity plugin for the destination.

Process redirect_source: plugin: 'concat' source: - 'constants/source_prefix' - 'slug' - 'constants/source_suffix'

First, we determine the path to be redirected. This will be the path as in the old website, example, blog/{{ slug }}.php without a / in the front.

redirect_redirect: plugin: 'concat' source: - 'constants/redirect_prefix' - '@temp_nid'

Just like we did for generating aliases, we read node IDs from the article data migration and use them to generate URIs to which the user should be redirected when they visit one of the /blog/{{ slug }}.php paths. These destination URIs should be in the form internal:/node/{{ nid }}. The redirect module will intelligently use these URIs to determine the URL alias for those paths and redirect the user to the path /article/{{ slug }} instead of sending them to /node/{{ nid }}. This way, the redirects will not break even if we change the URL alias for a particular node after running the migrations.

# We want to generate 301 permanent redirects as opposed to 302 temporary redirects. status_code: 'constants/status_code'

We also specify a status_code and set it to 301. This will create 301 permanent redirects as opposed to 302 temporary redirects. Having done so and having run this third migration as well, we are all set!

Migration dependencies migration_dependencies: required: - 'example_article_data'

Since the migration of aliases and the migration of redirects both require access to the ID of the node which was generated during the article data migration, we need to add the above lines to define a migration_dependency. It will ensure that the example_article_data migration is executed before the alias and the redirect migrations. So if we run all the migrations of this example, we should see them executing in the correct order like:

$ drush mi --tag=example_article Processed 5 items (5 created, 0 updated, 0 failed, 0 ignored) - done with 'example_category_data' Processed 50 items (50 created, 0 updated, 0 failed, 0 ignored) - done with 'example_article_data' Processed 50 items (50 created, 0 updated, 0 failed, 0 ignored) - done with 'example_article_alias' Processed 50 items (50 created, 0 updated, 0 failed, 0 ignored) - done with 'example_article_redirect'Next steps + more awesome articles by Evolving Web

Acquia Developer Center Blog: Decoupled Drupal: POWDR’s Front End Architecture Build

Jue, 08/24/2017 - 10:46

In this article we’ll discuss the three main areas that needed to be addressed during the build of POWDR’s front end architecture: Routing & Syncing with the API, Component Driven Content, and the Build Process & Tools.

Tags: acquia drupal planet

Chromatic: Announcing our Drupal Coding Standards Series on Drupalize.me!

Jue, 08/24/2017 - 10:30

The folks at Drupalize.me provide the best Drupal training materials on the web, so we were more than happy to oblige them when they asked if they could release our Coding Standards guide as a free series on their platform.

Agiledrop.com Blog: AGILEDROP: Web Accessibility in Drupal 8 – part 2

Jue, 08/24/2017 - 06:48
This blog post is the second part of the session Web accessibility in Drupal 8 from our Development director Bostjan Kovac. We will look at the most common mistakes developers make, Drupal Contrib modules and other tools that will help you out when it comes to web accessibility. If you have missed the first part, you can read it here. Most common mistakes developers make Simple markup: And then there is a classy theme: The Ignorant theme (Bostjan called it that way) with no HTML elements, no roles for each element, nothing the screen readers should help themselves with. That means that… READ MORE

Páginas