Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 46 min 50 sec ago

Mediacurrent: Cleaner and semantic markup with Drupal’s views

Wed, 08/12/2015 - 19:53
img typeof=foaf:Image src=http://d1l4od7sxc8nwf.cloudfront.net/sites/default/files/styles/thumb_blog_spotlight/public/cleaner-semantic-markup-views-01.png?itok=Qoj0O1lI width=200 height=152 alt=Cleaner Markup with Drupal Views title=Cleaner Markup with Drupal Views / pA few months ago I wrote about a href=http://www.mediacurrent.com/blog/why-good-markup-matterswhy good markup matters/a. As a front-end developer, I interact with Drupal’s markup on a daily basis and I experience first-hand the benefits of good markup and the frustration of poor markup. A lot of the content on a Drupal website is produced by views. Whether they are out of the box or custom views, they are powerful and present us with great opportunities to manipulate the content and markup./p

Zivtech: Goodbye Ruby, Hello Node.js: Speeding up Sass

Wed, 08/12/2015 - 18:30
div class=field-image-photo img src=/sites/default/files/styles/large/public/Screenshot%202015-08-07%2015.41.38.png?itok=Yh-XQcTB width=588 height=250 alt= / /div div class=field-body Recently at Zivtech we started migrating our base theme for Drupal called a href=https://www.drupal.org/project/bear_skinBearskin/a over to a gulp-based CSS compiling system. Up until now we had been using a href=https://github.com/nex3/sassthe original Sass/a, written in Ruby, but lately it's been feeling a bit slow.br /br / The sluggishness of Ruby's Sass really started showing with very large projects, and became a nuissance when coupled with LiveReload. Let's face it, when you make a single CSS change, waiting for even a couple seconds can feel like an eternity. br /br / The first step to speed things up was to get rid of some mixins that we no longer needed. The low-hanging fruit was Compass. Compass is an amazing framework that we had come to rely on, but now that browsers have largely caught up with each other, there isn't been much need for Compass's vendor prefixing mixins. Instead, when we do need it we can use an a href=https://github.com/postcss/autoprefixerAutoprefixer/a or write our own mixin. Easy enough!br /br / After getting Compass and some other Ruby gems out of the way we saw some improvement, but not enough to make us happy! So the search continued...br /br / We decided as a group to move over to a href=http://gulpjs.com/Gulp/a and try to get rid of Ruby altogether.br /br / Why Gulp? Gulp is all node-based, so we were able to use a href=https://www.npmjs.com/package/gulp-sassgulp-sass/a for compiling our CSS. That gulp plugin is just a thin-wrapper around a href=https://github.com/hcatlin/libsasslibsass/a, a C/C++ implementation that is wicked fast, even for large projects. br /br / Some quick Google searches lead me to benchmarks performed by a href=http://www.solitr.com/blog/2014/01/css-preprocessor-benchmark/The Opinionated Programmer/a that compare several CSS preprocessors. Long story short, libsass is about 25 times faster than Ruby on a first run, and after Ruby has a sass-cache available libsass is still about 12 times faster. That's a massive improvement! /div span class=field-label Terms: /span ul class=field-taxonomy-vocabulary-2 inline li a href=/tags/javascriptJavaScript/a /li li a href=/tags/gulpgulp/a /li li a href=/tags/sasssass/a /li li a href=/tags/drupal-planetDrupal Planet/a /li /ul h3 class=field-label Related Services /h3 div class=panel-display panel-1col clearfix div class=panel-panel panel-col div div class=field-title h4Development/h4 /div div class=field-body High-quality robust websites and web applications are built for change to grow with your organization. /div div class=field-node-link a href=/services/developmentRead more/a /div /div /div /div div class=panel-display panel-1col clearfix div class=panel-panel panel-col div div class=field-title h4Product Development/h4 /div div class=field-body TCa.aS, short for Technical Cofounder as a Service, is a new type of software service relationship for product-focused startups and existing businesses looking to start a new venture or product line.  /div div class=field-node-link a href=/services/product-developmentRead more/a /div /div /div /div nav role=navigation class=links-inline/nav

Advomatic: Decoupling Drupal Without Losing Your Head — Part 2

Wed, 08/12/2015 - 18:08
From Styleguide to Final Product In the first article in our series we talked about how styleguide-driven development (SDD) and decoupling both serve many of the same goals, and SDD can do so in a way that avoids the many challenges of decoupling.  Now we’ll get deeper into the details of SDD and how we... a class=excerpt-read-more href=https://www.advomatic.com/blog/decoupling-drupal-without-losing-your-head-part-2 title=ReadDecoupling Drupal Without Losing Your Head — Part 2Read more #187;/a

Drupal Watchdog: VIDEO: DrupalCon Los Angeles Interview: Narayan Newton

Wed, 08/12/2015 - 16:38
div class=field field--body field-type-text-with-summary field-label-hidden field--rss pstrongNarayan Newton/strong (Partner, Tag1 Consulting), takes a break from spring-cleaning his infrastructures to recall a once-upon-a-time Drupal takeover of a hotel kitchen, and the “semi-gourmet” meal that resulted.br / He also divulges the nature of his continuous integration setup. (Jeeves. Or maybe Jason. Jenkins? I don’t know, something with a “J.”)br / Finally, he admits that “I vote for President based on hair, so, yes, I’d definitely vote for Dries.”br / BTW, this would be an excellent time for you to subscribe to emDrupal Watchdog/em: a href=https://drupalwatchdog.com/subscribe/2015https://drupalwatchdog.com/subscribe/2015/a/p /div div class=field field--tags field-type-taxonomy-term-reference field-label-above field--rss div class=field-labelspan class=icon glyphicon glyphicon-tag aria-hidden=true/spanTags:nbsp;/div div class=field-items a href=/tags/video typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Video/a a href=/tags/drupalcon-la typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=DrupalCon LA/a a href=/tags/drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal/a /div/div div class=field field--video field-type-video-embed-field field-label-above field--rss div class=field-labelVideo:nbsp;/div div class=embedded-video div class=player iframe width=640 height=360 src=//www.youtube.com/embed/VUJpnolDvaI?width=640amp;height=360amp;autoplay=0amp;vq=largeamp;rel=0amp;controls=1amp;autohide=2amp;showinfo=1amp;modestbranding=0amp;theme=darkamp;iv_load_policy=1amp;start=0amp;wmode=opaque frameborder=0 allowfullscreen/iframe /div /div /div

LevelTen Interactive: How to use Views RSS to create a Mailchimp RSS email campaign

Wed, 08/12/2015 - 16:18
img typeof=foaf:Image src=http://getlevelten.com/sites/default/files/styles/600x300/public/content/blog/images/mailchimp_rss_drupal.png?itok=UuC1WM7L width=600 height=300 alt= / pMailchimp provides a great tool for automatically sending out emails that pull information from RSS feeds (read more from Mailchimp on this topic at a href=http://kb.mailchimp.com/campaigns/rss-in-campaigns/create-an-rss-driven-campaignCreate an RSS-Driven Campaign with the Campaign Builder/a). However, wspan style=font-size: 16px;hen I first tried out the /spanMailchimpspan style=font-size: 16px; RSS campaign builder with Drupal's out-of-the-box RSS feed, there were some things that didn't work well./span... a href=/blog/kristin-brinner/how-use-views-rss-create-mailchimp-rss-email-campaign class=more-linkRead more/a/p

Four Kitchens: Use Grunt and AdvAgg to inline critical CSS on a Drupal 7 theme

Wed, 08/12/2015 - 10:34
div class=field-body pInlining critical CSS on a dynamic CMS such as Drupal or Wordpress doesn#8217;t have to be a pain. Using the Fourword as an example, we#8217;ll go through the process of generating critical CSS, inlining the file dynamically, and asynchronously loading the remaining CSS aggregates using the AdvAggnbsp;module./p /div

Foster Interactive: DrupalNorth.org - Tales from the Trenches, Building the First Multilingual Conference Site in Drupal 8 Beta

Wed, 08/12/2015 - 10:00
Learn about our experience building DrupalNorth.org in Drupal 8 Beta. We were very impressed with D8#039;s new features, but also shed a few (Many) tears with some very frustrating challenges in the build. Read our first impressions on Twig, Multilingual Support, Beta-to-Beta migrations, amp; Configuration Management. I#039;ve also added few tips for diving into D8, and highlighted some challenges I think will make scare off some early adopters from learning D8.

