Planet Drupal

Subscribe to flux Planet Drupal
Drupal.org - aggregated feeds in category Planet Drupal
Mis à jour : il y a 54 min 21 sec

3C Web Services: How to: Drag & Drop Multiple Image Upload for Drupal 7

ven, 19/12/2014 - 19:26

Drupal 7 provides a file field that allows for uploading files and images to your Nodes but it is limited in functionality. The core file field only allows for uploading one file at a time and does not permit drag and drop functionality. Hower, with a few modules and a little bit of configuration we can easily provide this functionality to your site.

MODULES

First download and install the following modules:

Catégories: Elsewhere

Drupal Association News: Meeting Personas: The Drupal Master

ven, 19/12/2014 - 18:00

This post is part of an ongoing series detailing the new personas that have been drawn up as part of our Drupal.org user research.

Chris Luckhardt is a familiar face in the North American Drupal scene. An active member of the Toronto Drupal community and a frequent attender of camps, meet-ups, conventions, and more, Chris is a Drupal master in many ways, and an expert in others.

“I’m a Drupal specialist and I do photography on the side,” Chris says of himself. “I tend to do a lot of everything, which is why I call myself a specialist — because I specialize in different elements of Drupal. My favorite areas of Drupal are site building, dev-ops, and front-end development, and I do a lot of agile and scrum project management."

An Industry Veteran

Chris began his Drupal journey with Drupal 6, back in 2008. He’d already worked in web technology for a while, like with Microsoft's proprietary ASP and C#, dabbled in open source products like PHP, and worked with Linux, Apache, and mySQL.

“I knew that open source values aligned very well with my personal philosophies,” Chris said. “I’d worked on some proprietary software, and by the time I’d finished one particularly bad DotNetNuke project I decided I was going to move on in my career and go totally open source. Around that time, Drupal 6 came out and it coincided with a DrupalCamp Toronto event that was happening. It must have been Toronto's third or fourth DrupalCamp. James Walker, who had a hand in forming the Toronto Drupal group, was there, and I talked to him about what I was looking for in an open source solution to work with. He said, 'yeah this is the right option based on everything you’ve told me,’ and that was how I got started. I’ve considered him a mentor for years.

“I took the time to learn Drupal properly,” Chris continued. “I went to a few Lullabot workshops back in the day, took on some projects, and the rest is history. We all started at one point,” he said of his fellow Drupal users.

“For me, learning things the Drupal way was the biggest challenge, as opposed to coming in and doing some PHP coding. What helped me learn — and what helps me to this day —  is the user group meetings. I think by far being involved in the community is the most important thing. It's the gateway — asking questions and seeing presentations is really valuable. Of course, the issue queue is the best way to self-learn, but in my opinion the best learning happens from talking to people, because someone has stumbled across your problem before."

Drupal: Powered by People

Chris has been active in Drupal for years, both professionally and in the larger Drupal community. “Come for the code, stay for the community is the number one reason why I use Drupal,” Chris said. “There are so many other amazing developer communities out there, like PHP, HTML5, Javascript, Angular... I’ve dabbled in all of those and they’re all fantastic, but there’s just something about our community that is very representative of open source technology and community building."

When it comes to that community, Chris is concerned about how to grow it both locally and globally. “We have a very specific problem here in Toronto, but I think everyone has dealt with it too. We have a batch of old-school Toronto Drupal user group members who date back to 05-08, and we have an influx of new people. This means we have a set of introductory and beginner users — you know, people who come in like, “what’s a Drupal?” — and then we have the advanced users branching into all sorts of wild territory with Drupal.

"It’s hard to cater to both groups in one meet-up and even at our DrupalCamps that we plan every year. We recognize, if we try to cater to the introductory users we’ll turn away the advanced users, and they won’t be interested in coming out, but if we do really advanced sessions and training at our meet-ups, the new people show up and they won’t have any idea what’s going on.

“Between James and myself, we decided to address the problem by doing an introductory presentation and then a more advanced presentation during our meetups. For bigger events, it’s a little different. I created the schedule at the last DrupalCamp, and I engineered it so that there would be enough difference between overlapping session timeframes that it would work to the benefit of both the introductory and the advanced attendees…though unfortunately there's not much middle ground."

Linguistic Barriers to Entry

