Planet Drupal

Subscribe to Planet Drupal feed - aggregated feeds in category Planet Drupal
Updated: 41 min 46 sec ago frontpage posts for the Drupal planet: Drupal 7.36 released

Thu, 02/04/2015 - 04:56

Drupal 7.36, a maintenance release with numerous bug fixes (no security fixes) and several new features, is now available for download. See the Drupal 7.36 release notes for a full listing.

Download Drupal 7.36

Upgrading your existing Drupal 7 sites is recommended. There are no major, non-backwards-compatible features in this release. For more information about the Drupal 7.x release series, consult the Drupal 7.0 release announcement.

Security information

We have a security announcement mailing list and a history of all security advisories, as well as an RSS feed with the most recent security advisories. We strongly advise Drupal administrators to sign up for the list.

Drupal 7 includes the built-in Update Manager module, which informs you about important updates to your modules and themes.

There are no security fixes in this release of Drupal core.

Bug reports

Drupal 7.x is being maintained, so given enough bug fixes (not just bug reports), more maintenance releases will be made available, according to our monthly release cycle.


Drupal 7.36 contains bug fixes and small API/feature improvements only. The full list of changes between the 7.35 and 7.36 releases can be found by reading the 7.36 release notes. A complete list of all changes in the stable 7.x branch can be found in the git commit log.

Update notes

See the 7.36 release notes for details on important changes in this release.

Known issues


Front page news: Planet DrupalDrupal version: Drupal 7.x
Categories: Elsewhere

Promet Source: Optimizing PHP-FM the Promet Way

Wed, 01/04/2015 - 22:25

Ever wondered how you can tweak your server's configuration to get the most out of what you’re paying? Here are some good techniques that we like to use at Promet.

Disclaimer: This doesn’t mean that it’s the perfect server setup, but it’s a good start.  Every requirement is unique and understanding how it works is always the first step.  Having good documentation in the form of a blog post saves us a lot of time and effort so we would like to share our experience as well.

Categories: Elsewhere

Acquia: From Content Strategy to Drupal Site Building: Connecting The Dots with Ronald Ashri

Wed, 01/04/2015 - 19:45
Language Undefined

Ronald Ashri, former CTO at BlueSpark is now a Founder at Roomify - a Drupal-centric startup focusing on online reservations. Here, Ronald presents an enjoyable and valuable session about content strategy and Drupal, full of practical and actionable advice – worth watching in full for all strategists, site builders, and anyone who wants to know how to build a better content-oriented site.

Categories: Elsewhere

Wellnet Blog: Weekly Module Review - #5 Add Another

Wed, 01/04/2015 - 16:44

Today we’ll analyze Add Another module.

One thing I’m always appreciated about Drupal is the speed and the handiness to create taxonomies

Categories: Elsewhere

Drupal Easy: DrupalEasy Podcast 148: 18 Minutes Later

Wed, 01/04/2015 - 07:09
DrupalEasy Podcast 148

WARNING: You have no idea what awaits behind that play button. Take 18 minutes, and call us in the morning. Not for the light of Drupal heart, expectant mothers, or those with liver, neck or back problems. Listen at your own risk.

read more

Categories: Elsewhere Shoov - a new UI regression tool

Tue, 31/03/2015 - 23:00

UI regression is one of these things that make total sense but is rarely put into practice, for a simple reason - it's hard.

UI regression checking in action

If you read the theory about it, it seems pretty simple. Take a screenshot of a certain page in your site which will be your "baseline" image, and from now on, whenever the code changes re-run an automated test that will compare a current screenshot with the baseline image.

Continue reading…

Categories: Elsewhere

Michael J. Ross: Drush for Developers, 2nd Edition

Tue, 31/03/2015 - 22:05
Error: sites/default/files/book reviews/Drush for Developers, 2nd Edition.html not found
Categories: Elsewhere

Advomatic: Style guides in Drupal