Modules Unraveled: 144 Using the Open Sourced Red Test Framework Instead of Simpletest for Faster Drupal 7 Testing with Neerav Mehta - Modules Unraveled Podcast

Wed, 08/12/2015 - 07:00
div class=field field--name-field-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evenimg typeof=foaf:Image src=https://modulesunraveled.com/sites/default/files/styles/podcast_default/public/podcast/image/NeeravMehta.jpeg?itok=VnUkKLIL width=350 height=424 alt=Photo of Neerav Mehta //div/div/divspan class=submitted-byPublished: Wed, 08/12/15/spandiv class=field field--name-field-podcast-file field--type-file field--label-hiddendiv class=field__itemsdiv class=field__item evendiv class=mediaelement-audioaudio src=http://traffic.libsyn.com/modulesunraveled/144_Using_the_Open_Sourced_Red_Test_Framework_Instead_of_Simpletest_for_Faster_Drupal_7_Testing_with_Neerav_Mehta_-_Modules_Unraveled_Podcast.mp3 class=mediaelement-formatter-identifier-1439362587-0 controls=controls /audiodiv class=mediaelement-download-linka href=http://traffic.libsyn.com/modulesunraveled/144_Using_the_Open_Sourced_Red_Test_Framework_Instead_of_Simpletest_for_Faster_Drupal_7_Testing_with_Neerav_Mehta_-_Modules_Unraveled_Podcast.mp3Download this episode/a/div/div/div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item even property=content:encodedh2Automated Testing/h2 ulliBefore we actually get started talking about Red Test, can we take a step back and talk about what automated testing is in general? ulliI am sure you are all aware of manual testing and QA. Once you build a site or a feature in the site, you go to the browser and test it out. As an example, you added a workflow to your blog post. You will go to the browser and test whether the blog you create gets the draft state. Then you will log in as an editor and you will move it to published state. Now you will log out and check whether the blog post is visible to anonymous users. What you are doing is manual testing. It works very well for smaller projects./li liFor bigger projects, and especially for projects with multiple developers, what starts happening is adding a feature may break an older feature. Let’s take the example above. Earlier all the blog posts used to be published by the writer directly as soon as he saved the form and an email used to go out to all your blog subscribers that a new blog has been created. Now after adding the functionality to save the blog post as a draft state, you want the email to go out only after the blog post has been published. Suppose the developer changed and tested the workflow functionality without changing the email sending rule and pushed the feature to live site. You will soon be flooded by complaints from your blog subscribers./li liThis is a very simple example but such problems increase exponentially when the software grows in size over time. Such problems can be prevented by having automation testing in place. For each feature in your software, you write test code and you run all these tests often, and especially after working on a feature. You push your new feature to production only after all the tests pass. This way, as long as you have ample test coverage, you minimize your chances of finding a bug on the production site./li /ul/li liWho generally does this testing, the developer? site-builder? site-owner? ulliThere are different schools of thought here. In practice, I have seen two different approaches: ulliIf you are following test-driven development, then the developer writes these automated tests. In fact, he writes the tests before he even writes the code for the feature and makes sure that the tests fail. Then he implements the feature and makes sure that all the tests pass. In our company, our developers write the tests but that’s usually done after he has implemented the feature. We are experimenting with test driven development as of now./li liThe other approach I have seen in having a separate QA team for testing. They write automated tests as well as do manual QA. The advantage of this approach is that you can hire QA person, who is usually much cheaper than a developer. The problem I have seen in this approach is miscommunication between the developer and tester. Because of the delay due to communication and also since tester writes the tests after developer has completed the task, as compared to in parallel, it takes more time for a feature to get out of the door./li /ul/li /ul/li liWhat do these automated tests test for? ulliIdeally everything but practically that’s not possible. As everything in life, this follows pareto rule. 20% of tests will cover 80% of the functionality and you should definitely write these 20% tests. In addition to that, we follow a rule that no bug should appear on production twice. So if a bug is found on production, we write an automated test for it so that it doesn’t appear on production again. What these tests should cover is very dependent on your application. If you are building an information blog site with a beautiful theme and you are making changes mostly to the theme, then you should write regressions tests for your CSS and JS. On the other hand, if your site has a lot of custom business logic, access permissions and rules, then focus on testing the logic./li /ul/li liI always assumed tests were for functionality, can you give me an example of something you would test on the theme layer?/li liI have to admit that I haven’t ever written an automated test for any of the sites I’ve built. I did have an experience a little over a year ago where the videos on my site (that were supposed to be behind a pay-wall) weren’t because I made a change to panels that messed up the access control. I didn’t realize it for two months! So, if I had had tests in place to check the access to those videos, I would have been in better shape. So, even though my site is a small site in the grand scheme of things, even I can bennefit from writting appropriate tests./li /ulh2RedTest/h2 ulliRed Test, as I understand it, is an open source integration testing framework for Drupal that you developed at Red Crackle. Can you tell us briefly what it does and why we should use it? ulliRed Test is an open-source integration testing framework for testing your Drupal applications. If you have multiple developers working on a big Drupal application stretching into months, you know that you need automated testing to keep adding more and more functionality without breaking old code. Red Test is ideal for testing: ulliSite structure and configuration/li liCustom business logic of your application/li liUser access, roles and permissions/li liRules/li /ul/li /ul/li liDrupal 7 supports Simpletest by default. Simpletest has unit testing and functional testing. Why do we need another automated testing solution? How is Red Test different from Simpletest and why should people use it? ulliYou correctly mentioned that Drupal 7 supports Simpletest by default. In real life, when you are working on a big project, there are quite a few challenges when you test Drupal sites. ulliDrupal assumes that there is a persistent database connection available so any hook or function is free to access the database at will. This means that any function that accesses the database, unit testing is not possible. You can obviously refactor your code but that takes a long time. Also since Drupal stores all the configuration in the database, most of your custom code will need to access the database anyway./li liFor every test, simpletest creates a new test environment that has only minimal modules enabled. So if you want to test your current site with all the configuration, you have to first set all that configuration in code and then run the tests. That is too much of an overhead./li liFunctional testing in Simpletest is very slow because it uses a headless browser and every request needs to bootstrap Drupal. It’s not uncommon for a test suite on a large site to take multiple hours to finish./li /ul/li liRed Test alleviates these problems. It is an integration testing framework so it tests your site with the current configuration. It actually depends on the database so there is no need to refactor your code to make it work with Red Test. In fact, Red Test code is totally separate from Drupal code. We have created Red Test so that it runs in parallel on multiple processors of your machine and bootstraps Drupal only once at the start so it is 60 times faster than Simpletest./li /ul/li liA lot of Drupal developers have started using Behat which helps in testing your site functionally through a browser. With Behat gaining traction, is there still a need for Red Test? ulliBehat is an excellent tool and in fact, we use it in addition to Red Test. Since Red Test is an integration testing framework written in PHP and resides on the server, it can’t really test the javascript. So wherever JS functionality needs to be tested, Behat is the right tool. On the other hand, for testing all the other business logic in the application, we use Red Test. If you have used Behat on a big project, you will know that creating and especially maintaining Behat tests takes a long time. Every time an HTML id changes, Behat test needs to be changed./li liSimilarly, when you add a new required field in a form, Behat test needs to be updated to fill that field in the form. Red Test, on the other hand, knows about Drupal and its entities, nodes, people, roles and permissions. So it does a lot of tasks automatically in the background. As an example, if you added a new required field to a node form, Red Test will automatically fill suitable values in that field without you having to change anything in your tests. This makes it very easy for you to create and develop tests on Red Test./li liIn fact, we have done some measurement over the last couple of months and found that with the latest version of Red Test, creating and developing automated tests takes about 12% of total development time./li /ul/li liIs it easy to get started with writing automated tests using Red Test? ulliYes, we are using all the standard PHP tools so it’s pretty easy for a developer to get started. Red Test uses Composer for installation and is based on PHPUnit. In fact, we measured how much time it takes a newbie to create the first integration test using Red Test and it comes to be a little less than 15 minutes. Below is the blog post you can follow to get started: http://redcrackle.com/red-test/documentation/first-integration-test/li /ul/li /ulh2Use Cases/h2 ulliWhat are some concrete examples of what you should test? ulliRed Test is ideal for testing: ulliSite structure and configuration/li liCustom business logic of your application/li liUser access, roles and permissions/li liRules/li /ul/li liIf you are building just a basic informational site on Drupal without much functionality, you may not want to use Red Test. Use it only if you are building a large Drupal application./li /ul/li liWhat’s in the future for Red Test? Do you have improvement plans, or plans to integrate with D8? ulliCurrently a developer needs to create tests using Red Test. We are considering whether enhancing it so that it works using Gherkin language makes sense. The next obvious step is to migrate it to Drupal 8./li /ul/li /ul/div/div/divdiv class=field field--name-field-items-mentioned field--type-link-field field--label-abovediv class=field__labelEpisode Links:nbsp;/divdiv class=field__itemsdiv class=field__item evena href=https://www.drupal.org/u/neeravbm rel=nofollow target=_blankNeerav on drupal.org/a/divdiv class=field__item odda href=https://twitter.com/redcrackle rel=nofollow target=_blankRed Crackle on Twitter/a/divdiv class=field__item evena href=http://redcrackle.com/blog rel=nofollow target=_blankBlog post/a/divdiv class=field__item odda href=http://redcrackle.com/red-test/documentation/first-integration-test rel=nofollow target=_blankWrite a Red Test in under 15 minutes/a/divdiv class=field__item evena href=http://redcrackle.com/red-test/documentation/testing-blocks rel=nofollow target=_blankTesting blocks using Red Test/a/div/div/divdiv class=field field--name-field-tags field--type-taxonomy-term-reference field--label-abovediv class=field__labelTags:nbsp;/divdiv class=field__itemsdiv class=field__item evena href=/tags/automated-testing typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Automated Testing/a/divdiv class=field__item odda href=/planet-drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=planet-drupal/a/div/div/div