Chris’ other observation about problems with growing Drupal is the language barrier. “I was presenting at a DrupalCamp in Kyoto, and someone raised his hand and said, 'I want to learn Drupal, but I don’t understand Views. How do I learn it?’ So I told him that there are tons of tutorials on YouTube, and he responded, 'But...they are all English.' It occurred to me that those videos show you what to do, but if you don’t understand the spoken information -- why would I click this button, why would I do that -- the vocalization aspect is incredibly important. So there’s a real serious lack of Japanese documentation for people to learn Drupal— and not just Japanese, other languages, too. There’s some work being done by the Japanese community organizers around translating some of the books, like Emma Jane and Angie’s books, so it’s a start.

“So, the biggest challenge I see with Drupal and Drupal.org is how to manage the education… And, actually, sometimes I feel bad about calling myself a Drupal master because the learning curve never stops. It only becomes less dramatic with years of experience."

To see how we plan to address some of the challenges Chris has identified, keep an eye out for conclusion to our Personas series, or look at the results of the user research we’ve performed on Drupal.org.

Personal blog tags: drupal.org user researchpersona interviews
Catégories: Elsewhere

LevelTen Interactive: Video: Better Content Formatting Using CK Editor, Bootstrap & Drupal

ven, 19/12/2014 - 17:56
*/ /*-->*/

Creating and promoting content is crucial for your business, and it can be very frustrating at times.... Read more

Catégories: Elsewhere

Annertech: Code that makes Programmers Perform

ven, 19/12/2014 - 16:36
Code that makes Programmers Perform

Code that performs well should be an assumption, not a requirement. I've never had a client ask me, “will your code make my site run slower?" Clients just assume that I'm going to deliver a codebase that does not hold things up.

Catégories: Elsewhere

Mediacurrent: New Year's Resolutions: Drupal Edition

jeu, 18/12/2014 - 22:46

Lose weight. Eat better. Run a 5K. Travel more. These are resolutions we all make year after year. But this year, we challenged our team to think outside the box and inside the drop. Now that 2014 has come and gone, and we prepare to countdown to 2015, we asked our team what they are looking to accomplish in Drupal in the New Year.

“Get more of my modules out for D8.” - Andrew Riley

Catégories: Elsewhere

Drupal Watchdog: At Your Request

jeu, 18/12/2014 - 19:29
Feature

In the beginning there was the Common Gateway Interface, commonly known as CGI – a standard approach used to dynamically generate web pages. Originally devised in 1993 by the NCSA team and formally defined by RFC 3875 in 2004, CGI 1.1 took seven years to go from the original RFC to an endorsed standard.

In 1994, not long after the original CGI standard was documented by NCSA, Rasmus Lerdorf created Personal Home Page tools (PHP Tools), an implementation of the Common Gateway Interface written in C. After going through a number of iterations and name-changes this grew to be the PHP language we know and love.

One of PHP's strengths was the way in which it made many of the request and server specific variables, as defined by the CGI standard, easy to access – through the use of superglobals, namely $_POST, $_GET, and $_SERVER. Each of these is an associative array. In the case of $_POST, the request body is parsed for you and turned into an array of user-submitted values, keyed by field name, and conveniently supporting nested arrays. Similarly for $_GET, the query string is parsed by PHP and turned into a keyed array. In the case of $_SERVER, the gamut of server-specific variables are available for your script to interrogate.

Catégories: Elsewhere

Blink Reaction: Try Drupal 8 now

jeu, 18/12/2014 - 19:08

You may have heard and read a lot about Drupal 8 lately, without much support to go along with it. Well here at Blink Reaction, we are working on changing that and contributing as much help as we can to the community with the issues that we’ve come across so far in Drupal 8. In this post I will show you how you can try Drupal 8 by installing dependencies such as composer and drush so you can have a Drupal 8 site running on your local machine.

Catégories: Elsewhere

Cheeky Monkey Media: My BADCamp 2014 Experience

jeu, 18/12/2014 - 18:00

I have been privileged to be able to attend a number of conferences and events, such as DrupalCon Austin, Portland etc,  since we started Cheeky Monkey Media. In the past, we’ve talked about having your DrupalCon Survival kit prepared before you head out the door to help make...Read More

Catégories: Elsewhere

Bluespark Labs: Failure to Launch

jeu, 18/12/2014 - 16:52

We’ve all been there. The clock is ticking down to launch and the issues keep mounting.

Some issues are launch critical, but many of them could wait until after the site has been launched. Some are new features disguised as bugs. All of them, though, will delay the launch. And no matter where you sit on the project team, not launching on a deadline that you know you can meet can be extremely frustrating—especially when those delays can last months or even years. (Yes, I said years!)

Why are delayed launches bad?

Before we explore how to avoid unnecessary launch delays, let’s explore why delaying launches can be a problem. Maybe you need some convincing...