Tue, 31/03/2015 - 17:02
Heading into Chicago’s Midcamp, my coworker Andy and I were excited to talk to other front end developers about using style guides with Drupal. We decided to put the word out and organize a BOF (birds of a feather talk) to find our kindred front end spirits. Indeed, we found a small group of folks... Read more »
Categories: Elsewhere

ERPAL: Agile projects for a fixed price? Yes you can!

Tue, 31/03/2015 - 16:52

In the first part of our blog serie we discovered why we need "objectives" to give projects a solid base to succeed. In this blog post we will describe how to manage agile projects for a fixed price. Doesn't work? Es it does, if you respect some rules and do a detailled planning.

In general you should be careful with agile projects on a fixed price agreement. Both parties, the vendor and the customer should be aware of what this agreement means.

What does that mean exactly? Agile:

Changes are allowed in a running project and they are needed. Especially for large projects, changes need to be allowed to continue work even with changing conditions in the defined goals. As described in the blogpost about 3 rules for setting objectives in projects a project should reach certain goals. Agile methods allow to evaluate milestone deliveries often, validate requirements against the end users and involve the feedback in the next sprint. This ensures that the final project result has really the attributes to be accepted by end users.

Fixed price:

The price is fixed and must not be exceeded.

And where is the problem?

The price to be paid always reflects the value of a service or the result a project should deliver. The price tag is a fixed unit. The price and the value of a project should be in a direct relation, since prices are arbitrary otherwise. As the basis for a good and fair calculated project, the requirement description consisting of performance definition, specification and design is valid. If this is detailed enough, realistic assessments can be made. One of the first steps in a project creating the specifications. The more detailled the better. In contrast, if estimations are not realistic and not understanderstandable, conflicts will inevitably arise at some point during the project. This happens latest when additional expenses arise due to new or changing requirements. If it is not possible to proof the changing requirements objectivly, conflicts may appear as one of the project parties may feel disadventaged. So it is urgently to ensure that services and prices are clearly related and are both traceable and transparent. Then also later occurring changes can be considered smoothly. This is the base to manage agile projects for a fixed price. As you know all detailled requirements and their price tag or estimation, it is possible to change existing requirements that are obsolete with new requirements that appeared. Priorities of in the backlog of all requirements help to stick to the initial estimation. Otherwise it is easy to argument, why the fixed price will be overrun.

Another problem arises when you schedule a buffer without a fixed size. It will never be possible for you to find an explanation for when the buffer is finally exhausted, if you dont have clearly estimated and specified requirements that will help to realize a real change request. Because you do not know how big a change is and what changes have already been posted with what size of the buffer. So you should offer a fixed time schedule and buffer, which can be used for changing requests. These "change requests" have to be transparent and documentated for your costumer. So all parties can understand why sometime the buffer is depleted. This avoids conflicts.

In the next part of the series we will draw attention on the topic "Specifications".

Categories: Elsewhere

Drupal Association News: Please help us welcome Matt, Tina, and Bradley

Tue, 31/03/2015 - 15:49

After a very busy year and a half, we're nearly done shoring up on new hires here at the Drupal Association. We’ve been working hard to bring in the best talent around, and are thrilled to announce our three new staff members: Matt, Tina, and Brad!

Matt Tsugawa, CFO, Finance and HR Team

Matt (mtsugawa) is joining the Association as our new CFO, where he will be responsible for Finance and HR, and will help develop and drive the strategy of the organization as a member of our leadership team. He brings a rich professional history with him: he has worked in industries across the country and around the world. Early in his career, Matt worked in Japan as a management consultant at the professional services firms, KPMG and Arthur Andersen. After spending a few years as an analyst and business development manager in New York at A&E Television Networks, Matt returned to Portland, where he was born and raised.

Most recently, Matt worked in the energy efficiency industry as the Head of Finance. He holds a BA from University of Colorado at Boulder and an MBA from Yale. When not at work, Matt enjoys “managing" his three children and overgrown puppy with his wife, and when not doing that, he is an enthusiastic, if not yet expert, practitioner of Brazilian Jiu Jitsu.

