Drupal Planet

KnackForge: How to update Drupal 8 core?

5 miesięcy hence
How to update Drupal 8 core?

Let's see how to update your Drupal site between 8.x.x minor and patch versions. For example, from 8.1.2 to 8.1.3, or from 8.3.5 to 8.4.0. I hope this will help you.

  • If you are upgrading to Drupal version x.y.z

           x -> is known as the major version number

           y -> is known as the minor version number

           z -> is known as the patch version number.

Sat, 03/24/2018 - 10:31

Appnovation Technologies: SEO for Drupal Series, Part 1: Project Discovery and The Google Algorithm

5 godzin 9 minutes ago
SEO for Drupal Series, Part 1: Project Discovery and The Google Algorithm SEO for Drupal Part One - Project Discovery and The Google Algorithm In this new, fortnightly ‘A-Z of Drupal SEO and SEM’ series of Appnovation blog posts, we’ll see what it takes to turn a Drupal site into a traffic magnet, driving traffic growth and providing better Call to Action fulfillments without us...

Lullabot: React in Drupal Core?

11 godzin 32 minutes ago
Matt and Mike talk with Drupal core committter Lauri Eskola, Drupal JavaScript maintainers Théodore Biadala, and Matthew Grill, and Lullabot's own Senior Technical Architect Sally Young about adopting a front-end JavaScript framework, specifically React into Drupal core.

PreviousNext: Testing CSV output in Drupal 8 with BrowserTestBase

14 godzin 29 minutes ago
Share:

In a recent project we were outputting CSV and wanted to test that the file contents were valid.

Read on for a quick tip on how to achieve this with Drupal 8's BrowserTestBase

by Lee Rowlands / 20 October 2017

Basically, the easiest way to validate and parse CSV in PHP is with the built in fgetcsv function.

So how do you go about using that inside a functional test - in that instance we're not dealing with a file so its not your ordinary approach for fgetcsv.

The answer is to create a stream wrapper in memory, and use fgetcsv on that.

The code looks something like this:

$response = $this->getSession() ->getDriver() ->getContent(); // Put contents into a memory stream and use fgetcsv to parse. $stream = fopen('php://memory', 'r+'); fwrite($stream, $response); rewind($stream); $records = []; // Get the header row. $header = fgetcsv($stream); while ($row = fgetcsv($stream)) { $records[] = $row; } fclose($stream);

There you have it, you now have the header in $header and the rows in $rows and can do any manner of asserts that you need to validate the CSV generation works as expected.

Tagged Drupal 8, Testing, Functional Testing

Posted by Lee Rowlands
Senior Drupal Developer

Dated 20 October 2017

Add new comment

Drupal Association blog: Drupal Association Board Meeting Summary - 28 September, 2017

17 godzin 31 minutes ago

On 28 September 2017, the Drupal Association held its third open board meeting of the year where community members listened in via zoom and in person. You can find the meeting minutes, board materials, and meeting recording here.

The board meeting was kicked off by an update from Dries Buytaert, followed by an Executive update from Megan Sanicki, Executive Director, and a Drupal.org update from Tim Lehnen, Director of Engineering. We also thanked and celebrated Tiffany Farriss, Vesa Palmu, and Jeff Walpole whose terms on the board end in November.

Dries Buytaert moving from Chairman to Founding Director position

One of the key announcements made during the meeting came from Dries Buytaert, who announced that in response to the Community Discussions findings, he is stepping down from the Drupal Association Chairman position. He will remain on the board in the Founding Director position.  This will go into effect in November when board seats expire and Adam Goodman will step into the role as interim Chairman, which is also in response to the community’s request for a neutral, outside expert to lead the board. To learn more about the Community Discussions, go here.

Adam Goodman is a leadership professor from Northwest University in Chicago, Illinois, USA. He's advised the Drupal Association on and off for the past 8 years, helping us evolve from a volunteer board to a strategic board. In this role, Adam will further evolve the board so it can orient itself around a new chairman structure.

Since Adam is a paid consultant, the Drupal Association needs to change its bylaws to allow Adam to sit on the board and be paid for his service. In addition to this change, we are doing a general update of the bylaws to include:

  • Eliminate non-existent committees like the HR committee

  • Modernize the tools we can use for online voting. Today we can use teleconferencing, but we also need to be able to use video conferencing.