The biggest risk is that the developers and designers will forget what they’ve done and why they’ve done it. When you’re in the midst of building a complicated website, it’s challenging to remember why you made certain decisions along the way. But if you have to revisit something two or even three weeks later (not to mention months later), you might have forgotten that a changing a piece of code will actually affect three different components—not just the one you need to update. This leads to more bugs, more testing, and more delays.

Another critical factor in launching: morale. The project team has poured their time and energy into the project and delays deny them final gratification. Especially if they’ve done something cool on the project that they want to show friends, colleagues, or even prospective clients. But they can’t because the site hasn’t launched.

Last, the project will nibble away at the project team’s time and focus. It’s hard to get into the groove on a new project when you need to spend a few hours a week updating an old project that just won’t launch! It’s the tetris problem of project management and the more of these little pieces you have lying around, the harder it is to effectively allocate resources—and the harder it is for those resources (aka people) to actually finish a task.

To delay or not to delay?

Despite all these issues, sometimes a launch delay is necessary. Maybe a feature is more complicated than you expected and the timeline needs to be adjusted. Or maybe an entire set of requirements were missed somewhere along the line—and those requirements are absolutely, 100% critical for project success. Any of these should be reasonable and limited delays as the problems outlined above still stand. The longer the delay, the bigger these issues become.

A few common problems that delay launches unnecessarily

There are many, many little problems that unnecessarily delay your launch, but there are a few that have resurfaced a time or two for us.

If you are migrating data from one database to another, a big pothole on the road to launch will be inconsistencies in source data. Do not wait until the end of the project to test the data import—even if you’ve provided explicit instructions on how to format the data. There will always be problems with inconsistent data when doing an import. Expect it, embrace it, plan for it.

Probably the most annoying thing to delay a launch: infinite nitpicking. People reviewing the site want the logo a little to the left—no, move it back. Or they want to see the homepage with a different style component for featuring content on the homepage. These nitpicks do nothing to move the project closer to launch. What’s more, actually launching can often quiet the flow of the nitpicks.

But the biggest factor in delaying launches: scope creep. There are actually a few of ways that scope creep can sneak into a project and you need to keep a steadfast eye on them. More than anything, launching on time is about managing scope.

The fastest way for scope to creep: your client talking directly with your designer or developer and making a suggestion or two. The developer thinks these are fairly simple, reasonable requests, so implement them without consulting other people on the team. One or two of these won’t kill a timeline, but 5 or 6 will as each of them adds new testing time and even creates some confusion on the team. In the worst case scenario, what the developer thought would be easy ends up being more complicated—and once you’ve promised something, it’s difficult to back out.

Another way scope creep wiggles its way into projects: New features disguised as feedback on an existing ticket. This is not always an easy thing for developers to see as it can happen so gradually—an actual bug leads to another bug leads to some re-thinking on how the feature should actually work. Maybe the new direction is better than the old, but it’s still going to delay timeline and increase costs—both of which need to be accounted for.

Get that site launched!

So how do you do it? How do you maneuver the project out of launch limbo so that it can be released to the world? It ain’t easy. But there are a few practices we’ve developed over the years that can make a big difference.

The easiest way is to prepare for launch at the outset of the project. If you wait until time to launch to set clear expectations about your launch process, then you’re going to have a bad time.

First, you want to change their mindset about what a website actually is. Many people still view websites as stagnant, immovable forces that, once launched, will never, if rarely, get updated, which is why they want everything absolutely perfect prior to launch. This mindset needs to change. The web is, and has always been, an evolutionary medium. New learning can happen quickly and what you thought was perfect at launch, may prove to be fatally flawed. Better to launch something that is good enough that can evolve based on feedback.

Second, pursue a retainer as soon as possible. Not only will having a retainer allow you to reinforce the idea that the web is an evolutionary medium, but will also give you the runway to help them evolve their ideas without having to scrounge around at the end (which can often leave clients feeling like you’re doing a bait-and-switch on them).

Lastly, if you can, add some time at the end of the project—even if you don’t tell the client—or them to nitpick and tweak features. It’s going to happen no matter how great the client is or how much you prep them, so if you can make that part of the schedule, you can avoid unnecessary delays (and maybe even launch early if they have limited nitpicks).

All these suggestions are great, but are only effective if used at the outset of the project. What happens if you get to the end of the project and you’re running into these problems?

Well, you’re S-O-L.

Not really. (But it is harder to get the client focused if you haven’t been talking about it throughout the project.)