Tina Krauss, DrupalCon Coordinator, Events Team

Tina (tinakrauss) is the newest member of the DrupalCon team, and came on board in mid March. As a DrupalCon Coordinator, Tina will work with each con’s volunteers, assist in con programming and logistics, and work with website content. Tina is also focused on customer support and responds to tickets submitted to our Contact Us form related to the Cons.

A native of Germany, Tina moved to Portland, Oregon several years ago, where she currently resides. In her free time, Tina is an adventurer. She loves to travel around the world -- the farther, the better! She also enjoys outdoor activities like hiking, biking, backpacking, skiing, and more.

Bradley Fields, Content Manager, Marcomm and Membership Team

Bradley (bradleyfields) joins the Marketing and Communications team as Content Manager. He will focus on the planning, creation, and maintenance of content—across all of the Association-managed platforms—that engages and strengthens the Drupal community. For the last six years, he worked to help associations, federal agencies, and universities make their content work better for all sorts of users and audiences.

When he is not at his desk, Bradley is curating Spotify playlists, watching one of his 50+ animated Disney movies, on the hunt for great whisky, or reading Offscreen magazine. He wishes he were Batman, but his superhero powers are definitely still under development.

Categories: Elsewhere

Drupalize.Me: Funding Core Development with D8 Accelerate

Tue, 31/03/2015 - 15:15

Drupalize.Me and Lullabot together have made a donation of $5,000 to the Drupal 8 Accelerate Fund, becoming an anchor donor of this critical funding initiative. We heartily believe in funding core development and are so excited to be a part of providing a much needed final push to a Drupal 8 stable release. Learn more about how you can be a part of accelerating the release of Drupal 8.

Categories: Elsewhere

Deeson: Creative design for community websites

Tue, 31/03/2015 - 13:53

A powerful, branded online community can be a great way to promote interaction between a brand and its users.

It's often much more successful than relying solely on pre-designed social media platforms.

At Deeson we’ve built plenty of community sites and we’ve helped organisations develop and deliver their community strategies too. 

As a digital designer, I wanted to take a look at how creative design is being used across the web to help create a more engaging experience for members in online communities.

Long gone are the days when forums were just long lists of grey gradient boxes, with a place reserved for only the highest tech-savvy geeks.

In 2015 they can be bright, engaging, highly topical and definitely not to be hidden at the bottom of your website.


Don’t be afraid to let your brand come through

Macmillan Cancer Support is an example I like of an online community that takes a holistic approach. The charity has embraced its branding strategies from across print and advertising, successfully pulling them into one effective online resource.

Covering such a sensitive issue and with the primary purpose as a charity to provide support to others, the brand and online forum needs to be informal, approachable and familiar. Careful layout and colour palette choices help achieve this. The instantly recognisable Macmillan typeface reinforces brand trust.

As a charity that deals with cancer, the topics and emotions when using the resource can be very overwhelming for a user.  The design here does a very good job of counteracting this by breaking each section of the community down into smaller accessible blocks of information.

Posts of the week and feature quotes are highlighted with the bright green and blue colour palette, but do not over power the more detailed threads of conversation that can be scanned easily too.

Encourage user participation

Online communities can be a great tool to generate content outside the services of your own team.

Not only can this broaden topics and save money, it also makes users feel valued and involved.

The Buzzfeed Community, ‘home for awesome posts created by BuzzFeeders', is one of the most successful examples of this.

With the rise of social media came the unstoppable need to gain online credibility and profile. A leaderboard page ranking top posts and users is the perfect mechanism for BuzzFeed to successfully play on this thirst for online fame and self promotion.

Larger than normal profile images, a unique set of designed award virtual stickers and a delightful visual rating system of ‘cat power’ certainly provides encouragement to post valuable submissions.

The design of this online community is somewhat cringeworthy but very well considered and tailored to the audience.

Unlike some other communities, the user's main purpose here is often not to gain a specific answer from the site, but to browse freely until something sparks interest.