Realityloop: Automating image optimision with Drupal to improve performance

Wed, 08/12/2015 - 05:45
div class=field field-name-post-date field-type-ds field-label-hidden span class=day12/span Aug /div div class=field field-name-author field-type-ds field-label-hidden Brian Gilbert /div div class=field field-name-field-imageimg typeof=foaf:Image src=http://realityloop.com/sites/realityloop.com/files/optimise-all-the-images.png width=620 height=291 alt= //divdiv class=field field-name-bodypRecently I blogged a href=http://realityloop.com/2015/07/22/6-image-related-website-performance-tips6 tips for manually optimising images/a, now I’m going to show you how to do it automatically with Drupal!/p pSome time ago we undertook a performance audit for the website of a substantial local news service. One of the areas I found that we could increase the performance of their website was to compress their numerous images./p pAfter identifying the commands to apply using the various optimising programs we found that the ImageAPI Optimize module got us some of the way there. We were then able to develop a patch to implement the extra binaries and later gain co-maintainer status, allowing us to improve the module further./p h3What is the ImageAPI Optimize module/h3 pThe ImageAPI Optimize module allows you to preprocess and optimise uploaded JPG and PNG images that get generated via an Image Style rather than use Drupal’s inbuilt compression which only affects JPG files./p pDespite the name, the D7 version of this module does not depend on ImageAPI. It depends only on the core image.module./p pIt allows the use of multiple binaries, some of which are lossy compressors, so note that you may want to only use some of the tools listed below./p ol li ul li ul liDownload and enable the required modulebr / https://www.drupal.org/project/imageapi_optimizebr / nbsp;/li liConfigure appropriatelybr / Navigate to /admin/config/media/image-toolkit in your site and select the ImageAPI Optimize radio button, then click Save.br / nbsp;picture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/138/imageapi_optimize_settings-1.png?itok=urloTBdXamp;timestamp=1439351113 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/138/imageapi_optimize_settings-1.png?itok=6LkCfANDamp;timestamp=1439351113 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/138/imageapi_optimize_settings-1.png?itok=NfEGY71lamp;timestamp=1439351113 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/138/imageapi_optimize_settings-1.png?itok=PtU6u3DMamp;timestamp=1439351113 alt= title= / /picture pNow you will need to set your ImageAPI Optimize Base Toolkit, you’ll if you have Imagemagick on your server you may want to select that instead of GD./p pThen you want to configure the ImageAPI Optimize Service settings.br / br / To find the path for each of the binaries you can run the following commands in terminal on your server, one at a time, and copy the output into the relevant fields, if there is no output then you can follow the instructions in step 3 to install the binary in question./p pre which advpng which optipng which pngcrush which advpng which advdef which pngout which jpegoptim which jfifremove/pre pThen in the advanced settings for the jpeg tools I recommend you set the output to be a progressive jpeg. For more on why this is a good idea see the following links:br / http://calendar.perfplanet.com/2012/progressive-jpegs-a-new-best-practice/br / http://blog.patrickmeenan.com/2013/06/progressive-jpegs-ftw.html/p picture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/138/imageapi_optimize_settings-2.png?itok=nFBb8S51amp;timestamp=1439351113 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/138/imageapi_optimize_settings-2.png?itok=0ssT95Bvamp;timestamp=1439351113 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/138/imageapi_optimize_settings-2.png?itok=743ExLy1amp;timestamp=1439351113 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/138/imageapi_optimize_settings-2.png?itok=1QXVoWOBamp;timestamp=1439351113 alt= title= / /picture/li liSet-up image compressors on your webserver amp; development computer if they weren’t on your serverbr / br / I will only provide instructions for Debian based Linux variants, and OS X (where homebrew is installed) here.br / br / strongadvpng/strong (lossless) which is part of the advancecomp package http://www.advancemame.it/comp-readme.htmlbr / nbsp;nbsp;nbsp; Linux: apt-get install advancecompbr / nbsp;nbsp;nbsp; OS X: brew install advancecompbr / br / strongOptiPNG/strong (lossless) http://optipng.sourceforge.netbr / nbsp;nbsp;nbsp; Linux: apt-get install optipng (ensure you are using a version 0.7.5 or higher)br / nbsp;nbsp;nbsp; OS X: brew install optipngbr / br / strongPngcrush/strong (lossless) http://pmt.sourceforge.net/pngcrush/br / nbsp;nbsp;nbsp; Linux: apt-get install pngcrush (ensure you are using a version 0.7.5 or higher)br / nbsp;nbsp;nbsp; OS X: brew install pngcrushbr / br / strongpngout/strong (lossless) http://www.jonof.id.au/kenutilsbr / nbsp;nbsp;nbsp; Linux: download binary archive and extract to /usr/local/binbr / nbsp;nbsp;nbsp; OS X: download binary archive and extract to /usr/local/binbr / br / strongpngquant/strong (lossy) https://pngquant.org/br / nbsp;nbsp;nbsp; Linux: apt-get install pngcrush (ensure you are using a version 0.7.5 or higher)br / nbsp;nbsp;nbsp; OS X: brew install pngquantbr / br / strongjpegoptim/strong (lossless amp; lossy) https://github.com/tjko/jpegoptimbr / nbsp;nbsp;nbsp; Linux: apt-get install jpegoptimbr / nbsp;nbsp;nbsp; OS X: brew install jpegoptimbr / br / strongjpegtran/strong (lossless) which is part of jpeglib package http://jpegclub.org/br / nbsp;nbsp;nbsp; Linux: apt-get install libjpeg-progsbr / nbsp;nbsp;nbsp; OS X: brew install libjpegbr / br / strongjfifremove/strong (lossless) http://lyncd.com/files/imgopt/jfifremove.cbr / You need to compile it and then copy it into your path:br / br / prewget http://lyncd.com/files/imgopt/jfifremove.c gcc -o jfifremove jfifremove.c mv jfifremove /usr/local/bin/pre/li /ul /li /ul /li /ol h3What is the real world effect?/h3 pThis acts on any image that is displayed via an image preset. The original images are not affected. I can’t personally think of a case any time recently where we are displaying original uploaded images so for our usage this is perfectly acceptable./p pFilesize saving in a really simple test of an iPhone6+ screenshot in PNG format showed a reduction in size of around a quarter./p h3What to do If you are using shared hosting../h3 pOdds are that you won’t be able to install the tools above using the method shown. You’ll likely need to create statically linked binaries so that you can upload them to the server./p pA statically linked binary is an executable that doesn’t require any support libraries as they are included in the binary itself. This results in a binary that will run on any system of the right CPU type (i386, x86_64) The downside of this is that the resulting binary ends up being larger./p pNormally, when you download a tarball of source code, you’ll do the standard “configure; make; make install” to build it. If you want a statically linked binary, replace the plain “make” with:/p pnbsp;nbsp;nbsp; make SHARED=0 CC='gcc -static'/p pYou will need to do this on a machine with the same architecture as your shared hosting./p h3Pro tip/h3 pIt’s possibly worth using the ImageCache Actions module to automatically convert gif’s to png, because there isn’t really any good case for using gif’s now, especially with the above in place, unless your site expects animated gifs to be uploaded but if displayed via an image style these animations would become static anyway./p /divdiv class=field field-name-field-tagsdrupal planet/div