As the clock ticks down to launch, you need to change the rules for filing bugs a bit. Add a new facet to your bugs: launch-blocker. Only bugs flagged as a launch-blocker will get fixed prior to launch. Everything else will get prioritized and resolved post launch. This will require some finesse on your part as what the client thinks is a launch-blocker and what you think is a launch-blocker may be two different things. But you want to reserve the launch-blocker flag for things that are critically broken. (Hopefully you don’t have too many of those at this point!) Everything else can be fixed after launch.

In fact, you can even work this into your process and include that in your periodic process overview discussions.

Launch!

Launching a new or updated website can be challenging, but with enough preparation and planning, you can minimize the tendency that clients have for delaying launches. Help them understand why delayed launches are bad. Recruit them as partners to help you stay on time and only delay when absolutely necessary.

Tags: Drupal Planet
Catégories: Elsewhere

Blair Wadman: What is a Drupal developer?

jeu, 18/12/2014 - 15:30

As the Drupal market continues to rock and roll, more and more clients need "Drupal Developers". But what exactly is a Drupal Developer? A Drupal Developer is someone who knows Drupal right? Right?!

Catégories: Elsewhere

Drupalize.Me: Adventures in Porting a D7 Form Module to Drupal 8

jeu, 18/12/2014 - 14:26

Got some Drupal 7 modules that use the Form API lying around? Want to learn how to port them to Drupal 8? The process could just be the crash course you've been looking for in Drupal 8, object-oriented, module development.

Catégories: Elsewhere

Code Karate: Drupal 7 Rules Filter: Manage and search your Drupal rules

jeu, 18/12/2014 - 14:18
Episode Number: 186

The Drupal Rules Filter Module is a simple module that makes it easy to sort through a long list of Drupal Rules. This is a module that is especially useful on those larger scale Drupal websites that rely heavily on the rules module and have many contributed Drupal modules installed.

Tags: DrupalRulesDrupal 7Drupal PlanetSite Administration
Catégories: Elsewhere

Drupal Association News: Meeting Personas: The Drupal Expert

jeu, 18/12/2014 - 13:00

This post is part of an ongoing series detailing the new personas that have been drawn up as part of our Drupal.org user research.

Kate Marshalkina has been using Drupal for three and a half years. A web developer by trade, Kate was approached by a friend who wanted her to do Drupal work with him. After doing some research on the system, Kate agreed.

“It’s quite difficult to learn Drupal without paid work because it requires a lot of time and experience to learn the Drupal way of doing things,” Kate said. “I had joined a security startup, and a security company obviously cares about security on the web. So we decided to use Drupal because it’s a safe, well known open source system. I learned a lot while I was working on my tasks, but I spent a lot of my free time to learn Drupal. Once I started learning, I couldn’t stop— I’d previously worked with other content management with less documentation and information and then I started learning Drupal and... because of the community, and all of the learning resources and videos that are available, I was hooked."

“After working with Drupal for three months, I started my blog and not long after that I presented a session at DrupalCamp Moscow. Now, I’m a Drupal lover after three and a half years working with the platform."

Drupal.org: A Valuable Resource

Every day, Kate checks in to Drupal.org: she says she visits the site to find new modules, check the issue queues, and check API documentation. “I’m very comfortable with Drupal.org, but it was hard getting used to it when I started. Initially, it was a question for me why I should even use Drupal.org, and I didn’t know what the benefits are.

"I really like my dashboard on Drupal.org,” said Kate. “It’s a great page where I can see daily updates on my issues — and of course I follow a lot. It’s nice that I can also easily view updates on issues in critical bugs in core and so on, see crucial updates, core releases, and of course I also follow the Drupal Planet RSS feed."

Drupal Planet is one of the most helpful tools for Kate when it comes to getting new Drupal knowledge, and she often encourages her colleagues to follow it. "I think Drupal Planet is an exciting part of Drupal.org. It’s a great resource for Drupal related articles for everyone; beginner to expert, frontend to backend to sysadmin, the information for all these people is usually very high quality on Drupal Planet. When I’m working with fellow developers who have questions, I always ask them to look on Drupal Planet because I know that the information there is of a high quality, and that anyone can find the knowledge they need in there."

It's About the People

Some of the recent changes made on Drupal.org, including the addition of user pictures to the issue queue, have made Kate’s Drupal experience vastly better.

“[The pictures] are great because it makes Drupal.org more personalized, and you can more easily remember the people you talked to because of their photos. And, it reminds people that Drupal isn’t just a CMS, it’s a community, and the people are important.”

