Drupal Planet

Subscribe to canal de noticias Drupal Planet
Drupal.org - aggregated feeds in category Planet Drupal
Actualizado: hace 1 hora 22 mins

Drupal Europe: The Inspiration of our Blockchain Panel:

Jue, 08/23/2018 - 05:38
Image by LuckyStep @shutterstock
  • to revolutionize publishing, with a new rewarding model in an environment which can build trust and allows community governance.
  • to reshape open source communities, with a better engagement and rewarding system.
  • to free digital identity, thus killing the need of middlemen at the protocol layer.

Blockchain is an universal tool and can be applied in many different areas.

Communities, like the Drupal Community, can find new ways to flourish. Even larger and risky projects can be financed in new ways, with ICO (Initial Coin Offer). Taco Potze (Co-Founder Open Social) has a 10 year Drupal background and is an expert on Communities. He is working on blockchain technology to build a better engagement and rewarding systems for communities. Wouldn’t that be really nice for us?

See also Taco’s session: ICOs, a revolutionary way to raise money for your company

Publishing and its classic monetization model is challenged. Intermediates are about to disrupt the relationship between authors and publishers and their readers. This is based on a troublesome business model, with massive tracking and profile building, to turn our engagement in advertisement money. At the same time poor content and fake news has become a threat to our society. Gagik Yeghiazarian (CEO, Co-Founder Publiq) is looking for new ways to address these problems, with a non profit, distributed media platform based on blockchain.

See also Gagik’s session: Blockchain Distributed Media — A Future for good publishing

The Internet is broken and blockchain can fix it. The biggest promise with blockchain is to make middlemen obsolete, by creating trusted identities in an open protocol. This is to break the monopoly of the middlemen and to retain a free web. We recognize aribnb, amazon, ebay, netflix, itunes as middlemen. We understand, when we by or book, they get their share. With Google, Facebook and YouTube there are some other huge monopoly middlemen, they get their share based on our attention and personal data. They know how to transfer our attention into dollars, by selling it to advertisers. Ingo Rübe (CEO Bot Lab) is working on a protocol, which will allow people to gain control of their digital identity. It will be called KILT Protocol. (Ingo is well known in the Drupal Community and a Member of Drupal’s Advisory Board. As a former CTO of Burda he was the Initiator of the Drupal Thunder Distribution)

Our Panel will be moderated by Audra Martin Merrick, a board member of Drupal Association.

signed
Drupal Europe
Your Track Chairs

Appnovation Technologies: How Software Requirements Affect Each Stage of a Project

Jue, 08/23/2018 - 04:00
How Software Requirements Affect Each Stage of a Project By: Michael Cooper, Appnovation Frontend Dev  When it comes to completing large software projects, one of the most important factors in achieving success is to lay the requirements out clearly. Unfortunately, this is a lot easier said than done. This article will outline a few of the ways that requirements affect development...

Oliver Davies: Examples of using Laravel Collections in Drupal

Mié, 08/22/2018 - 21:00

Since starting to work with Laravel as well as Drupal and Symfony, watching Adam Wathan’s Refactoring to Collections course as well as lessons on Laracasts, I’ve become a fan of Laravel’s Illuminate Collections and the object-orientated pipeline approach for interacting with PHP arrays.

In fact I’ve given a talk on using Collections outside Laravel and have written a Collection class module for Drupal 7.

I’ve also tweeted several examples of code that I’ve written within Drupal that use Collections, and I thought it would be good to collate them all here for reference.

Agiledrop.com Blog: AGILEDROP: Top Drupal blog posts from July 2018

Mié, 08/22/2018 - 20:25
Each month, we revisit out top Drupal blog posts of the month, giving you the chance to check out some of our favourites. Here’s a look at the top blog posts from July 2018.    First one on the list is Kevin Thull's unique contribution to Drupal by Dries Buytaert. Kevin Thull has contributed to Drupal a lot by recording hundreds and hundreds of sessions on different Drupal events and share them with us over Youtube. This blog post and the 2018 Aaron Winborn Award are a big thank you for all the effort.    We continue our list with Decoupled Back Ends in the Age of Brand Consistency by… READ MORE

Lullabot: Early Rendering: A Lesson in Debugging Drupal 8

Mié, 08/22/2018 - 14:54

I came across the following error the other day on a client's Drupal 8 website:

LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early.

Leaked? That sounded bad. Rendering content too early? I didn't know what that meant, but it also sounded bad. Worst of all, this was causing a PHP fatal error along with a 500 response code. Fortunately, I caught the error during development, so there was time to figure out exactly what was going on. In so doing, I learned some things that can deepen our understanding of Drupal’s cache API.

Down the rabbit hole

I knew that this error was being caused by our code. We were writing a custom RestResource plugin, which is supposed to fetch some data from the entity API and return that data, ready to be serialized and complete with cacheability metadata. This custom RestResource was the only route that would trigger the error, and it only started happening part way through development as the codebase grew complex. It had been working fine, until the error noted above, which I include here in full with a stack trace:

The website encountered an unexpected error. Please try again later. LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\rest\ResourceResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php). Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 135) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 57) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 119) Drupal\cdn\StackMiddleware\DuplicateContentPreventionMiddleware->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 663) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I was confused that our code didn't appear in the stack trace; this is all Drupal core code. We need to go deeper.

As I do when this kind of situation arises, I took to the debugger. I set a breakpoint at the place in core where the exception was being thrown looking for clues. Here were my immediate surroundings:

// ... elseif ($response instanceof AttachmentsInterface || $response instanceof CacheableResponseInterface || $response instanceof CacheableDependencyInterface) { throw new \LogicException(sprintf('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: %s.', get_class($response))); } // ...

Foreign land. Knowing a smidgen about the Cache API in Drupal 8 and the context of what we were trying to do, I understood that we were ending up here in part because we were returning a response object that has cacheability metadata on it. That is, we were returning a ResourceResponse object that implements CacheableResponseInterface, including the relevant cacheability metadata with it. I could see from Xdebug that the $response variable in the snippet above corresponded to the ResourceResponse object we were returning, and it was packed with our data object and ready to be serialized. 