OSTraining: Use Rules to Automatically Update Drupal Content

Wed, 08/12/2015 - 02:32
pIn my opinion, there are two modules that illustrate the power of Drupal better than any others./p pThe first module is Views, which most people become familiar with as soon as they learn Drupal. The other is Rules./p pRules is the basis for almost any workflow that's set up in Drupal. You probable need Rules, whether you're running an intranet, a social network, an e-commerce site, or any site that needs First this, then that commands./p pIn this tutorial, we're going to show you how to use Rules to automatically update a node. We're going to make a record of the past person to see this node:/pimg src=http://feeds.feedburner.com/~r/ostrainingdrupal/~4/b-1DzpfMaMk height=1 width=1 alt=/

Drupal Watchdog: The Tao of the Wayfinder

Tue, 08/11/2015 - 21:29
div class=field field--article-edit-printtype field-type-list-text field-label-hidden field--rss Feature /div div class=field field--article-body field-type-text-long field-label-hidden field--rss pimg src=/sites/default/files/images/web/DW5.01-Tao.png alt=Photo of landscape width=50% align=right class=img-responsive img-thumbnail margin-left / Everyone working on software has a baseline competency with communication, yet it’s not unusual to see the time required to communicate effectively viewed as a distraction from the real task at hand. People seeking to deliver valuable software in a more timely and reliable fashion tend to turn to concrete changes – a new ticket system or software tool, more developers, performance bonuses – rather than delve into developing communication skills, despite the many concrete ways improved communication can increase a project’s momentum./p h3Set and Communicate Goals for Response Time/h3 pYou’ve probably experienced some form of the information black hole. Maybe you put in a request to have an account created but have no idea if it will be minutes or months until the request is fulfilled. It’s important, but not urgent, and you don’t want to be “that person” who demands immediate attention. If only you knew how long it should take, you could set aside the stress of not knowing. Then, if a response didn’t arrive when it should have, you’d know it was time to double-check./p pBoth individuals and teams can:/p ulliSet honest response times; /liliCommunicate them clearly and visibly; /liliMonitor how they’re living up to those goals; /liliAdjust processes or goals accordingly. /li/ulp People are free to focus on other things when they know how long they have to wait./p p Setting such expectations also frees you from more “Is it ready yet?” e-mails. Sending an auto-reply or a cut-and-paste acknowledgement like this should do the trick:/p p “If your request hasn’t been answered in three working days, something has gone amiss. Poke us with a stick by e-mailing a href=mailto:stick@ourcompany.comstick@ourcompany.com/a.” /p p It can be as formal or as playful as suits your needs./p /div

Palantir: D8FTW: Storing data in Drupal 8

Tue, 08/11/2015 - 21:10
span class=featured-blog-image img typeof=foaf:Image src=https://www.palantir.net/sites/default/files/styles/bloglandingpage-thumbnail/public/blog/images/Storing-Data.png?itok=yn_BxQKd width=262 height=175 alt=Storing data in Drupal 8 blog post illustration title=Storing data in Drupal 8 blog post illustration / /span pNewsflash: Storing and retrieving data is rather the point of a Content Management System like Drupal. Of course, not all content is created equal. Some needs a robust structure and curatorial controls built around it, while other data isn't really content at all but administrator-defined configuration. The way those need to work can vary widely./p pIn Drupal 7, developers had three not all that great ways of storing data: Entities (usually nodes), the Variables table, and here's an SQL connection, enjoy! That doesn't cut it for modern sites, unfortunately. What's more, everything was stored in a single SQL database which is part of what made configuration staging so difficult in Drupal 7; we had to build complex systems to extract the configuration out of arbitrary SQL tables, serialize it, and put it back in./p pNot surprisingly, Drupal 8 has largely fixed that problem by tackling the different types of data that may need to be stored, each with their own dedicated APIs. Of course, moving from one big blob of data (aka, arbitrary SQL) to structured APIs requires changing the way you think about arbitrary data. So let's review the different ways to store stuff in Drupal 8, and where each of them is useful./p h3State/h3 pThe simplest option is the Drupal State API. The State API is a simple key/value pool for values that are, by design, specific to a single Drupal install. Good examples here include the timestamp of the last cron run, generated optimization lookup tables (which should not get cleared as often as the cache does), the currently active theme, and so on. These are all values that are not user-provided configuration, and would make no sense to deploy from staging to production or vice versa./p pState can store values of any type, as they will be serialized and unserialized automatically. However, not all object types can be serialized. In particular, any object that has a dependency on a service should never be serialized. Only serialize value objects./p pNote that every read of a state value is a new hit against the underlying database. If you're loading multiple values out of state for some reason, use the getMultiple() method./p pThe state API is a single namespace, so be sure to namespace your state entry key names with your module name, like mymodule.last_person_hugged./p h3Key/Value/h3 pThe State API is itself just an abstraction layer on top of the Key/Value API. The Key/Value API allows the storing of any arbitrary serializable value, with the keys namespaced to a collection. The state is simply one collection./p pIt's also possible to use your own collection, directly accessing the Key/Value API. However, if you're going to do that it's helpful to define your own class that composes the Key/Value factory service, much the same way that the State API does. At the moment there aren't many tools to quickly replicate that functionality, but the process is straightforward and the State class itself is readily copy-pasteable. Most of the non-trivial code in it is simply to cache loaded values so that the Key/Value store is not hit multiple times per request for the same value./p h3Content/h3 pContent in Drupal 8 means the Entity API. Drupal Entities are much more rigidly structured than in an ORM like Doctrine. There are three layers to the Entity API, conceptually:/p olliEntity Types define different business logic for different objects. What that logic is varies on the Entity Type. Generally a new Entity Type involves writing a new PHP class. Examples includes Nodes, Users, Taxonomy Terms, Comments, and Custom Blocks. /li liEntity Bundles are different configurations of the same Entity Type, with a different Field configuration. Creating one involves setting up configuration, which in (nearly) all cases involves an administrator pushing buttons. page nodes, article nodes, and event nodes are examples of different bundles of the node Entity Type./li liFields are the smallest basic unit of Drupal content. A field is a single rich-value. Rather than string or int it is a value like email address, formatted text, or telephone number. It can also be a reference to another entity. All entity objects can be viewed as a collection of Fields, each of which may be single- or multi-value. (As far as the code is concerned Fields are always multi-value, but may be configured to only bother storing one value.)/li /olpThe key aspect of Content is that it is generally user-generated and of potentially infinite cardinality. (That is, there's no limit on how many entity records a user can create.) Unlike in previous Drupal versions, however, the Entity API is robust enough that it is reasonable to use for nearly all user-provided data rather than just a select few types./p pIf you want users to be able to enter data into the system, and there's no hard-coded low limit to how many entries they can make, Entities are your tool of choice. Building a custom entity is also much more viable than in past versions, so don't be afraid to define your own Entity Types. There's no need to just piggy-back on nodes anymore./p pContent Entities are also translatable into different languages. The capability is baked into all Field types, making multi-lingual content a breeze./p h3Configuration/h3 pThe most important new data system in Drupal 8, though, is the Configuration system. The Configuration system replaces the variables table, the features module, half of the ctools module suite, and the myriad custom tables that various modules defined in previous versions with a single, coherent, robust way to store, manage, and deploy administrator-provided configuration./p pThat last part is key. The Configuration system is your go-to tool if:br / 1) Users on the production site should not be changing these values. If they should be changing values on production, you probably meant for it to be Content.br / 2) If you have a staging site, you will typically be editing on the staging site and then deploying to production en masse.br / 3) Affects the business rules of the module or site./p pFor the Drupal 7 users, pretty much anything for which you ever thought this should really be in a Feature module now belongs in Configuration./p pThe configuration system is modeled as a namespaced key-value store (although it does not use the Key/Value system internally, as the implementations are quite different). The keys are dot-delimited strings, and the values are specifically Configuration objects. Config objects have get() and set() methods to manage properties on the object, among other features we won't go into here./p pMost importantly, config objects can be safely serialized to YAML and unserialized from YAML. That's what differentiates the Configuration system from the other data storage systems: It's canonical form is not in SQL, but YAML that can be loaded into the system or exported from it. Modules can provide default configuration files in YAML, which will get imported into the site when they're installed. A site can also export some or all of its configuration files to a known directory on disk. That could be hundreds of files, but that's fine. Once in that directory the files can be easily checked into Git, checked out on another server, and imported from files back into config objects in Drupal. Configuration deployment: Solved!/p pYou will also run across something called Configuration Entities. This seemingly mixed concept is a way of providing CRUD behavior using the basic Entity API but backed by the Configuration API. Configuration Entities do not have Fields, but otherwise use essentially the same API. Configuration Entities are useful for cases where a user or administrator may be making multiple instances of a given configuration object. They're also the storage mechanism underlying Plugins./p pConfiguration objects are also translatable, which allows sites to make string value configuration available in the language of their users./p h3Tempstore/h3 pTempstore is a bit of an odd duck of Drupal 8's data storage world. It's provided not by core but but the user module, and there's actually not one but two different tempstores: one private, one shared./p pA tempstore is for data that needs to be persisted between requests without being saved back to the canonical storage (such as an entity or configuration object). If that sounds like PHP's native session handling, it should; the use case is very similar. The main difference is the shared tempstore is, as the name implies, shared between users, whereas sessions are, by design, not./p pThe quintessential (and original) example of that behavior is Views. A View is stored as a configuration entity. You don't want the View to be incrementally updated every time a single field is changed, though; you want to make a series of changes and then save the changes all at once. Instead, a temporary copy of the View config entity is saved to the shared tempstore every time a setting is changed. That allows changes to survive a browser restart, or a lunch break, without affecting the live copy of the View. It can even be picked up by another user if the first user gets delayed or goes on vacation and forgets to hit save. When the View is saved then the temporary copy is written back to the configuration system and the temporary version cleared. /p pThe private tempstore works the same way, but its values are not shared between users. That makes it more appropriate for wizard-type interfaces or multi-step forms./p pBoth tempstores are backed by the Key/Value API internally. The Key/Value API offers a variant called expirable, where values will get cleared out eventually, say if a View is left mid-edit for several days, which tempstore uses. In practice, unless you're building complex multi-step UIs you won't run into tempstore very often./p h3Cache/h3 pAnd finally, we have the cache system. Drupal 8's cache system is actually far more robust than its predecessors, and is heavily leveraged by the rendering system. That's a topic for another time, though. For now, we're just looking at cases where you'll use it directly./p pThe general rule for caching something is is it more expensive to compute this value than to look up an old version from the database? Database calls are not cheap. (Even if not using SQL, you're still making some kind of I/O call which is the most expensive thing you can do in a program). Don't cache something in the cache system until and unless you know it's going to be helpful to do so. Often, that is other I/O intensive calls, like a web service call or a complex set of queries./p pAnother important rule for caching is that it should be for performance only. If the cache is wiped clean of all data, your code should still run. It may run slower, the site may run too slowly to be usable, but no irreplaceable data has been lost. Never, ever store data in the cache that you cannot recreate on-demand if needed. Similarly, don't store generated and regeneratable data elsewhere. That belongs in the cache./p h3What to choose?/h3 pWith so many options, how do you know where to put your data? While the lines are not always crystal clear, the following pointers should cover most cases./p pIs it purely a performance optimization, and the data can be regenerated if needed? If yes, Cache./p pShould it be configured on staging and pushed to production? If yes, use the Configuration system. If there will be an arbitrary number of them, use Config Entities./p pWas it in the variables table before, but not something to push from staging to production? If so, it likely belongs in State./p pIs it user-generated content on the live site? Most likely it should be a Content Entity./p