Large bold story titles and on trend icons over thumbnails are the perfect tool for free spirited navigation.

Consider your audience

It doesn’t always have to be text heavy and not all communities need to focus around conversation.

DIY is a fantastic online community for kids that encourages them to develop skills across a huge range of subjects - its main feature is delightful illustrations.

Full of creativity, with a unique badge drawn for every skill set, it remains on trend with flat design and the merging of pastel and bright colours.

Every page is instantly visually engaging, perfect for the target audience.

The community works by allowing members to upload videos and images of them completing a certain skill task. This instantly provides a visual portfolio for each member that children can engage with.

Buttons are large and accessible and the navigation is simple to use, with another unique set of icons.

As a neat little commemoration to the origin of earning 'skill set' badges (from the likes of Scouts and Girl Guides), you can purchase hand-sewn patches to show off the illustrated badges you’ve earned, offline.

Consider medium

It’s not just children’s online communities that benefit from avoiding text heavy sites. For brands like YouTube and Spotify, the main medium associated is video and sound so it makes sense to make these the feature.

Soundcloud, an audio platform for sharing and promoting originally created sounds, is doing exactly that through creative visuals of sound.

Rather than opting for simple play button and song title, a visualisation of each soundtrack is the feature of each post. A creative display that is both engaging and informative.

Community members' comments can also be placed along exact positions of tracks, removing the need to pause and type out the time you're referring to.

This simple design idea is a great example of finding creative ways to address specific subject user needs and it is addressed with great attention to detail.

The brand's Orange is re-introduced to mark which sections have been played and the background to the player is customisable. This takes in to account that community members have their own 'brands' they may want to display.

Don’t forget that simplicity can work

Lonely Planet’s forum may not be the most groundbreaking in design, but it’s simple, clean, modern and effective. Covering a broad range of topics and conversations, the amount of content could easily become overwhelming, so in this case the design is better stripped back and decluttered.

With a clean menu to the left, the main content paragraphs sit to the right with a short, readable line length and generously spaced line height for maximum readability.

The design is minimal, with titles differentiated in the brand blue. Its only flaw would perhaps be the slightly small font size used on the navigation, which could prove negative to accessibility.

The online Lego community also keeps it simple, but has a creative addition to tools available within forum conversations.

Expanding on the ever popular emoticon series, now standard with most phones, Lego has devised their own set of characterised Lego heads. Bringing in this iconic shape allows users to subtly interact further with the brand.

Overall, the design of an online community should consider your existing brand, the community members and the purpose of the community.

Sometimes a huge number of features is not always best and the information in the community needs to speak louder than the members or brand. Equally, it’s good to get creative and break away from the dated, plain, grey forum list.

Categories: Elsewhere

Deeson: Google has a new algorithm, will your site be judged as mobile-friendly?

Tue, 31/03/2015 - 11:33

What is it and what does it mean?

Last week Google officially confirmed suspicions that they are due to release a mobile ranking algorithm. The update, due to be released on 21st April 2015, will mean that mobile-friendly websites will be given a higher ranking within mobile search results.  

When making the announcement, Google said they expect a significant change, with some sources saying it will have a bigger impact than both their Panda and Penguin updates. With 50% of all Google searches coming from a mobile device - I certainly think so too!

The new algorithm will be applied globally meaning that the update will affect mobile searches and results in all countries, across all languages at the same time - rather than being phased in country by country.

It’s real-time!

For those of you panicking at the deadline, do not fear (just yet). Google will review your site in real-time meaning that once you’ve updated your design, the next time Google trawl your site they’ll identify it as mobile friendly.

With that in mind, it’s important to remember that this works both ways. If you update your site so it is unfriendly, Google’s algorithm will kick in, which may have a negative effect on your ranking.

It’s good news for those who have part-friendly sites (e.g. your entire site is friendly but parts are not) as Google will be working on a page by page basis. Google will identify the friendly pages but the unfriendly sections will not cause your entire site to be marked negatively - phew!

You’re already being labelled.