To learn more about this board meeting, please watch the recording and stay tuned for an update on other improvements we are making in response to the community’s input.

Drupal Association blog: Status of Speaker Agreement Violation

18 godzin 33 minutes ago

Our community does amazing things together and they deserve to have the best working environment for collaboration. At the Drupal Association, we strive to create these open and collaborative environments at DrupalCon and on Drupal.org.

We recently became aware that a community member violated our speaker agreement at DrupalCon. The Drupal Association removed the video from the DrupalCon event site and the Drupal Association YouTube channel and we are determining additional actions. The community member acknowledged that they broke the speaker agreement and is cooperating with the Drupal Association as we take action.

We apologize that this content was shared. It didn’t create the best environment for our community to thrive and we will do better. We are looking at ways to enhance our process to avoid situations like this from happening again.

We also heard from the community discussion findings that were provided this summer, that the community needs a better understanding of the roles and responsibilities for volunteers that work on Drupal Association programs. The Drupal Association is working to define what is expected of each role and policies for managing situations when expectations are not met. We are working on developing a clear outline of these and you can expect to see them finalized by February 2018.

Redfin Solutions: Pulling Salesforce Data in as Taxonomy Terms in D7

19 godzin 42 minutes ago
Pulling Salesforce Data in as Taxonomy Terms in D7

Salesforce Suite is a group of modules for Drupal that allows for pulling data from Salesforce into Drupal, as well as pushing data from Drupal to Salesforce. The module api provides some very useful hooks, including the _salesforce_pull_entity_presave hook implemented by the Salesforce Pull module. In this blog post, we’ll look at using that hook to pull three Salesforce custom fields (select lists) into Drupal as taxonomy terms in three vocabularies.

Christina October 19, 2017

Flocon de toile | Freelance Drupal: Filter content by year with Views on Drupal 8

1 dzień 2 godziny ago
It is not uncommon to propose to filter contents according to dates, and in particular depending on the year. How to filter content from a view based on years from a date field? We have an immediate solution using the Search API module coupled with Facets. This last module allows us very easily to add a facet, to a view, based on a date field of our content type, and to choose the granularity (year, month, day) that we wish to expose to the visitors. But if you do not have these two modules for other reasons, it may be a shame to install them just for that. We can get to our ends pretty quickly with a native Views option, the contextual filter. Let's discover in a few images how to get there.

Elevated Third: Elevated Third Wins 2017 Acquia Engage Award

1 dzień 18 godzin ago
Elevated Third Wins 2017 Acquia Engage Award Elevated Third Wins 2017 Acquia Engage Award Ayla Peacock Wed, 10/18/2017 - 12:04

At the 2017 Acquia Engage Conference, our enterprise web project for Pinnacol Assurance won the Financial Services category. As an Acquia Preferred Partner and sponsor of the Acquia Engage conference, we are thrilled to have been ranked beside the world's top Drupal websites. 

Pinnacol.com launched in December of 2016. As Colorado’s leading workers compensation insurer, Pinnacol Assurance needed a Drupal website design that reflected the company’s commitment to first-class service.

Built on Drupal 8, we launched a brand new enterprise content management system, created a one-of-a-kind knowledge hub, and revamped the site’s user experience interface.

“The Pinnacol project was lengthy and complex, we had very specific problems that required creative solutions. Elevated Third developed a high performing, enterprise-level website that continues to exceed our expectations.”

- Hilary Miller, Brand and Marketing Director, Pinnacol Assurance

This year, five of our Drupal websites were finalists in the annual Acquia Engage competition. Partners and customers submitted more than 200 nominations across 17 categories to the program. Our Drupal work ranked in the following categories. 

Powdr Corporation, Digital Experience Finalist

Denver Botanic Gardens, Nonprofit Finalist

Comcast Technology Solutions, Brand Experience Finalist

Firewise USA, Community Finalist

Pinnacol Assurance, Financial Services Winner

“Winning sites set themselves apart in how they grabbed our attention and made us want to learn more,” said CMSWire’s Dom Nicastro, one of the award program jurors. “The first thing I looked for were search and commerce capabilities. It's a Google and Amazon world that we live in. No one comes to a website just for a pretty design, and no one remembers a red call-to-action button versus a blue one. Sites that deliver excellent search and easy transactional experiences won for me.”

Congratulations to all the 2017 Acquia Engage winners!