Shitiz Gag's Blog: [GSoC 2015: Hawk Authentication] Week 12: Unit testing and finishing the modules

Tue, 08/11/2015 - 20:03
pGSoC is wrapping up in another two weeks, that means it’s time to start wrapping up the module and make it in a shippable state. For that, I have started working on unit tests as well as documentation./p pstrongUnit Tests/strong/p pUnit tests help maintain a project in long term as they can help automatically detect if a change is made by someone in future doesn’t break some other part of the module, for example a change in the header library is to add some features that could result in breaking of an obscure client function that has been there since version 0.1. If the function has unit test coverage, it would get caught before the module gets released to the general public and would prevent some hassle./p pMy goal is to cover as many test cases as possible, accounting for general and exceptional cases. So far I have done basic Hawk Auth tests and nonce validation tests, I’ll be working on unit testing permissions, security and validation. I had to spend some time in order to figure out how Drupal does unit testing as that is something I’m not really familiar with and I haven’t done a lot of unit testing before so this was a good opportunity for me to pick up and implement some test cases to become more familiar with it./p pA wall I ran into was when I was trying to use existing routes implemented by system module’s test submodule router_test in order to test whether Hawk Authentication was working. After a couple hours of tinkering it occurred to be that the route I was using was specifically mentioning basic_auth. After spending a few hours on this and realising that I was trying to get around something which was intentionally the way it is. I implemented my own custom module just for testing. The module provides a few basic routes in order to emulate controllers while the unit tests run. For example, a route simply shows the current logged in user’s username, this is to ensure Drupal is correctly identifying users via Hawk. As I implement more tests, I’ll implement more controllers to help them./p pstrongDocumentation/strong/p pSince my blog has been accepted into Drupal Planet last week, I’ve started working on writing a few posts to recap the GSoC journey of mine as well as provide introductions to Hawk, Hawk Auth module and the project itself. Hopefully these articles will help people understand the protocol and the project better. I’m trying to get a few posts out this week and the next week./p pFor now that is all, I’ll continue with unit testing and documentation until the next week./p pThank you!/p

Michael J. Ross: Drupal Taxonomy Tips and Tools