undefined

So as far as I knew, I was playing nice and adding cacheability metadata like a good Drupal developer should. What gives?

Seeing the forest for the trees

It was at this point I felt myself getting lost in the weeds. I needed to take a step back and reread the error message. When I did, I realized that I didn't understand what “early rendering” was.

I knew it had some connection to caching, so I started by reading through all the Cache API docs on drupal.org. I’ve read these several times in the past, but it’s just one of those topics, at least for me, that requires constant reinforcement. Another relevant doc I found was CachebleResponseInterface. These provided a good background and laid out some terminology for me, but nothing here talks about early rendering. I also reviewed the Render API docs but again, no mention of early rendering, and nothing getting me closer to a resolution.

So then I zoomed back in a little bit, to the parent class of the code which threw the error: \Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber

As is often the case in Drupal 8 core code, there was an excellent and descriptive doc block for the class. I often find this to be key to understanding Drupal 8. Core committers take great care to document the code they write which makes it worth getting comfortable with reading through core and contrib code.

When controllers call drupal_render() (RendererInterface::render()) outside of a render context, we call that "early rendering." Controllers should return only render arrays, but we cannot prevent controllers from doing early rendering. The problem with early rendering is that the bubbleable metadata (cacheability & attachments) are lost.

At last a definition for early rendering! However, our code wasn't (at least directly) inside a controller, it never called drupal_render() that I could tell, and what in the world is a render context?

Nobody to blame

Still, in need of some context for understanding what was going on here, I looked at git blame to find out where the code that was throwing the error about early rendering came from. Ever since I started to do Drupal 8 development, I’ve always found it useful to use a clone of Drupal locally for such occasions. PHPStorm makes using git blame quite easy. In the file you’re interested in—opened in the editor—just right click the line numbers column and click Annotate. Once the annotations display, click the one that corresponds to the line that you’re interested in to see the commit message. 

undefined

Most, if not all, Drupal core commits will have an issue number in the description, in this case, here is what I found:

Issue #2450993 by Wim Leers, Fabianx, Crell, dawehner, effulgentsia: Rendered Cache Metadata created during the main controller request gets lost

Loading up the issue, I’m faced with a wall of text, 159 comments. Although I did eventually wade through it out of morbid curiosity, what I immediately do when faced with a giant closed core issue, is check for a change record. The Drupal 8 dev cycle has been really excellent about documenting changes, and change records have really helped in the transition from earlier Drupal 7 concepts and explaining new concepts in Drupal 8. For any core issue, first, take a look in the right sidebar of the issue for “Change records for this issue”, and follow any that are linked to get a birds-eye view of the change. If you haven’t already, it’s also handy to bookmark the Change records for Drupal core listing as it's a great place to look when you're stuck on something Drupal 8.

undefined

The change record was very helpful, so if you’re interested, I recommend you definitely give it a read. In short, early rendering used to be rampant (in core and contrib), and this was a problem because cacheability metadata was lost. The change introduced a way to wrap all controllers, detect early rendering, catch and merge the cacheability metadata into the controllers' return (usually a render array). That’s all well and good, but wait! You might think, "If it’s handling the cacheabillity metadata from early rendering, why is it still throwing an error!?" Well, going back to the snippet where the exception is thrown from earlier:

// ... elseif ($response instanceof AttachmentsInterface || $response instanceof CacheableResponseInterface || $response instanceof CacheableDependencyInterface) { throw new \LogicException(sprintf('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: %s.', get_class($response))); } // ...

What this boils down to is if your controller is returning a response object of type, AttachementsInterfaceCacheableResponseInterface, or CacheableDependencyInterface, Drupal does not give you a pass, nor does it handle cacheability metadata from early rendering for you. Drupal takes the position that since you are returning this type of response, you should also be responsible, be aware of and handle early rendering yourself. From the change log:

Since you're returning responses, you want to fully control what is sent, so you should also be a responsible citizen and not do any early rendering. I solemnly swear not to early render

Ok, so no early rendering, got it. But, what if it’s out of our control? In our case, the code we were working in didn't have any direct calls to drupal_render() (RendererInterface::render()). My next tactic was to understand more about what was triggering early rendering. 

To do this, I set a breakpoint in the sole implementation of RendererInterface::render() and then hit the REST endpoint that was triggering the error. Xdebug immediately broke at that line, and inspecting the stack trace, we saw some of our code! Proof that we broke it! Progress. 

undefined

As it turns out, some code in another custom module was being called. This code is meant to wrap entity queries, massaging the return data into something more palpable and concise for the development team that wrote it. Deep in this code, in processing node entities, it was including a call to $node→url(), where $node is a \Drupal\node\Entity\Node object. Turns out, that triggers early rendering. To this, you might ask, "Why would something as innocuous as getting the URL for a node trigger early rendering?" The answer, and I’m only 80% sure after studying this for a while (do correct me if I’m wrong), is that URLs can vary by context based on language or the site URL. They can also have dependencies, such as the language configuration. Finally, URLs can have CSRF tokens embedded in them, which vary by session. All of which is important cacheability metadata that you want to be included in the response. OK, so what’s a responsible Drupal developer to do?

The complete (and verbose) solution, courtesy of ohthehugemanatee (indeed), is to replace your $node→url() call with something like:

// 1. Confusing: the method is called toString, yet passing TRUE for the first param nets you a \Drupal\Core\GeneratedUrl object. $url = $node->toUrl()->toString(TRUE); // 2. The generated URL string, as before. $url_string = $url->getGeneratedUrl(); // Add the $url object as a dependency of whatever you're returning. Maybe a response? $response = new CacheableResponse($url_string, Response::HTTP_OK); $response->addCacheableDependency($url); return $response;