You may have already seen, but Google has already got the ball rolling with this latest update. In an effort to help mobile searchers know which sites are mobile-friendly, they have added a text label under the URL (near the snippet) that reads “Mobile-friendly’.   

Discussing the recent label additions Google said, “Users will find it easier to get relevant, high quality search results that are optimised for their devices”. Personally, I’ll always choose a mobile friendly search result over non-labelled one when on the move.

As the fight for the top positions in Google becomes ever-more competitive, it’s important that you identify any potential advantages over your competitors - and this certainly is one. In a recent report by Alexa (October 2014) which reviewed the the top 1000 sites, just 18% of them were mobile friendly - and these are the big guns!

Mobile users hold a grudge

Figures show that 61% of users are unlikely to return to a mobile site they’ve had trouble with. Of those, 40% said they would then go on to visit a competitor's site instead. These figures emphasise the huge importance of making your site user-friendly across all devices, particularly if you have e-commerce.

According to Nielsen, 87% of mobile users used their mobile device for shopping activities such as searching for a product or service, price comparisons, or brick & mortar address search. Having a seamless experience across all devices can have a big effect on the amount of users that finally go through to purchase.

What can I do?

There are a number of things you to can do to help make your site more mobile friendly and give yourself greater chance of obtaining a mobile friendly ‘label’. It all depends on what the Googlebot detects when it’s trawling your site, it’s looking for the following:

  • The site avoids software that is not common on mobile devices e.g Adobe Flash

  • The site uses text that is readable without zooming

  • The site sizes content to the screen so users don’t have to scroll horizontally or zoom

  • The site places links far enough apart so that the correct one can be easily tapped

Basic example showing a mobile-friendly layout.

If you’re unsure, there are two easy ways to check to see whether your site is mobile-friendly or not. These are:

  • The simple one: look up your site on a phone yourself and judge.

  • Use the Google Mobile-Friendly Tool to see if Google thinks you’re mobile-friendly.

Final thoughts.

  • To stay ahead of your competitors and provide a seamless experience for your users, updating your site so it’s mobile friendly is a no-brainer. Not only will it give you better chance of retaining customers but it will give you more klout with the big search engines.

  • As more and more sites begin refreshing their design, it’s important to be ahead of the trend and not seen to be lagging behind your competitors. Run tests on your site to make sure that your site is mobile-friendly and meets the requirements set by Google’s new algorithm.

  • If you have any questions surrounding mobile friendly design, SEO or are looking to update your site design, just drop us a line.

Image Credit: SabianMaggy

Categories: Elsewhere

Deeson: What makes a good digital strategist?

Tue, 31/03/2015 - 11:28

Strategy has always fascinated me.

The intellectual challenge of developing innovative yet rationale responses to a unique context is something I'm really passionate about.

Digital strategy is all too often conflated with knowing which social media channels to be on or whether you should have a mobile app. But to be a good digital strategist you've got to know more than your Vines from your Meerkats.

I've been thinking about what sort of traits make someone a good digital strategist and I'm firmly convinced that the underlying strategic nous isn't something people are born with.

With focused personal development and discipline the traits of an effective strategist can be quite easily developed. 

Combining these traits with a professional curiosity and thirst for knowledge about the world around is what makes a good digital strategist.

So what do good digital strategists do to keep their skills sharp?