Tue, 08/11/2015 - 17:02
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedh2Website Adaptability, One Tag at a Time/h2 pBy a href=http://www.ross.ws/about rel=authorstrongMichael Ross/strong/a/p p class=publication_infoA shorter version of this article was published in the print magazine a href=http://drupalwatchdog.com/citeDrupal Watchdog/cite/a, Volume 5 Issue 1, span class=dateSpring/Summer 2015/span, on pages 32-33, by a href=http://www.tag1publishing.com/Tag1 Publishing/a. The magazine was distributed at a href=http://events.drupal.org/losangeles2015Drupalcon Los Angeles/a, span class=date2015-05-11/span. The article was also a href=https://drupalwatchdog.com/volume-5/issue-1/drupal-taxonomy-tips-and-toolspublished/a on their website./p pWhen comparing the most commonly-used content management frameworks, web developers typically cite Drupal's robust support for taxonomies as one of its leading strengths. This should come as no surprise to anyone with even minimal experience in using taxonomy vocabularies and their terms in designing and building new websites, largely because they provide a proven way to categorize and make findable the content of any website, with relatively little effort./p pSpecifically, every piece of content can be tagged with zero or more terms defined within an unlimited number of vocabularies, and these tags can be used in myriad ways for grouping and sorting that content. In the case of a taxonomy term reference used by a view of one or more content types, the sort order and filtering can be specified by the developer using the Views interface or within a custom module, or that functionality can be exposed to the end-user, giving her even greater control over what data is displayed./p pThe judicious use of taxonomies can be a powerful component of any content strategy that is intended to grow and change in the future as a website's owners and users demand new ways to organize the site's content so as to minimize the time and steps required to find specific content. This is true not just for on-page site visitors, but also for people consuming that content in RSS aggregators for whom only some of the content is of interest — for example, everything published in a particular category or during a certain month./p pIn this examination of some best practices, techniques, and useful contrib modules associated with taxonomies, it is assumed that the reader has a basic understanding of vocabularies and terms./p h2Select Field Versus Taxonomy/h2 pWhen adding to a content type a new field that will contain a value from a predefined list of possibilities, you have the option of utilizing a field of type List (text) (or one of the two numeric variants of List), and setting the Allowed values list on the field settings page. Or, you can employ a taxonomy term reference, which, as the name implies, refers to a term in the taxonomy vocabulary specified when creating the field. There are no absolute rules as to which of the two methods are best, but here are some sensible guidelines:/p ulliPerhaps you want the client to be able to add, change, or remove the allowed values of the field in question, without risking the dangers of permitting the client — and having to explain how — to edit that field settings in the content type. Then taxonomy is definitely the right choice. Even if you will likely never alter the list — for example, the names of Canadian provinces — then a select list should work fine as the field type./li liIf tag modification is not an issue, then consider whether or not the new field is needed for the content type to make sense, for example, a state or province name in a postal address. In such cases, a list field may be called for. Conversely, if the field simply adds additional information independent of the content's identity, then a term reference would be optimal, as it is more loosely coupled from the other fields in the content type. For instance, an article filed under a Technology category is still an article if you were to remove the category association, so taxonomy would be a good fit./li liIf database performance is an issue, then a list field would make more sense than a taxonomy term reference, because the latter involves additional table joins./li liFinally, if the field needs to support hierarchies or focused RSS feeds, then you should use a taxonomy field. (A summary of the possible types of hierarchies follows.)/li /ulh2Less Taxing Taxonomies/h2 pWhile the Taxonomy module built into Drupal 7 core makes it possible to build an unlimited number of useful vocabularies, that building process can be quite tedious. Do you have hundreds of country names to enter, and dread the clicking and pasting? Fortunately, there are several contrib modules that can be tremendously helpful in reducing the time and effort required./p pAs its name suggests, a href=https://www.drupal.org/project/taxonomy_managerTaxonomy Manager/a provides far more control than the core module for working with vocabularies, including the addition and deletion of multiple terms in a single step. For instance, to begin populating a newly-created vocabulary with the names of various colors (instead of countries, for brevity's sake here), the single operation would require no more effort than pasting the list of names into a text area, one per line./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20Manager%20adding%20terms.png alt=Taxonomy Manager adding terms /br /emFigure 1. Taxonomy Manager adding terms/em/p pThe terms are then displayed as a list./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20Manager%20terms%20added.png alt=Taxonomy Manager terms added /br /emFigure 2. Taxonomy Manager terms added/em/p pMoreover, the terms can be manipulated by selecting one or more of them and using the UI buttons for moving or deleting them, or performing other actions. Although a move operation requires multiple clicks instead of a single drag-and-drop, multiple selected terms can be moved as a group./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20Manager%20moving%20terms.png alt=Taxonomy Manager moving terms /br /emFigure 3. Taxonomy Manager moving terms/em/p pYet even greater power is available when working with hierarchical taxonomies. For such vocabularies, the module displays its terms in a tree format./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20Manager%20terms%20hierarchy.png alt=Taxonomy Manager terms hierarchy /br /emFigure 4. Taxonomy Manager terms hierarchy/em/p pTaxonomy Manager can export terms as a CSV file, but not import them. For that, consider the aptly-named a href=https://www.drupal.org/project/taxonomy_csvTaxonomy CSV Import/Export module/a, which allows an administrator to import or export taxonomy terms in a CSV file or as text pasted from the system clipboard. It also supports internationalization and the Drush utility. You are guided through the import process through six steps. For either import source, hierarchy is indicated using commas, such as:/p pre term 1 ,term 1.1 ,term 1.2 ,,term 1.2.1 ,,term 1.2.2 term 2 ,term 2.1 ,,term 2.1.1 ,,term 2.1.2 ,term 2.2 term 3 /pre pThe module does a good job of explaining what steps it has performed, including automatically creating the import vocabulary if no existing vocabulary was specified prior to import./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20CSV%20message.png alt=Taxonomy CSV message /br /emFigure 5. Taxonomy CSV message/em/p pThe final result is, as intended, hierarchical./p pimg src=http://www.ross.ws/sites/default/files/articles/Drupal%20Taxonomy%20Tips%20and%20Tools/Taxonomy%20CSV%20imported%20vocabulary.png alt=Taxonomy CSV imported vocabulary /br /emFigure 6. Taxonomy CSV imported vocabulary/em/p pYou may benefit from a few lessons learned from my own experience: This module will take any earlier instances in the file of each repeated child term, and move it to the bottom of its list of child terms, when it encounters a later instance. To minimize confusion long after you have set up a website's vocabularies, if you allow the import process to name the new vocabulary, you should later change the machine-readable name to match your vocabulary name. This module handles several vocabulary structures: flat (no parent), tree (single parent), and polyhierarchy (multiple parents). Avoid that last one if you ever wish to be able to reorder terms, and if you wish to retain your sanity./p pThese are just two of the many taxonomy-related modules that have been contributed by the community as a supplement to the core functionality. Yet they can be effective components in your toolset, as you learn first-hand how the extensive use of taxonomies for organizing, displaying, and managing data can make a website extremely adaptable to future needs. It also can serve as a key component of a durable information architecture for any website./p p class=article_copyrightCopyright © 2015 span class=proper_nameMichael J. Ross/span. All rights reserved./p /div/div/div

Drupal.org Featured Case Studies: Acronis.com

Tue, 08/11/2015 - 16:42
div class=field field-name-field-mainimage field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src=https://www.drupal.org/files/styles/case588x306/public/acronis_620_440.png?itok=fZEw2EYS width=588 height=306 alt= //div/div/divdiv class=field field-name-field-link field-type-link-field field-label-abovediv class=field-labelCompleted Drupal site or project URL:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=http://www.acronis.com/http://www.acronis.com//a/div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpstrongAbout Acronis/strong/p pThe rise of virtualization, the explosion of data creation and the opportunities in Cloud services offer are bringing new challenges to maintaining effective backup and disaster recovery programs for critical data./p pAcronis helps users securely migrate, protect and recover critical data wherever it resides in their physical, virtual or cloud environments. With the Unified Platform and new generation technology, its innovative solutions are designed to ease the management burden and reduce total cost of ownership while improving recovery time objectives./p ulliOver 5,000,000 individual customers and over 500,000 business customers in a broad range of industries have chosen Acronis to protect their business continuity./li liStrong Acronis partners ecosystem reaches customers in more than 145 countries worldwide./li liAcronis offer 24/7 assistance to their customers worldwide through their award-winning customer support centres./li /ulpAcronis products have won many different awards and are well-known as secure, solid and stable disk backup solutions worldwide. And now a href=http://adcisolutions.com/ target=_blank rel=nofollowADCI Solutions/a are proud to announce that we have built a website to popularize and sell these outstanding applications./p /div/div/divdiv class=field field-name-field-module field-type-node-reference field-label-abovediv class=field-labelKey modules/theme/distribution used:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/project/dsDisplay Suite/a/divdiv class=field-item odda href=/project/featuresFeatures/a/divdiv class=field-item evena href=/project/contextContext/a/divdiv class=field-item odda href=/project/workbenchWorkbench/a/divdiv class=field-item evena href=/project/workbench_moderationWorkbench Moderation/a/divdiv class=field-item odda href=/project/viewsViews/a/divdiv class=field-item evena href=/project/wysiwygWysiwyg/a/divdiv class=field-item odda href=/project/tmgmtTranslation Management Tool/a/divdiv class=field-item evena href=/project/nodeblockNodeblock/a/divdiv class=field-item odda href=/project/metatags_quickMeta tags quick/a/divdiv class=field-item evena href=/project/language_hierarchyLanguage Hierarchy/a/divdiv class=field-item odda href=/project/cnrCorresponding node references/a/divdiv class=field-item evena href=/project/coderCoder/a/div/div/divdiv class=field field-name-field-developed-org field-type-node-reference field-label-abovediv class=field-labelOrganizations involved:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/marketplace/adciADCI Solutions/a/div/div/div

ERPAL: Creating custom commerce products and line item types