“It’s a big question for me how to enroll younger developers,” said Kate. “Looking at the contribution opportunities, [new people] may feel like they can’t be a contributor. So sometimes, they may encounter a bug they don’t know how to fix and think, “oh no, a bug!” instead of recognizing it as an opportunity to learn and grow. If we can encourage more people to become contributors, they will benefit from it and Drupal will benefit from them."

Kate’s advice for new Drupalers is to “start right out and register on Drupal.org. Share modules, create patches, learn how to use git and so on… it’s not easy, but it’s worth it."

Growing With the Project

As for herself, Kate hopes to increase her skill level by contributing to Drupal 8 core.

"I participated in DrupalCon Amsterdam, and really liked what Dries said about getting more benefits to small companies who contribute so that it will be easier for employers to understand why they spent their time and pay for developers on core. I would be much more experienced if I could participate in Drupal core development."

"I also want to someday give a session at DrupalCon,” Kate added. "I give a lot of sessions in my local community, camps and so on. I’ll be speaking at Moscow Drupal Camp in November, but hope to speak at a DrupalCon soon."

We all wish you the best of luck, Kate, and hope to see you on a stage at DrupalCon soon!

Personal blog tags: drupal.org user researchpersona interviews
Catégories: Elsewhere

Pixelite: Installing Solr for development

jeu, 18/12/2014 - 01:00
Intro

Solr is an open source search engine with many powerful features.

I encounter a lot of experienced developers that either don’t know how to use it or avoid it as it’s in the to hard/scary basket. In this introductory article we’ll talk briefly about how to install Solr in order to use it for development.

There are many ways to install and configure Solr but in this article I’ll show you how to set it up quickly so you can get started developing with it. While the installation and setup will be generic to any framework you want to develop with, I’ll also, show you a couple of extra steps if you’re using Drupal.

Requirements

The only real hard requirement/prerequisite for running Solr is Java. Version 1.6 is recommended for Solr version 4 and upward. Ubuntu and Mac should come with Java pre-installed.

I’m not a windows guy so sorry you guys are on your own There’s pleant of resources out there.

You can find out the version of Java you are running with the following command.

$ java -version java version "1.7.0_72" Java(TM) SE Runtime Environment (build 1.7.0_72-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)

I am using Ubuntu 14.04 but the instructions in this article should work if you’re on a Mac or another variant of *nix

Download

Open a terminal and make a folder we can use for working in, and change to that directory:

$ mkdir solr $ cd solr

Navigate to the Solr download page and find the closest mirror for you. At the time of this article the latest version of Solr is 4.10.2.

Copy the download link for either the solr-VERSION.tar.gz or the solr-VERSION.zip. You don’t want the solr-VERSION-src.tgz (this is the source code and will need to be compiled) and download it with wget.

$ wget -c http://mirrors.sonic.net/apache/lucene/solr/4.10.2/solr-4.10.2.tgz Unpack

Once downloaded (it’ll be about 150M) we can un-compress it and change into the directory.

$ tar -zxvf solr-4.10.2.tgz $ cd solr-4.10.2/ Make a working copy

In the current directory there is a folder called example we want to make a copy of this folder.

We could just use the example folder but it’s nice to leave that clean on case you want to use this copy of Solr for other sites as well. So we’ll make a copy and then change directory into the newly created copy.

$ cp -prv example my_solr $ cd my_solr Make it work

Now we’re ready to run it for the first time. To run Solr it’s really simple. Simply run:

$ java -jar start.jar

You should see a whole bunch of output (to stop solr press CTRL^C). After a few seconds if you open your browser and navigate to http://0.0.0.0:8983/solr/ you should see something similar to the following (the actual screen may differ depending on your version)

That’s it. Solr is now set up and ready to use. Depending on your client frame work you may need to makes some config changes to Solr itself. Consult the installation instructions of your chosen framework. If you’re using Drupal keep reading and I’ll show you the steps required to make Solr ready for Drupal integration. First lets stop SOlr from running by hitting CTRL^C in your terminal.

Modules

There are a couple of modules you can use for Drupal integration with Solr. I wont go into the Drupal configuration side of things (I’ll leave that for another day) but will talk about the steps required to get the Solr server we’ve set up ready for Drupal usage depending on the Solr module you’ve chosen.

Search API and ApacheSolr

If you’re using the search_api you will need to ensure you have the search_api_solr module installed. Otherwise the apachesolr module is the way to go.

In both the search_api_solr and apachesolr modules, you’ll find a folder called solr-conf in this folder there will be version folders 4.x, 3.x etc. Choose the version of Solr you downloaded. This folder contains all the config files you need to install in your Solr install. I could probably write a whole bunch of articles about the contents of these files but since this is a beginner tutorial we’ll just take the easiest route.