Here are my top five ways that digital strategists can stay on top of their game.

  1. Act like a counsellor

    As a strategist, you're helping a brand, organisation or person solve a problem. At the early stages of planning you should be absorbing more information than you're providing. As the Greek philosopher Epictetus wrote "We have two ears and one mouth so that we can listen twice as much as we speak."

    In a briefing session, probe the problem and interrogate the request to determine the true goal. A good strategist is like a good counsellor, reflective, intuitive and never pushy; they talk about you more than themselves.

    'Counselling' is essential to a strategist as it helps them develop the insights which are so critical to creating the final plan. 

  2. Never stop thinking 

    Whilst it's not healthy to be working constantly, a good strategist just can't help analysing campaigns she sees in her daily life.

    When watching TV ads, she wonders what led the creative team to sit around and devise that particular commercial. A good strategist has 'x-ray vision' when looking at other people's marketing activity- an ability to see through the consumer facing proposition, right back to the brief.   

  3. Show empathy

    Empathy is one of the key attributes of a good strategist; the ability to put themselves in another's shoes.

    Strategists need to be able to see across 'lines' in society, unaffected by taboo, moral issues, class or race. If a strategist is unable to put themselves in the consumer's shoes, they won't be able to succesfully relay the needs of the brand or organisation to them.   

  4. Be the glue

    A strategist should be the 'glue' in your campaign team, understanding the professional and personal needs of each contributor. She should be able to draw together findings using stats, creative insight and consumer research.

    The strategist must be the 'voice of reason' in collaborative sessions, listening and encouraging, whilst reigning back overconfidence, even in their superiors.   

  5. Quiet confidence

    A strategist is often a 'thinker', who prefers to absorb information and work alone to come up with ideas to present back to the team.

    Though they may spend a good proportion of their time in quiet contemplation, they're by no means a wallflower. When a strategist gets up to present, the client sits back and listens- they're well-informed, interesting and confident. You'll find most heads nodding as they present their insights.   

In truth, a strategist is simply one of many people contributing to a problem solving expedition. 

However their unique capacity to join up insight from across a marketing team means they are essential for building a successful digital proposition.

Whilse individual disciplines focus heavily on their own area, the strategist must be able to take a holistic view of the evidence and devise a clever, effective solution. 

Sounds simple in theory, yet fascinatingly complex in practice - which is probably why I enjoy it so much!


Categories: Elsewhere

Web Wash: How to Control Summary Text using Smart Trim in Drupal 7

Tue, 31/03/2015 - 10:36

The "Long text and summary" field has a pretty handy formatter called "Summary or trimmed". This will display a summary, if one is supplied, or Drupal will simply trim the text and display it.

The problem with this formatter is that you can't trim the summary. For example, if an editor adds three paragraphs into the summary section, then the whole summary is shown. But sometimes you may need control over how much of the summary is displayed. This is especially true if your design requires the teaser to have a consistent height.

What's the best way of offering a summary to your editors that also trims it? Enter Smart Trim.

The Smart Trim module is an improved version of the "Summary or Trimmed" formatter and a whole lot more. It does a lot of useful stuff, but the one we want to discuss is the ability to trim summaries.

Categories: Elsewhere

Drupal core announcements: Drupal 7 core release on Wednesday, April 1

Tue, 31/03/2015 - 08:32
Start:  2015-04-01 (All day) America/New_York Online meeting (eg. IRC meeting) Organizers:  David_Rothstein

The monthly Drupal core bug fix/feature release window is this Wednesday, April 1, and since it has been a while since the last one, I plan to release Drupal 7.36 on that date.

The final patches for 7.36 have been committed and the code is frozen (excluding documentation fixes and fixes for any regressions that may be found in the next couple days). So, now is a wonderful time to update your development/staging servers to the latest 7.x code and help us catch any regressions in advance.

There are three relevant change records for Drupal 7.36 which are listed below. This is not the full list of changes, rather only a list of notable API additions and other changes that might affect a number of other modules, so it's a good place to start looking for any problems:

You might also be interested in the tentative CHANGELOG.txt for Drupal 7.36 and the corresponding list of important issues that will be highlighted in the Drupal 7.36 release notes.

If you do find any regressions, please report them in the issue queue. Thanks!

Upcoming release windows after this week include:

  • Wednesday, April 15 (security release window)
  • Wednesday, May 6 (bug fix/feature release window)

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Categories: Elsewhere

Chen Hui Jing: Drupal 101: Mapping with Leaflet and IP Geolocation

Tue, 31/03/2015 - 02:00

Store locators are a useful functionality for businesses who have multiple outlets. Drupal has a number of map rendering modules that allow us to provide store locator functionality. This article will cover the basics of setting up a simple store locator with proximity search functionality.