Tue, 08/11/2015 - 15:30
div class=field field-name-field-blog-intro-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src=http://www.erpal.info/de/sites/default/files/styles/blog_detail_image_700x180_/public/custom-product-check-preview_0.png?itok=sWRYKXKp width=700 height=180 alt= //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpFlexibility and integration are the most important factors when developing E-commerce, CRM or other kind of business applications with Drupal.br / As our main goal with ERPAL Platform is to provide a flexible Drupal distribution for building every kind of business application with Drupal, for the last few months we've focused on commerce components. Drupal Commerce is one of ERPAL Platform’s core components providing product, price and order features. The challenge was to pre-configure the integration of such components as CRM contacts, quotes, orders, invoices and the business logic to connect them. At the same time, ERPAL Platform needs to be as flexible as possible. In this blog post we want to present a detailed example about how to create custom product types with related custom line item types and show how to connect those types and their fields with one another.br / Let’s imagine a t-shirt online store where we want to set up a product type that lets the user choose between different colors and sizes of the shirts offered in the shop. We’ll go through the configuration process to show you the feature using an example of ERPAL Platform with a single line of code./p h31) Creating a new product type/h3 pIt takes only a few steps to create a new commerce product type./p pimg alt= src=http://erpal.info/blog/sites/default/files/custom-product-add-product-preview.png width=706 height=200 //p olliNavigate to: Store » Products » Product types » Add product type ulliem/admin/commerce/products/types/add/em/li /ul/li liInsert a name for your product type, e.g. T-Shirt/li liClick the Save and add fields button at the very end of the form/li liAdd two new text fields named Color and Size ulliIt would be beneficial to adjust the field names to field_shirt_color and field_shirt_size, to prevent inconveniences in the future/li liYou could just as well use taxonomy terms or other field types instead of text fields, but we'll take the easy route for now/li /ul/li liAnd save it!/li /olp /p h32) Create a new line item type/h3 pIn this step we create a new line item type that’s related to the product type we created in the previous step. The line item type helps us to display a product during the order process, in the cart or in a quote, order or invoice./p olliGo to: Store » Configuration » Line item types » Add a product line item type ulliem/admin/commerce/config/line-items/add-product-line-item-type/em/li /ul/li liInsert a name for your new line item type; we'll again use T-Shirt, as the line item should match our new product type/li liAdd the existing fields field_shirt_color and field_shirt_size (in our case the same fields as for the product type)/li liSave that line item type!/li /olp /p h33) Connect the product type with line item type/h3 pNow, as we create our new product type and line item type, we need to connect both entity types and map their fields./p pimg alt= src=http://erpal.info/blog/sites/default/files/custom-product-type-preview.png style=line-height:20.7999992370605px width=706 height=200 //p olliNavigate to Store » Configuration » Order settings » Manage fields and edit the line items widget type ulliem/admin/commerce/config/order/fields/commerce_line_items/widget-type/em/li /ul/li liThe widget type should be set to Dynamic line item widget/li liAdjust the Settings for emT-Shirts/em line item type (a fieldset within the dynamic line item widget fieldset) olliSelect the correct Product type, in our case T-Shirt/li liSet commerce_unit_price to commerce_price/li liSet field_shirt_color to field_shirt_color/li liAnd finally field_shirt_size to field_shirt_size/li /ol/li liHit Continue and Save/li /olpAs mentioned above, you can use your line item types in your quotes and invoices. You’ll find their configuration at: Store » Configuration » Order types » Invoice / Quote. /admin/commerce/config/order-types/p h34) Create a product and test it/h3 pNow you can check whether the setup works. If you add a new product to a cart, a quote, an order or an invoice, the line item that’s used to show the selected product will change dynamically with the selected product, showing the correct fields. As you mapped the fields of the line item type to the related product type, you can select the product attributes after the product has been added. You can test the settings as follows:/p pimg alt= src=http://erpal.info/blog/sites/default/files/custom-product-check-preview.png style=height:200px; line-height:20.7999992370605px; width:706px width=706 height=200 //p olliGo to Products in the ERPAL menu and hit the local action (the button on top) Add a product ulliem/product/add/t-shirt/em/li liAlternatively, go to Store » Products » Add a product » Create T-Shirt/li liem/admin/commerce/products/add/t-shirt/em or via/li liem/order/add/em/li /ul/li liAs you can see, our two new fields are added to the form dynamically. Now insert all data. Remember the SKU value!/li liWhen creating an order, insert the SKU into the product autocomplete field and select the recently created product ul/ul/li liNow you should see that the fields have adjusted to the corresponding line item type and the values of the product's fields are copied./li /olp /p h3Summary/h3 pAdding a custom product type is not much more complicated than adding a new content type to a Drupal site. It’s important to create not just the product type but also a line item type and connect them. All in all, just three small steps without a single line of code. The module that provides these features is already included and pre-configured in ERPAL Platform. It’s also available as separate modules on Drupal.org in case you want to use it in an existing project: it’s the a href=https://www.drupal.org/project/commerce_line_item_widgetdynamic widget for commerce line item field module./a/p pFor more how-tos and best practises related to ERPAL Platform, a href=http://platform.docs.erpal.infoplease read our docs/a./p /div/div/div

Commerce Guys: The Apple Store discovers the Power of Content

Tue, 08/11/2015 - 15:19
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedAt Commerce Guys we know the value of content-driven commerce. It’s the reason our founders built Drupal Commerce, to enable the seamless blending of content management and robust commerce within a single software platform. We are thrilled to see more and more people talking about this continued transformation in the eCommerce market. br /br / On Friday, a href=https://en.wikipedia.org/wiki/Apple_Inc.Apple Inc./a, one of the largest companies in the world, announced what they see as a major shift in their eCommerce operations via a post on their website titled A new way to learn and shop on apple.com: a href=http://www.apple.com/retail/learn-and-shop/img src=https://commerceguys.com/sites/default/files/blog/files/Screen%20Shot%202015-08-10%20at%2012.44.20%20PM.png style=width:100%;padding-top:20px;padding-bottom:20px; alt=Dear Online Customers,#10;We’ve made a significant update to apple.com by combining the shopping experience with our product information to create a simpler site for all of our customers. This will make it easier for everyone to discover and purchase our latest products. Now you can shop everywhere across apple.com and purchase products right where you learn about them. For convenience, accessories are located with their product families. We’ve also combined search so it’s easier than ever to find Apple products, accessories, and support. We think this update will be a big improvement to the way you learn and shop on apple.com.#10;Thank you,#10;Apple title=Dear Online Customers,#10;We’ve made a significant update to apple.com by combining the shopping experience with our product information to create a simpler site for all of our customers. This will make it easier for everyone to discover and purchase our latest products. Now you can shop everywhere across apple.com and purchase products right where you learn about them. For convenience, accessories are located with their product families. We’ve also combined search so it’s easier than ever to find Apple products, accessories, and support. We think this update will be a big improvement to the way you learn and shop on apple.com.#10;Thank you,#10;Apple#10; //a Content and Commerce are two sides to the same coin. Without Content, no one knows what you're selling. Without Commerce, how does your website help your business grow? A powerful platform that allows for seamless blending of the two can make a business grow by strengthening its ability to attract new customers and effortlessly convert browsers into buyers. br /br / Most eCommerce platforms do a great job at transactional eCommerce, but in today's ever changing online landscape, a business needs more than just a checkout experience to attract and engage prospects and turn them into customers. A flexible framework like Drupal Commerce allows companies to build a web experience with a single software that controls both sides of the coin. Content that engages and attracts customers and feature rich eCommerce which improves conversion rates. br /br / As Apple stated “Now you can shop everywhere across apple.com and purchase products right where you learn about them.” Now that Apple has seen the value of blending rich product information with eCommerce, something that Commerce Guys already embraced, perhaps you should consider making similar improvements to your eCommerce strategy by taking a look at a href=http://commerceguys.com/Drupal Commerce/a. /div/div/div

Drupalize.Me: Configure Search API Solr to Use Stopwords When Indexing Content

Tue, 08/11/2015 - 15:02
div class=field field-name-body field-type-text-with-summary field-label-hidden text-content text-secondarydiv class=field-itemsdiv class=field-item evenpMost written text has a lot of functional words, like a, the, or is which are important to the person reading the content as they help it flow in a cohesive manner, but aren't necessary as important to someone searching the content of your site. In this tutorial we'll look at ways to ignore those words in our search index./p /div/div/divdiv id=comment-wrapper-nid-2318/div

Deeson: Executing Drupal Behat tests on Vagrant from within PHPStorm