That’s a lot, and it’ll be different depending on what you're doing. It’s broken down into 3 parts. First, you want to call $node->toUrl()->toString(TRUE);. This will essentially tell Drupal to track any cacheability metadata, which is part of generating the URL, and return an object from which you can get that cacheability metadata so you can deal with it. The second part is just getting the actual URL string, $url_string = $url->getGeneratedUrl();, to do with as you please. Finally, you need to account for any encountered cacheability metadata. In the context of a response as above, that means adding the $url object as a cacheable dependency. In the context of a render array, it might mean merging the $url cacheability metadata into the render array. (eg. CacheableMetadata::createFromObject($url)→applyTo($render_array))

Wrap it up

OK so now I understood where the exception was coming from and why. I also understand how I might change the code that is triggering an early rendering. But as I mentioned before, what if you don’t control the code that is triggering an early rendering? Is all hope lost? Not quite. What you can do is wrap the code triggering the early render in a render context. Let’s look at some code:

$context = new RenderContext(); /* @var \Drupal\Core\Cache\CacheableDependencyInterface $result */ $result = \Drupal::service('renderer')->executeInRenderContext($context, function() { // do_things() triggers the code that we don't don't control that in turn triggers early rendering. return do_things(); }); // Handle any bubbled cacheability metadata. if (!$context->isEmpty()) { $bubbleable_metadata = $context->pop(); BubbleableMetadata::createFromObject($result) ->merge($bubbleable_metadata); }

Let’s break this down:

$context = new RenderContext();

Here, I instantiate a new render context. A render context is a stack containing bubbleable rendering metadata. It’s a mechanism for collecting cacheability metadata recursively, aggregating or “bubbling” it all up. By creating and passing it in the next line, the render context is able to capture what would have otherwise been lost cacheability metadata.

/* @var \Drupal\Core\Cache\CacheableDependencyInterface $result */ $result = \Drupal::service('renderer')->executeInRenderContext($context, function() { // do_things() triggers the code that we don't don't control that in turn triggers early rendering. return do_things(); });

Here I run some arbitrary code within the render context I created. The arbitrary code, somewhere along its execution path that we have no control over, triggers early rendering. When that early rendering occurs, since I’m wrapping the code in a render context, the cacheability metadata will bubble up to the render context I setup and allow me to do something with it.

// Handle any bubbled cacheability metadata. if (!$context->isEmpty()) { $bubbleable_metadata = $context->pop(); BubbleableMetadata::createFromObject($result) ->merge($bubbleable_metadata); }

Now I check if the context is non-empty. In other words, did it catch some cacheability metadata from something that did early rendering? If it did, I get the captured cacheability metadata with $context→pop() and merge it with my \Drupal\Core\Cache\CacheableDependencyInterface object which will be returned. BubbleableMetadata is a helper class for dealing with cacheability metadata. This merge part may look different depending on your context, but the idea is to incorporate it into the response somehow. Take a look at the static methods in \Drupal\Core\Render\BubbleableMetadata  and its parent class for\Drupal\Core\Cache\CacheableMetadata some helpers to merge your cacheability metadata.

Really wrapping up

That was a heavy, long, complex debug session. I learned a lot digging into it and I hope you did as well. Let me know in the comments if you’ve ever run into something similar and came to a resolution in a different way. I’d love to continue furthering my understanding.

While it was great to figure this out, I was left wanting a better DX. In particular, improving the fact that Drupal auto-magically handles early rendering in some cases, but not others. There is also the odd workaround to capture cacheability metadata when cacheability metadata when calling $node→url() that could use some work. A quick search on the issue queue told me I wasn’t alone. Hopefully, with time and consideration, this can be made better. Certainly, there are good reasons for the complexity, but it would be great to balance that against the DX to avoid more epic debug sessions.

Acknowledgements

OSTraining: How to use Search API Solr Search in Drupal 8

Mié, 08/22/2018 - 14:00

Apache Solr is a very popular open source search platform, based on the Java Lucene Library. Solr is very stable, scalable and reliable and provides a wide set of core search functions. Solr creates an index of the available documents and then you can query Solr to return the most relevant ones for your search.

For Drupal users, it is possible to integrate your site with Solr. The Search API Solr Search module (yes, that name is a mouthful!) provides a Solr backend for the Drupal Search API module.

This tutorial will deal with the integration between Drupal and the Solr platform. Before you begin, you will need to have installed Apache Solr on your server. 

Chromatic: Selling Code

Mié, 08/22/2018 - 10:24

A pull request is like a product looking for a buyer. Are you selling yours effectively?

Mediacurrent: Website Accessibility F.A.Q.s [Video Recording and Transcript]

Mié, 08/22/2018 - 09:04

At Mediacurrent, we hear a lot of questions — from the open source community and from our customers — about website accessibility. What are the must-have tools, resources, and modules? How often should I test? To address those and other top FAQs, we hosted a webinar with front end developers Ben Robertson and Tobias Williams, back end developer Mark Casias, and UX designer Becky Cierpich.

The question that drives all others is this: Why should one care about web accessibility? To kick-off the webinar, Ben gave a compelling answer. He covered many of the topics you’ve read about on the Mediacurrent blog: introducing WCAG Web Content Accessibility Guidelines, some the benefits of website accessibility (including improved usability and SEO) and the threats of non-compliance.

Adam Kirby: Hi everybody, this is Adam Kirby. I'm the Director of Marketing here at Mediacurrent. Thanks everyone for joining us. Today we're going to go over website accessibility frequently asked questions. 

Our first question is: 

Are there automated tools I can use to ensure my site is accessible and what are the best free tools? 

Becky Cierpich: Yes! Automated tools that I like to use —and these are actually all free tools— are WEBAIM’s WAVE tool, you can use that as a browser extension. There's also Chrome Accessibility Developer Tools and Khan Academy has a Chrome Plugin called Tota11y. So with these things, you can get a report of all the errors and warnings on a page. Automated testing catches about 30 percent of errors, but it takes a human to sort through and intellectually interpret the results and then determine the most inclusive user experience. 

What's the difference between human and automated testing? 

Becky Cierpich: Well, as I said, the automated tools can catch 30 percent of errors and we need a human on the back end of that to interpret. And then we use the manual tools, things like Chrome Vox or VoiceOver for Mac, those are some things you can turn on if you want to simulate a user experience from the auditory side, you can do keyboard only navigation to simulate that experience. Those things will really help you to kind of drive behind the wheel of what another user's experiencing and catch any errors in the flow that may have come from, you know, the code not being up to up to spec. 

Then we also have color contrast checkers. WEBAIM has a good one for that and all these are free tools and they can allow you to test one color against another. You can verify areas that have too little contrast and test adjustments that'll fix the contrast. 

What do the terms WCAG, W3C, WAI, Section 508, and ADA Title III mean? 

Mark Casias: I'll take that one - everybody loves a good acronym. WCAG, these are Web Content Accessibility Guidelines. This is the actual document that gives you the ideas of what you need to change or what you want to a base your site on. W3C stands for World Wide Web Consortium - these are the people who control the web standardization. WAI is the Web Accessibility Initiative and refers to the section of the W3C that focuses on accessibility. 

Finally, Section 508 is part of the Rehabilitation Act of 1973, well it was added to that act in 1998, to require Federal agencies to make their electronic and IT  accessible to people with disabilities. ADA Title III is part of the Americans with Disabilities Act which focuses on private businesses, it mandates that they need to be fully accessible to individuals with disabilities. 

 What are the different levels of compliance? 

Tobias Williams: Briefly, the WCAG Web Content Accessibility Guidelines tell us that there are three levels - A, AA, and AAA, with AAA being the highest level of compliance. These are internationally agreed to, voluntary standards. Level A has the minimum requirements for the page to be accessible. Level AA builds on the accessibility of level A, examples include consideration of navigation placement and contrast of colors. Level AAA again builds on the previous level - certain videos have sign language translation and improved color contrast. 

To meet the standard of each level there are 5 requirements that are detailed on the WCAG site. Every every actionable part of the site has to be 100% compliant. WCAG doesn't require that a claim to a standard be made, and these grades are not specified by the ADA but are often referenced when assessing how accessible the site is.

Should we always aim for AAA standards?

Ben Robertson: How we approach it is we think you should aim for AA compliance. That's going to make sure that you're covering all the bases. You have to do an internal audit of who are your users and what are your priorities and who you're trying to reach. And then see out of those, where do the AAA guidelines come in and where can you get the biggest bang for your buck? I think that the smart way to do it is to prioritize. Because when you get to the AAA level, it can be a very intense process, like captioning every single video on your site. So you have to prioritize. 

What Drupal modules can help with accessibility?

Mark Casias: Drupal.org has a great page that lists a good portion of these modules for accessibility.  One that they don't have on there is the AddtoAny module that allows you to share your content. We investigated this for our work on the Grey Muzzle site and found this was the most accessible option. Here are some other modules you can try:

  • Automatic Alternative Text -The module uses the Microsoft Azure Cognitive Services API to generate an Alternative Text for images when no Alternative Text has been provided by user.
  • Block ARIA Landmark Roles -Inspired by Block Class, this module adds additional elements to the block configuration forms that allow users to assign a ARIA landmark role to a block.
  • CKEditor Abbreviation - Adds a button to CKEditor for inserting and editing abbreviations. If an existing abbr tag is selected, the context menu also contains a link to edit the abbreviation.
  • CKEditor Accessibility Checker - The CKEditor Accessibility Checker module enables the Accessibility Checker plugin from CKEditor.com in your WYSIWYG.
  • High contrast - Provides a quick solution to allow the user to switch between the active theme and a high contrast version of it. (Still in beta)
  • htmLawed  - The htmLawed module uses the htmLawed PHP library to restrict and purify HTML for compliance with site administrator policy and standards and for security. Use of the htmLawed library allows for highly customizable control of HTML markup.
  • Siteimprove - The Siteimprove plugin bridges the gap between Drupal and the Siteimprove Intelligence Platform.
  • Style Switcher - The module takes the fuss out of creating themes or building sites with alternate stylesheets.
  • Text Resize - The Text Resize module provides your end-users with a block that can be used to quickly change the font size of text on your Drupal site.
At what point in a project or website development should I think about accessibility? 

Becky Cierpich: I got this one! Well, the short answer is always and forever. Always think about accessibility. I work a lot at the front end of a project doing strategy and design. So what we try to do is bake it in from the very beginning. We'll take analytics data and then wecan get to know the audience that way. That's how you can kind of plan and prioritize your features. If you want to do AAA features, you can figure out who your users are before you go ahead and plan that out. Another thing we do is look at personas. You can create personas that have limitations and that way when you go in and design. You can be sure to capture those people who might be challenged by even things like a temporary disability, slow Internet connection or colorblind - things that people don't necessarily even think of this as a disability.

I would also say don't worry if you already have a site and you know, it's definitely not compliant or you're not sure because Mediacurrent can come in and audit, using the testing tools to interpret and prioritize and slowly you can get up speed over time. It's not something that you have to necessarily do overnight. 

How often should I check for accessibility compliance? 

Tobias Williams: I’ll take this one - I also work on the front end, implementing Becky’s designs. When you're building anything new for a site, you should be accessibility testing. test work, During cross-browser testing, we should also be checking that our code meets the accessibility standards we are maintaining.

Now that's easy to do on a new cycle because you're in the process of building a product that currently exists. I would say anytime you make any kind of change or you're focused on any kind of barrier of the fight, I would run a quick accessibility check. And then even if you don't address the changes straight away or at least you're aware of that, you can document them and work on them later. As far as an in-production site where you have a lot of content creators, or where independent groups work on features it is also a good idea to run quarterly spot checks. 

I've seen these on a few sites, but what is an accessibility statement and do I need one?

Becky Cierpich: An accessibility statement is similar to something like a privacy agreement. It's a legal document and there are templates to do it. It basically states clearly what level of accessibility the website is targeting. If you have any areas that still need improvement, you can acknowledge those and outline your plan to achieve those goals and when you're targeting to have that done. It can add a measure of legal protection while you're implementing any fixes. And if your site is up to code, it's a powerful statement to the public that your organization is recognizing the importance of an inclusive approach to your web presence. 

What are the legal ramifications of not having an accessible website? 

Ben Robertson: I'll jump in here, but I just want to make a disclaimer that I'm not a lawyer. Take what I say with several grains of salt! This whole space is pretty new in terms of legal requirements. The landmark case was  Winn-Dixie, the grocery store chain — it was filed under title III of ADA Act and they lost. It was brought up by a blind customer who could not use their website. The court order is available online and it's an interesting read but basically, there were no damages sought in the case. The court ordered that

they had to have an accessibility statement that said that they would follow WCAG 2.0. That's a great refresh for site editors to make sure that they're following best practices. They also mandated quarterly automated accessibility testing. 

I really think if you have these things in place already, you're really gonna mitigate pretty much all your risk. You can get out in front of it if you have a plan. 

If I have an SEO expert, do I need an accessibility expert as well? 

Tobias Williams: I'll explain what we do at Mediacurrent. We don't have one person who is an expert. We have a group of people. We have several developers, designers and other people on the team who are just interested in the subject and we meet once a week, we have a Slack channel where you just talk about accessibility. There are people who are most familiar with different aspects of it and that allows us to be better rounded as a group. 

I can see somebody being hired to be an accessibility expert but I think that the dialogue within a company about this issue is most important. The more people who are aware of it, the better. You can prevent problems before they occur. So, if I'm aware of the accessibility requirements of an item building, I'm going to build it the right way as opposed to having to be reviewed by the expert and then making changes. The more people who are talking about it and were involved in it and I'm the general level of knowledge, it goes a long way. We don't need to have experts as much as we need to have interested people. 

As a content editor, what's my role in website accessibility?

Mark Casias: Your role is very important in website accessibility. All the planning and site building that I do [as a developer] won't mean a thing if you don't attach an image alt tag to your images or you use a bunch of H1 title tags because you want the font size to be bigger and things like that. Content editors need to be aware of what they're doing and its impact on accessibility. They need to know the requirements and they need to make sure that their information is. keeping the website rolling in the right direction. Check out Mediacurrent’s Go-To-Guide for Website Accessibility for more on how to do this. 

Some of the technical requirements for accessibility seem costly and complex. What are the options for an organization?

Ben Robertson: Yeah, I totally agree. Sometimes you will get an accessibility audit back and you just see a long list of things that are red and wrong. It can seem overwhelming. I think there's really a couple of things to keep in mind here is that one, you don't have to do everything all at once. You can create an accessibility statement and you can create a plan and start working through that plan. Two, it really helps to have someone with experience or an experienced team to help you go through this process. There can be things that are a very high priority that are very easy to fix and there can be things that may be a low priority.

You can also think about it this way: if you got a report from a contractor that something you're building was not up to code, you would want to fix that. And so this is kind of a similar thing. People aren't going to be injured from using your website if it's inaccessible but it's the right thing to do. It's how websites are supposed to be built if you're following the guidelines, and it's really good to help your business overall. 

How much does it cost to have and maintain an accessible site? Should I set aside budget just for this? 

Adam Kirby: You will want to set aside a budget to create an accessible site. It is an expense. You're going to have to do a little bit more for your website in order to make sure it's successful. You're going to have to make changes. How much does it cost? That will vary and depend on where you are with your site build; if it’s an existing site, if you're launching a new site, the amount of content on your site and the variability of content types. So, unfortunately, the answer is it just depends. 

If you need help with an accessibility audit, resolving some known issues on your site, or convincing your leadership to take action on website accessibility, we’re here for you.  

Webinar Slides and Additional Resources  Website Accessibility FAQs by Mediacurrent 

Drop Guard: Feature close-up: Time schedule of actions

Mié, 08/22/2018 - 07:45
Feature close-up: Time schedule of actions

A successful day can be interrupted uncomfortably by recently released updates. Some of us process updates immediately, others wait for their client’s or manager’s feedback and some teams schedule them regularly on a specific day. So, when it comes to update automation with Drop Guard, our users should be able to apply their current schedule workflow as well.

To cover these individual schedule needs, we provide the “Time schedule of actions” feature on the “Events” tab of your project’s config setting site.

Within this post, you will learn how to benefit from this feature.

 

Drupal Planet Drupal features announcements

hussainweb.me: Drupal Meetup Bangalore – August 2018

Mié, 08/22/2018 - 03:23
This month’s Drupal meetup was held at 91Springboard in JP Nagar. We held this meetup early instead of our usual last Saturday of the month due to a long weekend.

Evolving Web: Drupal Admin UX Study: the Survey Results Are In!

Mar, 08/21/2018 - 16:22

The administrative interface for Drupal is notoriously intimidating for content editors who are new to the platform. I do a lot of training for Drupal content editors and administrators and have witnessed this first-hand. I've written and spoken in the past about how site builders can improve the user experience for content editors by making configuration changes. However, there are lots of improvements that could be made to Drupal out-of-the-box.

I’m working with the Admin UX User Study group in the Drupal community. We're doing user research to help inform improvements to the Drupal admin UI. Our goal is to make Drupal an amazing platform for site administrators. Our first priority is the user experience of content editors.

We started by conducting a survey to look at how content editors use Drupal now and the challenges and pain points they face. So far, we've had 260 submissions to the content editor survey and have some interesting results to share!

What’s rewarding about using Drupal?

We asked content editors about the rewarding aspects of using Drupal. Almost every response included the adjectives flexible and customizable. Editors like that Drupal allows them to have control over their content.

What’s challenging about using Drupal?

While our respondents tended to agree about why they like Drupal, they had many different answers when we asked them about the challenges they face.

Many respondents voiced the paradox that the flexibility of Drupal and the customization that it allows also makes the interface complex and a challenge to use. Content editors specifically mentioned that the UI provided by paragraphs and panels adds a lot of complexity.

Content editors talked about the challenges of finding documentation, working with media, understanding jargon and technical terminology, and finding what content to edit. A couple respondents mentioned that adding content translation to the mix further complicates the content editing interface.

What can we improve about the content editorial experience?

Good news! The things that content editors want to improve about Drupal are mostly areas where the community is already working. The most common improvement suggested was providing a more modern UI, which is exactly what the Drupal Admin UI Initiative is focusing on.

Not surprisingly, it seems that content editors want a better experience on the content overview page, the content editing page, and the tools available on those pages, like media management, page-building tools (e.g. paragraphs and panels), and WYSIWYG.

Here are the highlights of what content editors suggested:

  • A more modern UI. Several content editors mentioned WordPress with Gutenberg and SquareSpace as examples of a more modern UI to emulate.
  • Simplifying the complexity of the content editing UI. This is particularly challenging when the editing experience is actually a page building experience, like when sites have paragraphs, panels, or the layout builder module enabled.
  • Better media management. Content editors mentioned file versioning, asset libraries, and cited WordPress as an example of a good media management experience.
  • Improvements to the WYSIWYG editor. Several content editors mentioned specific improvements they would want to see, including auto-save.
  • More role-based configuration for content editors. Some content editors mentioned adding a special menu for content editors.

As a site builder, it’s interesting to note that a lot of pain points that respondents mentioned in the survey could be fixed with configuration changes. For example, reducing the permissions for content editors, giving them access to an admin menu with a limited set of options, and customizing some of the default widget settings. This means that maybe by configuring a role for content editors out-of-the-box, and tweaking some of Drupal's default configuration, we might be able to easily improve the content editing experience.

Another interesting note: no one mentioned a complete overhaul of the information architecture. Re-organizing all the items in the admin menu doesn't seem to be a top priority.

Tell me your story!

We also asked content editors what type of tasks they do on their sites. We gathered a lot of stories. Many self-ascribed content editors do site building and advanced admin tasks as well. A good reminder that the classic Drupal personas that we might have in mind, like site builder, content editor, and developer are probably too rigid. A lot of content editors do have full access to all the complexity of the Drupal admin UI.

What’s next?

We are an ambitious bunch with lots of ideas about what to do next! Our next steps are to do some initial user testing, and an online card sorting exercise.

We're planning to start the user testing with a smaller group of content editors. Our testing will include:

  • Testing the new admin UI wireframes that are being developed by the admin UI initiative
  • Doing a comparative study of the content overview, content edit pages and media management tools in other CMS’s to gather data about what aspects users like and what we can apply to Drupal
  • Later, a comparative study looking at page building tools

We’ll also do an online card sort exercise to gather information about how content editors would classify the stories that we gathered in the survey. This will help us generate suggestions for how to organize the information architecture of the admin UI in a more content editor-centric way.

I want a better admin UI now!

The team working on the Admin UX User Study includes Sarah Lowe, Michelle Jackson, Cristina Chumillas, Antonella Severo, and Roy Scholten. We need help recruiting content editors, planning and conducting user testing, and processing results from the tests, so please reach out to us on the #admin-ui channel on the Drupal slack if you want to help out. 

We’re excited about how the community will use the results of the user testing! Let us know if you have ideas for what we should be testing now and in the future.

+ more awesome articles by Evolving Web

OpenSense Labs: Addressing Drupal 8 Migration Challenges

Mar, 08/21/2018 - 08:48
Addressing Drupal 8 Migration Challenges Shankar Tue, 08/21/2018 - 17:18

The term ‘Migration’ accompanies itself with manifold thoughts into a person’s mind. A politics aficionado may talk about refugees who have migrated to another country for a new lease of life. On the flip side, a bird watcher would be keenly keeping track of migratory birds. In this digital age, a business analyst may think of challenges that come with the upgrade of the Drupal-powered website to a newer version.

OpenSense Labs: Addressing Drupal 8 Migration Challenges

Mar, 08/21/2018 - 08:48
Addressing Drupal 8 Migration Challenges Shankar Tue, 08/21/2018 - 17:18

The term ‘Migration’ accompanies itself with manifold thoughts into a person’s mind. A politics aficionado may talk about refugees who have migrated to another country for a new lease of life. On the flip side, a bird watcher would be keenly keeping track of migratory birds. In this digital age, a business analyst may think of challenges that come with the upgrade of the Drupal-powered website to a newer version.

Drupal.org website is powered by Drupal 7 and has not been upgraded to Drupal 8 yet! So, what’s the challenge?


For a website to be a high performing space, it is imperative to upgrade to the stable release of the content management system like Drupal. With Drupal 6 already having reached its End of Life in 2016, Drupal 7 and Drupal 8 have been the go-to versions for businesses. 

Drupal 8 would be supported by the community at large for a long time to come even after the Drupal 7 is no longer a community supported release on Drupal.org.

Therefore, upgrading to Drupal 8 would be a significantly important business decision with future in mind. But the trials and tribulations for a website in production have to be pondered over while migrating from Drupal 6 or Drupal 7 to Drupal 8.

What should you know before migrating to Drupal 8?

Ever since Drupal 8 was launched, it has been a commendable CMS with stupendous flexibility, enhanced scalability, and accentuated web performance. This has been the driving factor for the businesses wanting to migrate to this improved version of Drupal. Being built around newer technologies like Symfony and Twig, migration process from Drupal 6 or Drupal 7 to Drupal 8 can be attained successfully.

Upgrading to Drupal 8 would be a significantly important business decision with future in mind. Source: Mobomo

Migration process is not a pushover with issues surrounding data migration and module shifts. It is, therefore, a good approach to be better prepared beforehand to reduce any sort of trouble later on after migration.

Complete theme revamping

After the migration, the site is going to look a lot more different in Drupal 8 than what it originally looked like in Drupal 6 and Drupal 7. This is because the themes and templates that are used in the older version are completely different. So, migration would lead to enormous amount of rework on themes.

Information architecture advancement

The efficacy in building more future-focussed applications would be facilitated by the move to migrate to an advanced architecture. It may seem like an astronomical task in the beginning but it is the perfect way for you to assess your existing information architecture. 

Updating the information architecture would not mean that the older version goes obsolete. Instead, it would spell the duplication of your older version into Drupal 8 and performing the fixes based on the new needs. For instance, it allows you to analyse the fields and modules that may not be in use for a while and improve the ones not performing well or even remove them completely.

More emphasis on native OOPS feature of PHP

Object-Oriented Programming (OOPS) concept has also been an integral part of Drupal integrated with the design system. Drupal 8 promotes OOPS features by putting more focus on its importance. Modules, themes, nodes and users are some of the Drupal components that fit the description of an ‘object’.

Increased focus on Drupal 8 core and mobile-first approach

Unlike contributed modules in Drupal 7, core functionalities have been emphasised in Drupal 8. Also, the user interface and the user experience in Drupal 8 are designed to meet mobile user’s needs for maintaining the mobile-friendliness.

Major Issues while upgrading from Drupal 6 or Drupal 7 to Drupal 8

Migrate, Drupal module, comes with the Drupal 8 core which gives a flexible framework for migrating content. But there are certain issues that creep in during migration that needs to be managed.

The trials and tribulations for a website in production has to be pondered over while migrating from Drupal 6 or Drupal 7 to Drupal 8.


What are the major hurdles that have to be taken care of during migration? The primary considerations that have to be handled are listed below:

1. SEO migration

Site migration can lead to a temporary loss of traffic as the search engines would need time to update its index accordingly. Thus, even if some SEO tags or URLs are missing after migration, it can lead to negative impact on website’s SEO rankings. 

2. Content migration

Challenges may be faced during content migration. For instance, duplication of content might happen or you might notice some missing content. Moreover, in case, content is using some of the fields created using custom modules, field type will have to be created so that migration is successful.

3. View

One of the major issues that transpires while migrating is the unsuccessful translation of a Drupal core module called Views. It requires an upgrade path for any views that are defined in a Drupal 6 or 7 site and you need to manually create views in Drupal 8 after migration.

Views are entity-based in Drupal 8 and have an entirely different architecture. Most of the functionalities are same but there have been major improvements done related to cache and security.

4. Custom module

Custom modules would have to be rebuilt post migration.  Modules in Drupal 6 and Drupal 7 were based on APIs, hook and helper function provided by Drupal core but in Drupal 8 all the modules are based on Symfony. Most of the hooks and helper functions have been replaced with services and development is mostly based on OOPS principles. There isn’t any sort of backward compatibility in modules and that is why they have to be rebuilt in Drupal 8.

5. Contributed modules

In case, contributed modules provide an upgrade path, data stored by Drupal 7 version of that module is also migrated to Drupal 8. If the Drupal 8 port is not available, then a functionality has to be built or the module has to be ported to Drupal 8.

6. Themes

PHPTemplate has been replaced by Twig as the default templating engine in Drupal 8. So, themes would have to be rewritten after migration.

All the PHPTemplate files have to be replaced with the Twig files which means that developers can no longer write custom PHP code in templating files. Preprocess have to be written to modify the rendered output.

7. Node translation

Challenges can be faced during migration of a multilingual site to Drupal 8. Translations in Drupal 8 are stored in completely different way than in Drupal 7 and Drupal 6. Even the Drupal community is working actively on resolving issues in translation migration. To be on the safer side, one should be ready to migrate translation manually or add content again.

8. Specific websites factor

There will be issues with specific websites whose underlying built is not available for Drupal 8. For instance, ecommerce websites that are built on Drupal distribution Commerce Kickstart, which is not on Drupal 8, won’t be able to upgrade. On the contrary, a social intranet developed using Drupal distribution Open Social, which is available on Drupal 8, will be able to upgrade.

This is how we check Drupal 7 to Drupal 8 compatibility!
We have designed a Drupal 7 to Drupal 8 estimation tool that minimises manual audit effort to a great extent. All you need to do is to install our module called Drupal 8 upgrade estimate and get a quick report to better understand what you want.

Technical Issues

There are some more technical issues that are specific to Drupal 6 to Drupal 8 migration and Drupal 7 to Drupal 8 migration. What are they?

Migrating from Drupal 6 to Drupal 8
  • Aggregator categories would not be required to be migrated.
  • Changing the variable "filter_allowed_protocols" would require entering it into services.yml file.
  • Taxonomy term reference field settings have to be manually edited
  • Fields may not be visible on the edit form and the node view after the migration.
  • A web page may only load a few times which will seem like a broken theme
  • The menu_primary_links_source and menu_secondary_links_source variables are not migrated.
  • New modules and themes in addition to admin theme (if there is one set) must be enabled before proceeding with the migration.
  • Revisions of translated nodes are still not migrated.
  • Fields grouped by the Profile module in Drupal 6 won’t be grouped in Drupal 8.
  • The combination of selected user values and the current allowed values will comprise the “allowed values” setting of the resulting field in Drupal 8.
  • Drupal 8 core does not support PHP filter
  • A date could be interpreted differently due to time zones issue
  • URL aliases won’t work until language on new Drupal 8 site is enabled
Migrating from Drupal 7 to Drupal 8
  • Taxonomy term reference field settings have to be manually edited.
  • Migration of id column from Drupal 7’s ban_ip not successful
  • Issues with comment types can be seen.
  • Drupal 8 core does not support PHP filter
  • Issues with plain text fields can be observed
Case Studies

An actual Drupal upgrade case study would depict the challenges occurred and the measures taken to tackle them.

Drupal 6 to Drupal 8

The Anxiety and Depression Association of America (ADAA) is an international non-profit organisation. Their website was built on Drupal 6 which was in dire need of an upgrade.

The ADAA organisation wanted to incorporate a rich and modern user experience, better security and a brand image modernisation. So, in 2015, they opted for a brave decision as to choose Drupal 8, which was on the cusp of its official release, over Drupal 7.


The efficaciousness of Drupal

Drupal 8 was selected for its extensive support towards accessibility standards. It was more suited to meet their intricate requirements in comparison to other content management systems like WordPress and Joomla.

Project challenges and countermeasures

After the migration was performed, the new website encountered two issues for the word-go. First and foremost, the cornucopia of legacy content that was required to be imported and re-cast in the new, restructured format was a herculean task. 

Although the existing import module at the time worked for most of the content that it supported, some key areas created issues while manipulating media files. Thus, the module was extended with custom methods that allowed to enable the export process to be performed with an absolute efficacy.

Secondly, delivering an administrative interface, that could enable structured content to be edited logically, was a formidable task. This led to significant investment in new tools and difficulties in adapting to the new Drupal 8 framework. The hurdle was overcome successfully and new modern features could be delivered rapidly and effectively.

Drupal 7 to Drupal 8

SUNY Oneonta, member of the State University of New York, had public-facing site which was operated on the base of a Drupal 7 installation. The site did not adhere to best practices or standards in coding, theming or the architecture.

Interruptions in the services, downtimes, and the difficulties while migrating key pages into the responsive Drupal environment proved troublesome in the college’s recruitment efforts.


Taking a plunge into Drupal

Previous website neither had a stable environment nor addressed the underlying architectural drawbacks. Being Drupal savvy, SUNY Oneonta were eager to migrate from their existing setup in Drupal 7 to Drupal 8.

Project objectives

The most important objective was to revamp their public-facing website and leverage the capabilities of Drupal 8.

  • Retain the existing Drupal 7 website design and upgrade to a functional responsive design
  • Retain most of the Drupal 7 navigation structure
  • Ensure that there is very less or no downtime in addition to flexibility for future enhancements
  • Betterments in the workflow, underlying architecture, user experience, translatability and accessibility
  • Launch the website at the stipulated time frame of 5 months

Project outcome

The results were staggering with faster performing site, on-point informative content and much better search results. In addition to this,

  • Adhered to the project budget with the retention of current brand and general site design.
  • Reduction in the count of content types from 21 to 10 in addition to the number of nodes from 3000 to less than 1100.
  • Usage of views and other such standard Drupal implementation methods for the listicles involving items and featured content.
  • Reduction in the redundancy of template file functionality
  • Enhanced flexibility for permitting future alterations to the website content and structure.
  • Test content and some published content purged
  • Site was built on the basis of accessibility standards set by Federal Section 508 Standards and New York State Policy NYS-P08- 005 in addition to being fully responsive across screens.
How will the upgrade from Drupal 8 to Drupal 9 happen?

Drupal community is working on the upgrade from Drupal 8 to Drupal 9. How will that transpire exactly? Old systems will be deprecated instead of being removed by encouraging the module maintainers to update to the new systems. That is, the modules and custom code will stay in working condition. More innovation will lead to more deprecated code in Drupal 8.

Over time, maintenance of backwards compatibility would become more intricate. Thus, point will be reached when too much of deprecated code is there in Drupal 8. At that time, deprecated systems will be removed and released as Drupal 9.

So, Drupal 9.0 should be almost similar to the last release of Drupal 8 excluding the deprecated code. Upgrading from Drupal’s latest version to Drupal 9.0.0 should be as streamlined as the upgrading of minor versions of Drupal 8 (eg. Drupal 8.5 to Drupal 8.6). Therefore, Drupal 9 offers a clean slate to innovate more swiftly.

Conclusion

Upscaling the digital business involves continuous improvement of online presence. One of the significant business decisions comes with the upgrading of website from the existing content management platform to its latest and improved version.

Drupal 6 or Drupal 7 to Drupal 8 migration is a worthy choice. Nonetheless it is challenging and involves migration issues that would require a lot of developmental effort. Businesses looking for a great future can benefit a lot by this brave decision which may look troublesome at the start but is essentially meritorious.

We provide upgrade assistance and help in understanding whether or not to migrate a business site to Drupal 8 or not. Contact at hello@opensenselabs.com to migrate to Drupal 8.

blog banner blog image Drupal migration Drupal Drupal 8 Drupal 9 Drupal 7 Drupal 7 to 8 Drupal 6 Drupal 6 to 8 SEO Migration Content migration Drupal Upgrade Drupal Migrate Drupal upgrade estimation Drupal module Drupal theme Blog Type Articles Is it a good read ? On

OPTASY: Drupal Project Management: Specific Challenges and Approaches

Mar, 08/21/2018 - 07:54
Drupal Project Management: Specific Challenges and Approaches admin Tue, 08/21/2018 - 10:54

Let me guess: you're a Drupal developer (temporarily) turned into a... Drupal project manager! Or maybe a PM new to Drupal, facing the challenge of your first Drupal project management assignment?

Have I guessed it?

Now the questions roaming in your head right now must be:
 

Agiledrop.com Blog: AGILEDROP: Migrate WordPress to Drupal

Mar, 08/21/2018 - 00:48
WordPress is the most popular and most widely used CMS in the market right now. It’s very versatile and easy to use, however it isn’t perfect for all scenarios. There might be instances where Drupal would be the preferred choice for a particular solution. There might also be a case where a user would need to migrate their WordPress site to Drupal. While this process isn’t quite streamlined due to the differences in the way both CMSs work, there is a pretty simple way to get started on this and migrate the bulk of your content to Drupal. In this post, let’s take a look at how this can be… READ MORE

Oliver Davies: Experimenting with events in Drupal 8

Lun, 08/20/2018 - 21:00

I’ve been experiementing with moving some of the code to Drupal 8, and I’m quite intrigued by a different way that I’ve tried to structure it - building on some of the takeaways from Drupal Dev Days.

Páginas