You want to copy the contents of the solr-conf/4.x/ folder into your solder core. We can do this with the following, go back to your terminal, and run (change the path to your Drupal module):

$ cp -v **/path/to/apachesolr/or/search_api_solr/**solr-conf/4.x/* solr/collection1/conf/

That will copy the config for your Drupal site into the my_solr/solr/collection1/conf/ directory.

Conclusion

Solr is now ready for use by your Drupal install. You can run it whenever you like by changing into the my_solr directory and starting it.

$ java -jar start.jar

I wouldn’t recommend using this setup in production. However, for developing on your local machine, it’s perfectly fine.

In the next article, I’ll talk about how to configure the search_api and search_api_solr to use Solr as a search engine for your Drupal site.

Catégories: Elsewhere

Drupal Watchdog: The Drupal 6 to 8 Upgrade Challenge - Part 1

mer, 17/12/2014 - 22:52

Nathaniel Catchpole , the Drupal 8 release maintainer and Tag1 Senior Performance Engineer, suggested that Drupal shops everywhere could support the release of Drupal 8 by upgrading their own sites and addressing the issues they find along the way. This series chronicles the journey from Drupal 6 to Drupal 8.

Part 1: Readiness Assessment

Before performing a major version upgrade, I usually go through a series of steps that help me determine:

  1. What compelling business needs or new functionality are prompting the move? In this case, the site builder view on the status of D8 will help us identify and hopefully address real barriers to adoption, as well as to prepare materials that help document the journey.
  2. What does the site do? If there are functional tests or test plans, I review those. Then, I manually review the site, paying attention to functionality for particular roles. I also check with at least one or two of the stakeholders with each role to learn what features they regularly use, what improvements would better support them, and what they’d really like to see. I don’t normally act on that wish list answer as part of the upgrade proper, but knowing what new functionality they desire can help make decisions about the new modules to use.
  3. Are there features that are no longer in use? I’m always surprised, though by now I really shouldn’t be, by the number of things that seemed like a good idea at the time to someone which were never used at all or which are no longer in use.
  4. Is now the right time? Are the contributed modules on which the site depends ready or is there a new way to achieve the required functionality.
1- Compelling Functionality

As noted above, this particular journey is compelled by the desire to identify and fix bugs during the Beta period of Drupal 8. That doesn’t mean we’re not excited by:

  • WYSIWYG in Core- I am ecstatic at the prospect of NOT having to choose and configure basic WYSIWYG functionality.
  • Views in Core - I pay a lot of attention to the experience of content contributors. They’re the everyday users that Dries talked about back at DrupalCon San Francisco, people who use the interface of Drupal as their day job. What a site builder does for them (or fails to do) can make or break the success of the site as well as cement the organizational satisfaction with Drupal itself.

I want Tag1’s busy staff to find it a pleasure to keep their blogs, community contributions, and case studies up-to-date.

2 - Current Functionality

Our speciality is performance and scalability for complex websites, which never necessitated building a complex external site for ourselves. We have internal sites that put Drupal 6 though its paces, but the main Tag1 site is a combination of blogs and brochure:

  • Review what the current site does
    I start any readiness evaluation looking at the site from the user perspective, clicking around, then reviewing any documentation. The site revealed no surprises. I jotted notes about those user-facing features, mapped to Drupal functionality, and stored them as a sheet in the Readiness spreadsheet. For a basic site, the notes aren’t too impressive, but the process was a valuable refresher on what the site does.
  • Inventory the enabled modules
    After looking at the site from the user interface, I make an inventory of enabled modules. The following Drush commands make nice spreadsheets: drush pm-list --no-core drush pm-list --core

    You can take a look on Sheets 2 and 3 of the Readiness spreadsheet to see the entirety of what was and and wasn’t available.

    In our case there are just two areas of concern:

    Blogs have been removed from core, but with views moved in, this won’t be daunting to rebuild. They may work a little differently, but odds are that will be for the better!

    The only missing module that had no alternative and looked like it might hurt was Pathauto. It’s nice to keep URLs tidy and hard to remember to set them, but wouldn’t be strictly necessary for our purposes and there were were no other glaring show stoppers.

    Note: It looks like upgrade work is happening on Github so I updated the spreadsheet to make note and will evaluate the status as part of the process.

  • Look for customizations
    In addition to custom and contributed modules, it’s good to check for inappropriate customizations done directly to core or contrib. Whatever reason they had for being done back then may need to be accounted for, hopefully in a best-practices way, on the new site.

    Although it seemed unlikely that any relevant changes had been done, for good measure, I always run Hacked. It’ll let you know about files that have been changed from the source.

    There were some theme customizations and a .gitignore file was missing, so as suspected, nothing to worry about.

3 - Features no longer in use

I’ve learned over the years that not every module that is enabled is in use! I try to find a link that illustrates somewhere on the site that the module is visibly in play. Even when there is a place in production where the module is used, it’s entirely possible that the production feature itself doesn’t make sense to upgrade. A serious investigation of analytics and logs can be insightful. Data can guide conversations with product owners about what’s still valuable and support decision-making.

On our straightforward site, there’s not much to not use. As I learned running the first migration, though, even features that were briefly explored but never used can come into play. More on this later.

4 - The right time

Once you’ve completed your archaeology, you’ll need to find the right time for your organization. Talk with stakeholders about the change and be on the lookout for in-process or upcoming feature requests that you might not be prepared to accommodate.

In our case, because the motivation for this upgrade is process, not product, we’ll proceed and go as far as we reasonably can with the upgrade. At the time of this writing, I’ve done a D8 install and begun running a migration. (That’s how I know to be on the lookout for certain disabled modules!) I’m feeling confident that we can get a long way.

Unless the migration process is flawless and the Drupal 8 to Drupal 8 update path is in place I'd be unlikely to recommend deployment of the work, especially with an impending re-design. While re-entering some data manually has always been a part of previous major version upgrades, I’d be loathe to commit to beta adoption if I thought we’d find ourselves stranded in the latest version. Fortunately, all the preparatory work can be done without the upgrade path in place!

Coming next in this blog series, Part 2: Preparing to Migrate.

What modules and processes do you use to prepare for a major version upgrade?

Catégories: Elsewhere

Acquia: Drupal & PHP: Linking Islands, the podcast – part 1

mer, 17/12/2014 - 22:14
Language Undefined Drupal & PHP: Linking Islands, the podcast – part 1

Catégories: Elsewhere

Phase2: Play with Display: Altering Drupal Field Collections

mer, 17/12/2014 - 21:43

How do you insert a text field into a rendered entity, all within a field collection? This question came to mind on a recent Drupal 7 build. What at first sounded complicated turned into a concise and elegant solution.

The basis of the requirement broke down into the need for events to list those participating in the event. The build already had existing Event and Profile content types, so the new functionality would only require implementing the list of Profiles participating in an event. Each participant would include their role at the event, along with links to contact them.

To implement this, an Event Participant field collection was added as a field to the Event content type. Each instance of the field collection included a single Profile content type and a single text field for their role at the Event. The Profile would then be displayed as a rendered entity within the field collection so that the Profile’s image and contact links could be displayed. The point at issue then arose. How would the Participant’s role at the event be placed within the rendered Profile teaser, along with the other Profile fields? To the user it needed to look like a single unified entity, with the Profile’s image, role at the Event, Profile name, and contact links all included.

After some initial brainstorming a handful of different approaches came to mind. The initial impression was to use template_preprocess_field() since it allows the alteration of values in the theme layer. The participant role field would be removed from it’s initial location and inserted into the participant profile object. This did not work though. Despite the repositioning of elements within the render array, the changes occur too late in the rendering execution. The render array had already been rendered and thus the display remained the same.

After quickly realizing a theme function wasn’t the answer, hook_node_view() came to mind. The hook allows for the alteration of a node before it is rendered and so all that would be needed would be to shift the location of the Participant Role field within the $node array. The issue with this implementation and the reason it wasn’t chosen, is that it would require reaching out to the global state to determine what changes are needed. In other words hook_node_view() doesn’t realize what context it is called under and would thus require a hack of sorts to determine when it was being called under an Event node. This could be worked around by checking the URL path, but this is not best practice as it is brittle and prone to breaking with future site updates.

As they say the third time’s the charm. The final solution was to use hook_field_collection_item_view(). This hook allows for the alteration of a field collection item before rendering. Unlike many of the other options, this hook is called for each field collection item, allowing one to both check the field collection name and adjust it’s internal field ordering, before any rendering occurs. Using this hook, each Event Participant field collection item is altered, removing the Role field and inserting it into the Profile rendered entity. Simple as that. Now each Event Participant is correctly displayed as a single unified entity, with an image, name, and a set of contact links.

function hook_event_field_collection_item_view($field_collection_item, $view_mode, $langcode) { if ($field_collection_item->field_name == "field_event_participants") { $role = $field_collection_item->content['field_event_participants_role']; $profile_id = $field_collection_item->field_event_participants_profile[LANGUAGE_NONE][0]['target_id']; // Remove Participant Role from previous location in field collection output unset($field_collection_item->content['field_event_participants_role']); // Insert Participant Role into the Participant Profile output $field_collection_item->content['field_event_participants_profile'][0]['node'][$profile_id]['field_event_participants_role'] = $role; } }

Through several quick, small, iterations an elegant, straight-forward solution was found to what at first sounded like a complicated feature request. Now users viewing an Event can see a list of Participants, with each Participant displayed as a single item. Check out more on field collections on the Phase2 blog!

Catégories: Elsewhere

Drupal Association News: Meeting Personas: The Skilled Drupal User

mer, 17/12/2014 - 21:00

This post is part of an ongoing series detailing the new personas that have been drawn up as part of our Drupal.org user research.

Chris Ohmstede is based out of Los Angeles, California. An experienced programmer, Chris is new to Drupal but already identifies as a skilled persona. Several months ago, Chris discovered Drupal as he was looking for solutions to build a website for hosting a program he wrote.

"I spent a number of years in the banking industry, and in that industry banks are constantly making connections to everything. I was always running in to problems when things couldn’t connect— it was always an issue trying to figure out what was actually going on. Over the years, I wrote a bunch of applets here and there to figure out what the problems were, and my program whycanticonnect is a conglomeration of those applets that work across operating systems, mobile— I’ve got cloud services approaching me about it, too.

Wanted: Custom Functionality

“Originally, I was hosting my project for download using a different CMS option, but things weren't working properly. Finally, I hit a point where I said “I’ve got to make a change.” I initially went to Drupal because I use Linux as my OS, and Drupal is one of the only CMSs available out of the repositories. I saw that, went and did some research, and Drupal looked big and well organized. One of the cool things that caught my attention is that I could Google around and see that everything I needed was already built. I never had to ask for any help — I was able to roll on through and put my site together easily."

“Also, one of the reasons why I selected Drupal was that I've released my product in 12 different languages, and Drupal looks like it has some decent translation services coming in. I want my site to be usable in all 12 languages I support."

After downloading Drupal, Chris relied on his technical knowledge to carry him through. Though he initially encountered some difficulty getting the modules to do what he wanted, he found after some searching that deriving his theme would fix his problems.

"Once I derived the theme, everything got easier— the way drupal derives themes is perfect. It’s very object oriented, which is fantastic. The nice thing about Drupal was that I could figure out what I wanted to mess with, and I could build variables on the local scope and carry them through the whole page and process, which is surprisingly difficult to do with other systems."

"It gives me everything I need"

“The great thing about Drupal is that you're not limited in how to inject code,” said Chris. "I like my download module because it gives me everything I need. It figures out intelligently what’s the best download to go with, it builds a link and launches the javalaunch, so it’ll work whether java is enabled or not— which was a problem I’d had before. I’m very happy with it, and very happy with Drupal."

For the time being, Chris doesn’t plan to put together more Drupal sites — rather, he’s going to focus on maintaining the one he has.

"I have no desire to become a web designer,” Chris said. “I built my site because I know I'll need to change it often, and with Drupal it doesn’t cost me anything. As far as giving back to the community, I’m mostly focused on working with my product. I need to write an Android, Mac, and iOS version. I’m planning on submitting some of my modules to Drupal.org once I’ve got them in shape, and I’ve made posts for people asking the same questions and encountering the same problem as I have. Maybe someday down the road I’ll have time to do more, though I certainly wouldn’t make any promises about it."

Personal blog tags: drupal.org user researchpersona interviews
Catégories: Elsewhere

Drupal core announcements: Global Sprint Weekend 17-18 January 2015, Small local sprints good for first time organizers

mer, 17/12/2014 - 19:10

Global #SprintWeekend will be 17-18 January 2015.

Please encourage contributors you know to host a small local sprint near them.

Post an announcement in your local meetup groups please; ask if anyone is interested in hosting a sprint and wants some support organizing it.

List sprints on the wiki: https://groups.drupal.org/node/447258
That wiki also has more information about organizing a sprint.

We will have a couple meetings to support organizers (doodle for organizer support meetings: http://doodle.com/uutcp2ge7gt3a8ed )
and also have mentors in irc over the sprint days (doodle for mentoring during the sprint: http://doodle.com/5vr54mpvxq4k7x29 ).

Catégories: Elsewhere

Pages