Tue, 08/11/2015 - 10:00
img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_22.30.36.png?itok=jRE59B4l width=400 height=232 alt=PHPStorm running Behat tests title=PHPStorm running Behat tests / img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_22.30.36.png?itok=jRE59B4l width=400 height=232 alt=PHPStorm running Behat tests title=PHPStorm running Behat tests / pIf you've made it past the title, congratulations! There are lots of concepts discussed in this article, I'll mention Vagrant and Behat very briefly, but won't go into details as I'll provide better places to find information on getting started with those tools. This article is mainly for people who use Vagrant for Drupal development, have at least some idea as to how to make a Behat test run on their Vagrant box and want to run those tests from within the PHPStorm IDE./p h3Vagrant/h3 pVagrant is a tool for creating consistent and portable development environments. The intention is to give all your developers the tools they need to do their job in a single package such as a database and web server. There is work involved in initially setting it up, but once you have a workable receipe you can pass that round to all your developers so they have the consistent development environment. All the tools run from within a Virtual Box, a complete operating system which can be made to be much more like the production environment./p pSome helpful people have already done most of the hard work for you so you can start with what they have already done. Popular choices are a href=https://github.com/hashbangcode/vladVLAD/a and a href=https://www.drupal.org/project/vddVDD/a. At Deeson, we tooled the base VDD recipe and added to it to build our own environment which uses a 64 bit version of Ubuntu Trusty64 as well as solr, nginx and a load of other tools. You can find Deeson's VDD recipe at a href=https://github.com/teamdeeson/vdd/tree/trust64https://github.com/teamdeeson/vdd/tree/trust64/a./p h3Drupal Behat Tests with Drupalextension/h3 pBehat is a PHP tool for creating and running functional tests and, potentially, engaging in something called behaviour driven development (BDD). A functional test describes some function of the finished website. This differs from unit tests, in that a unit test should test some small piece of the code in isolation, whereas a functional test will test a complete path through the system potentially touching many parts of the codebase./p pIf you are using the Deeson version of VDD linked above then you already have a globally installed copy of Behat. If you are using your own Vagrant box then you will need to add Behat and the Drupal extension to it. The instructions for installing Behat and the Drupalextension can be found at a href=https://behat-drupal-extension.readthedocs.org/en/3.0/globalinstall.htmlhttps://behat-drupal-extension.readthedocs.org/en/3.0/globalinstall.html/a. /p h3System configuration/h3 pI am assuming you have followed the instruction on the Drupalextension site linked above to get a Behat test running on the command line on your Vagrant box. For the rest of the article, I will also assume the following variables, you should subsitute these with you own values where appropriate:/p ullistrongProject root /strongon the Vagrant box is at /var/www/vhosts/drupal7.dev/li listrongDrupal docroot/strong is within the project root on the Vagrant box at /var/www/vhosts/drupal7.dev/docroot/li listrongBehat tests/strong are on the Vagrant box at /var/www/vhosts/drupal7.dev/behat-tests/features with the behat.yml configuration file at /var/www/vhosts/drupal7.dev/behat-tests/behat.yml/li liThe strongproject root/strong is also on your local computer at ~/Sites/drupal7.dev such that the drupal docroot is therefore at ~/Sites/drupal7.dev/docroot (Windows users, your milage may vary)/li liYour VagrantFile is located on your local computer at ~/Applications/vdd. This is the directory you checked out VDD or the Deeson equivalent if thats what you are using for Vagrant. The VagrantFile is a file in that directory which describes how your Vagrant is configured./li /ulh3PHPStorm Vagrant Configuration/h3 pWith the scene set we finally arrive at how to configure your PHPStorm. Within PHPStorm, we want all the tests to execute when we press the play button. Because the tests are running on the remote Vagrant box we need to setup a remote PHP interpreter within PHPStorm and tell PHPStorm this is accessible via Vagrant./p ollistrongPHPStorm/strong -gt; strongPreferences/strong/li listrongTools /strong-gt; strongVagrant/strong/li /olpIn the configuration for Vagrant you should set the path to your VagrantFile. This file describes your Vagrant configuration and would be in the folder you checked out VDD or the Deeson equivalent into. My settings are shown below./p img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_21.39.20.png?itok=oDBYt3-2 width=400 height=236 alt=Vagrant configuration in PHPStorm title=Vagrant configuration in PHPStorm / h3PHPStorm PHP Interpreter Configuration/h3 pNext you need to tell PHPStorm that PHP is running on the Vagrant instance and can be used to run code with./p ollistrongPHPStorm/strong -gt; strongPreferences/strong/li listrongLanguages and Frameworks/strong -gt; strongPHP/strong/li liOn the strongInterpreter/strong line click the triple dots button to open the strongInterpreters/strong configuration screen. /li liClick the plus (top left) to add a new interpreter/li liGive it a name (e.g. Vagrant PHP)/li liChoose Vagrant/li liSpecify the locationt to your VagrantFile (again)/li liSpecify the location of PHP on the Vagrant box (e.g. /usr/bin/php). Note that clicking the Reload button here may make PHPStorm work it out for you./li /ol img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_21.59.25.png?itok=q-b3kknp width=400 height=198 alt=PHPStorm PHP Interpreter Configuration title=PHPStorm PHP Interpreter Configuration /img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_21.59.35.png?itok=pFDiB3fO width=400 height=232 alt=PHPStorm PHP Interpreter Configuration title=PHPStorm PHP Interpreter Configuration / pVDD users may get an error about unmatched paths when configuring the Interpreter. You are using a dynamically mounting VagrantFile, and PHPStorm is unable to work out how you project directory maps from your local computer to the Vagrant box. You will need to specify the mappings on a per project basis in your VagrantFile as follows./p pUnderem Vagrant.configure(2) do |config|/em add the following lines, remebering to replace the local path to the correct path for your system. You'll note that this code will never get run when the VagrantFile is properly used as it is inside an impossible block of code. However, it provides the information PHPStorm needs to work out the mappings from local computer to Vagrant box paths for the project./p pre class=syntax if 1 gt; 2 config.vm.synced_folder quot;/Users/johnennew/Sites/drupal7.devquot;, quot;/var/www/vhosts/drupal7.devquot; end /pre /pre h3Configuring Behat for PHPStorm/h3 ollistrongPHPStorm/strong -gt; strongPreferences/strong/li listrongLanguages amp; Frameworks /strong-gt; strongPHP/strong -gt; strongBehat/strong/li liClick the plus (top left)/li liChoose the Vagrant PHP Intepreter/li liSpecify where behat executable is located within the Vagrant box. If you followed the instructions for drupalextension to install Behat globally then this will be /usr/local/bin/behat/li liPress the reload button (two circular arrows) to have PHPStorm verify the path to Behat is correct/li liTick Default configuration file/li liFind your behat.yml file in your project locally (for me this is ~/Sites/drupal7.dev/behat-tests/behat.yml)/li /ol img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_22.18.10.png?itok=HRumPFnC width=400 height=177 alt=PHPStorm Behat Configuration title=PHPStorm Behat Configuration / h3Configuring PHPStorm Run Configuration/h3 pWe are now ready to configure the run mode in PHPStorm so that the green play button becomes available and pressing it executes the tests/p ollistrongRun/strong -gt; strongEdit configurations .../strong/li liClick the plus (top left) then strongBehat/strong/li listrongName/strong: Behat tests/li listrongTest scope/strong: Defined in configuration file/li /ol img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_22.20.20.png?itok=k8C4OOkQ width=400 height=208 alt=PHPStorm Run Configuration for Behat title=PHPStorm Run Configuration for Behat / pPress the green play button in PHPStorm and in theory your tests will now be executed on the Vagrant box and the results sent to PHPStorm./p img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-10_at_22.30.36.png?itok=jRE59B4l width=400 height=232 alt=PHPStorm running Behat tests title=PHPStorm running Behat tests / pIf you would like to just test part of the suite of tests you can do so by tagging the tests and then creating a new strongRun configuration/strong which specifies which tags to run. Lets say you have tagged some of your scenarios as em@justthis/em/p ollistrongRun/strong -gt; strongEdit configurations.../strong/li liPress the plus symbol (top left) to add a new configuration and choose strongBehat/strong/li listrongName/strong: Just this/li listrongTest scope/strong: Defined in the configuration file/li listrongTest runner options/strong: --tags=justthis/li liClick strongOK/strong/li /olpNow you have a dropdown choice next to the play button in PHPStorm to choose either strongBehat tests/strong or strongJust this/strong. Choose strongJust this/strong and press play and only the scenarios tagged em@justthis/em will be run./p img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-11_at_09.24.48.png?itok=Z_LMeHV6 width=400 height=210 alt=PHPStorm Run Configuration for Behat with tags title=PHPStorm Run Configuration for Behat with tags / img src=https://d5av3fo92eabs.cloudfront.net/sites/default/files/styles/image_400_width/public/secondary_images/images/screen_shot_2015-08-11_at_09.20.57.png?itok=ZU_8TnCk width=400 height=233 alt=PHPStorm running just one Behat test title=PHPStorm running just one Behat test / pHappy testing!/p

PreviousNext: Over the Waterfall: The future is Agile

Tue, 08/11/2015 - 09:44
pspan id=docs-internal-guid-0dab7a18-1bb0-c3e0-f8a9-f67ce815b02eI recently attained the a href=https://www.scrumalliance.org/certifications/practitioners/csp-certification target=_blankCertified Scrum Professional/a (CSP) certification and found the process a good opportunity to reflect on what led me to Scrum. It was also a chance to take pause and consider our  industry approach to project management. /span/p span property=dc:title content=Over the Waterfall: The future is Agile class=rdf-meta element-hidden/span