Create and setup location content type

Required modules

  1. Install the required modules. drush dl addressfield geocoder geofield geophp ctools -y
  2. Enable the required modules. drush en addressfield geocoder geofield geofield_map...
Categories: Elsewhere

Drupal for Government: Govermenty forms even more governmenty with FillPDF and Rules

Mon, 30/03/2015 - 21:08

When working with government agencies the sacred form may raise it's fugly formatted head now and again.  Despite attempts at logic "Wouldn't an XLS spreadsheet be easier for everyone?" it sometimes comes down to what's simpler - gettin' er done vs doin' it right.... and if no one really cares about doin' it right, gettin' er done becomes the (sloppy) way, (half)truth, and (dim) light....

So yeah - I had a form that needed to be pixel perfect so that a state-wide agency could print the forms up and store them in a manilla folder... I started working with Views PDF.  This did generate pdf's... and along with mimemail and rules we were sending PDF's out... but they just weren't looking like folks wanted them... FillPDF - thank you.

To use FillPDF we started by installing pdftk (apt-get install pdftk on ubuntu) and then installing the module as per usual....  here's the rest step-by-step 

Categories: Elsewhere

Drupal Association News: Clever Ways to Raise Funds for D8 Accelerate

Mon, 30/03/2015 - 18:53

What’s the most clever way to raise funds for Drupal? Ask Ralf Hendel of Comm Press in Hamburg Germany.

The Drupal Association is working with the Drupal 8 branch maintainers to provide $250,000 in Drupal 8 Acceleration Grants that will be awarded to individuals and groups, helping them get Drupal 8 from beta to release.

Now The Association needs to raise the funds to support the grants and we are working with the Association Board to kick off a D8 Accelerate fundraiser. We are asking community members to help out and donate here. We all want to get D8 released so we can enjoy all the launch parties!

The good news is that we only need to raise $125,000 as a community because all donations will be matched! The Association contributed $62,500 and the Association Board raised another $62,500 from Anchor Donors: Acquia, Appnovation, by Lullabot,, Phase2, PreviousNext, and Wunderkraut.

Having Anchor Partners means…
Every dollar you donate is matched, doubling your impact.

Ralf Hendel, CEO of Comm Press, heard the call and took action in the most creative way. Over the last few years, Ralf learned how to play the piano (very well I might add) and he recently held a benefit recital where he played Bach, Schubert, and Skrjabin. Those attending were asked to donate to D8 Accelerate and together they raised €345. Of course, with the matching funds from our Anchor Partners, that contribution is €690.

At The Drupal Association, we are always amazed at the many talents our community has and we are especially thankful to Ralf for sharing his passion for music and Drupal with others and raising these funds.

There’s so many clever ways to raise funds to help D8 get across the finish line. What ideas do you have? Or if feel like going the traditional route, you can donate here.

Thanks for considering this opportunity to get Drupal 8 released sooner. If you would like to learn more about how D8 Accelerate grants are being given out, please read Angie Byron’s blog post.

Categories: Elsewhere

Drupalpress, Drupal in the Health Sciences Library at UVA: equipment booking system — managing reservation conflicts with field validation and EntityFieldQuery()

Mon, 30/03/2015 - 16:26

The first requirement of a registration system is to have something to reserve.

The second requirement of a registration system is to manage conflicting reservations.

Setting up validation of submitted reservations based on the existing reservation nodes was probably the most complex part of this project. A booking module like MERCI has this functionality baked in — but again, that was too heavy for us so we had to do it on our own. We started off on a fairly thankless path of Views/Rules integration. Basically we were building a view of existing reservations, contextually filtering that view by content id (the item that someone was trying to reserve) and then setting a rule that would delete the content and redirect the user to a “oops that’s not available” page. We ran into issues building the view contextually with rules (for some reason the rule wouldn’t pass the nid …) and even if we would have got that wired up, it would have been clunky.

Scrap that.

On to Field Validation.

The Field Validation module offers client-side form validation (not to be confused with Clientside Validation or Webform Validation based on any number of conditions at the field level. We were trying to validate the submitted reservation on length (no longer than 5 days) and availability (no reservations of the same item during any of the days requested).

The length turned out to be pretty straightforward — we set the “Date range2″ field validator on the reservation date field. The validator lets you choose “global” date format, which means you can input logic like “+ X days” so long as it can be converted by the strtotime() function.


Field Validation also gives you configurations to bypass the validation criteria by role — this was helpful in our case given that there are special circumstances when “approved” reservations can be made for longer than 5 days. And if something doesn’t validate, you can plug in a custom error message in the validator configuration.


With the condition set for the length of the reservation, we could tackle the real beast. Determining reservation conflicts required us to use the “powerfull [sic] but dangerous” PHP validator from Field Validation. Squirting custom code into our Drupal instance is something we try to avoid as much as possible — it’s difficult to maintain … and as you’ll see below it can be difficult to understand. To be honest, a big part of the impetus for writing this series of blog posts was to document the 60+ lines of code that we strung together to get our booking system to recognize conflicts.

The script starts by identifying information about the item that the patron is trying to reserve  (item = $arg1, checkout date = $arg2, return date = $arg3) and then builds an array of dates from the start to finish of the requested reservation. Then we use EntityFieldQuery() to find all of the reservations that have dates less than or equal to the end date request. That’s where we use the fieldCondition() with <= to the $arg3_for_fc value. What that gives us is all of the reservations on that item that could possibly conflict. Then we sort by descending and trim the top value out of the list to get the nearest reservation to the date requested. With that record in hand, we can build another array of start and end dates and use array_intersetct() to see if there is any overlap.

I bet that was fun to read.

I’ll leave you with the code and comments:

<?php //find arguments from nid and dates for the requested reservation $arg1 = $this->entity->field_equipmentt_item[und][0][target_id]; $arg2 = $this->entity->field_reservation_date[und][0][value]; $arg2 = new DateTime($arg2); $arg3 = $this->entity->field_reservation_date[und][0][value2]; $arg3 = new DateTime($arg3); $arg3_for_fc = $arg3->format("Ymd"); //build out array of argument dates for comparison with existing reservation $beginning = $arg2; $ending = $arg3; $ending = $ending->modify( '+1 day' ); $argumentinterval = new DateInterval('P1D'); $argumentdaterange = new DatePeriod($beginning, $argumentinterval ,$ending); $arraydates = array(); foreach($argumentdaterange as $argumentdates){ $arraydates []= $argumentdates->format("Ymd"); } //execute entityfieldquery to find the most recent reservation that could conflict $query = new EntityFieldQuery(); $fullquery = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'reservation') ->propertyCondition('status', NODE_PUBLISHED) ->fieldCondition('field_equipmentt_item', 'target_id', $arg1, '=') ->fieldCondition('field_reservation_date', 'value', $arg3_for_fc, '<=') ->fieldOrderBy('field_reservation_date', 'value', 'desc') ->range(0,1); $fetchrecords = $fullquery->execute(); if (isset($fetchrecords['node'])) { $reservation_nids = array_keys($fetchrecords['node']); $reservations = entity_load('node', $reservation_nids); } //find std object for the nearest reservation from the top $reservations_test = array_slice($reservations, 0, 1); //parse and record values for dates $startdate = $reservations_test[0]->field_reservation_date[und][0][value]; $enddate = $reservations_test[0]->field_reservation_date[und][0][value2]; //iterate through to create interval date array $begin = new DateTime($startdate); $end = new DateTime($enddate); $end = $end->modify( '+1 day' ); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($begin, $interval ,$end); $arraydates2 = array(); foreach($daterange as $date){ $arraydates2 []= $date->format("Ymd"); } $conflicts = array_intersect($arraydates, $arraydates2); if($conflicts != NULL){ $this->set_error(); } ?>
Categories: Elsewhere