Skip to Content

Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 4 hours 18 min ago

Bert Boerland: Never trust data, no matter what the source is

22 September 2014 - 1:15pm


Drupal is becoming increasingly a backend CMS. For editers so they can easy manage their content while for example AngularJSis delivering the content. Or as a backend hup combining content from multiple sources, databases and systems.

Drupal evolved towards this from a blog alike system 10 years ago, a content type with user generated comments below. Back then everybody knew that you should filter User Generated Content and stripe the HTML if you cared about the site. Many other systems up to today however do not filter UGC good enough; user signups, search input and many other ways a user can give input ot the system.

Now Drupal is talking to other systems, combining data from multiple sources, devs still need to understand that one should ***never*** trust input data, no matter if the source is another database or a user.

Because, what could possibly go wrong with just displaying this data directly or injecting it in the database? Why should you "checkplain" the TXT fields in zone of a domain? Why?

Categories: Drupal

Drupal Easy: DrupalEasy Podcast 139: Vibraslap (Joshua Mitchell, Drupal Association CTO)

22 September 2014 - 12:34pm
Download Podcast 139

Joshua Mitchell (joshuami), CTO of the Drupal Association joins Mike Anello, Ted Bowman, and Ryan Price to talk about his job duties, the future of Drupal.org user profiles, the new jobs.drupal.org site and a bunch of other Drupal-y happenings.

read more

Categories: Drupal

Drupal Easy: Don’t Just Contribute Code, Contribute Coders…

22 September 2014 - 7:47am

It’s official. The Drupal Association just published survey results that back up just what we have all suspected: The Drupal community, even with more than a million registered at Drupal.org, is starving for Drupal talent. 92% of hiring managers surveyed confirm there is not enough Drupal talent in the market to meet their needs.

-->

read more

Categories: Drupal

Drupal.org Featured Case Studies: Edukame

22 September 2014 - 7:02am
Completed Drupal site or project URL: http://edukame.com

Edúkame is a startup dedicated to providing online emotional and educational tools for children below the the age of six. Our mission is to make the lives of parents easier: we believe that raising happier children today will make our world better tomorrow.

Edúkame started as a Wordpress blog about emotional child education. When we professionalized our project, we decided to migrate to Drupal and began selling toys and books using Drupal Commerce. Our first product was the Educabox, a specialized pack prepared by our experts with products and tools intended to help parents overcome some of the growing pains children go through (such as potty training, dealing with fears, learning to sleep alone, and so on.) Recently, we launched a premium content subscription option for parents who wish to receive a monthly digital magazine, plus a variety of other content.

On this project, Edúkame worked with a variety of partners, including:

  • Neurotic, a Drupal shop in Barcelona that has been in business for more than 5 years
  • SB IT Media
  • SEAVTEC, a technology consulting group that specializes in system architecture, scalability, systems admin, cloud computing, and more.
Key modules/theme/distribution used: Commerce KickstartViewsViews Fluid Grid - jQuery MasonryFeedsFeeds XPath ParserFeeds TamperRulesSassonSearch APISearch API Solr SearchPersonality TestCommerce sermepaCommerce PayPalCommerce StripeCommerce Bank TransferMemcache API and IntegrationVarnish HTTP Accelerator IntegrationTeam members: Carlitusxmorueco
Categories: Drupal

Zivtech: Automation a Resounding Message at Drupaldelphia 2014

22 September 2014 - 6:29am

Drupaldelphia 2014 had a bunch of great sessions this year, some of which were presented by our own Zivtech team members. Howard Tyson presented How Cultivating a DevOps Culture will Raise your Team to the Next Level, a beginner level session based around building a team that has both development skills and the ability to learn more about the tools that drive team infrastructure. Jody Hamilton presented an intermediate level Mission Bike Case Study session, along with Matt Cheney, the owner of Pantheon and Mission Bicycle. Matt also served as project lead on the Mission Bicycle project. Their session showed how the project was accomplished using minimal custom code. They also showed how custom products within Drupal Commerce were built, and how PHP and jQuery were used on the site.

There were a fairly wide variety of sessions this year, but I found that the resounding message of Drupaldelphia 2014 was “Automation”.

I was able to attend a few sessions in the afternoon that I thought would be educational for me based on what we are doing at Zivtech with automation tools like Jenkins, Puppet, and Vagrant. While most of the tools we use were mentioned, it was also nice to see some new tools that we aren’t using yet--tools that could continue to help automate our development processes and reduce the amount of possible human error involved in deployment processes. One of the sessions had a great list that showed the approximate amount steps that should happen each time new code is deployed from one development environment to the next. We, as developers, should always be figuring out ways to reduce the actual amount of steps and remove the repetitive steps with automation tools.

The first session I attended was Automating distros and avoiding post distro "features hell", an intermediate level session presented by Brian Ollendyke. This session introduced me to a new tool for drush that I didn't know existed. It’s only been published for 2 months, and it’s called Drush Recipes. It provides a set of drush commands that allows you to create a .drecipe file which will allow you to call the Drush Recipe and build out an entire site with a single command. The best part about this is that you can completely build a site, even using a specific installation profile to start with, and then run a specific command to create a .drecipe file that will be able to recreate the whole site with a single command. Inside the .drecipe file are an array of drush commands that run in a big chain as the Drush Recipe. Overall I was amazed at the power of drush, and we will definitely be looking into this module to possibly work it into our automation workflows at Zivtech. There are a few Drush Recipes already created by btopro over at his repository site, Drush.recipes. You can even create your own Drush Recipes style webservice with a simple .drecipe file provided on the repository. Time to get cooking with Drush Recipes!

The second session I attended was Automate All the Things, an intermediate level session presented by William Hurley. This session reiterated on tools that we have been using and are starting to use more, such as Jenkins for hardened testing. It also touched on some open source projects that we have been testing in small batches, but have not deployed anything major with yet. Those projects included Grunt and Capistrano. We have been using Grunt on some dev lunch test projects we have been working on, but I don’t know if we have used Capistrano much. I definitely want to learn more about it, as it seems like a great compliment to Jenkins and a better solution for actually deploying Jenkins tested code than relying on Jenkins to do the job. Overall William hit on points that are good to know, and that are helping these best practices become the industry standard in the Drupal world as more and more Drupal camps and Drupalcons take place. That’s good for all of us.

For my final session of the day, I ended up going to the EntityForm session presented by tedbow. The EntityForm session was pretty interesting, as entityform takes a true entity style approach to a webform rather than just a special content type with some fields. This allows you to pull in just about any type of other entities fields into the form and include that data for display. One of the examples used was to pick a location on a map from within a survey. This was a great example, as it showed just how easy it was to pull in an openlayers map into an EntityForm and then use the map to actually allow people to enter data from that field into the form just like you would on a regular webform from the webform project. This brings up some additional complexities for clients though, so in most cases it is probably best to stick with webform if the client themselves needs to create webforms often. It also means that very large forms will take up more tables in the database, as each EntifyForm field adds a new table table in the database. It looks like EntityForm has some great form functionality that I could see us using in the right situations here at Zivtech. It’s definitely going into my personal module toolbox.

I would like to thank Zivtech for allowing their developers to go to sessions at Drupaldelphia for professional development. This year’s sessions opened my eyes, and hopefully the eyes of others on the team to some great new projects that we can use to help automate more of what we do, become even more efficient at what we do for our clients, and even help our own internal projects. I look forward to putting some of these new tools like Drush Recipes and Capistrano to work in our shop and see what we can cook up to make our workflows even better. The more we can automate in our workflows, the more actual development work we can do with our time. I think anyone on our team can get used to that. Thanks Drupaldelphia, see you next year!

Terms: drupaldelphiaDrupal Planet
Categories: Drupal

Bert Boerland: Corporate Social Responsibility and using Open Source

22 September 2014 - 4:53am


It may differ per country and continent, but for most of the regions I know of, Corporate Social Responsibility (CSR) has become a standard within corporations as a way of buying, selling and producing goods and services. We all know that resources are scarce and hence should be used for the best possible use and more important, reused when possible.

By reusing resources to produce new goods or services, we make optimal use of that what is there. This is no longer a “left" or “green" political statement but is being executed by all parties in the political and economical arena, simply because it is in the interest of the person doing so as well as all other persons. It makes economical sense to reuse resources, be good for persons, the community and the environment. Even if it was just for the tragedy of the commons or from a prioner’s dilemma point of view. For those interested in how doing good or bad impacts the group, this academic ">PDF might be a good start. If you master Dutch this TED quality keynote during a DrupalJam conference of my friend Yoast on vimeo is truly something to watch.

So it is my opinion that CSR has moved beyond empty platitudes and has become truly in the genes of people and companies. Many people think that CSR started as corporate philanthropy, a way of the rich to donate to the poor. I don't think this is true, in every revolution, there have been powers to do good for the environment, the people and the community. For example during the Industrial Revolution there was a very strong new socialism trend with taking care of the housing, commnities and villages of the workers, “The garden cities of to-morrow". Not because “the Rich" want to do good perse (“philanthropy"), but because it made sense economically; less death and diseases (less risk) and a richer and happier workforce (and new business models around this growth).

Most of the definitions I have seen of CSR have in common that it is an integral vision towards sustainable business with social responsibility in business decisions to balance the social and economic impact of the decision. That by itself is an excellent definition and one that will be supported by anyone who is been doing business. The implementation most see however is to have a policy on carbon footprint in a company or to only buy agricultural products that are produced in a sustainable way, without pesticides. All fine.

But it seems that there is a very easy way to have implementation of CSR: by using a product that is produced to be be reused, made with the knowledge of thousands and with target audience of the world. The product that is not wasting a single second of the future and not wasting a drop of the paste. Indeed, I am talking about using open source software (OSS)!
OSS is by definition made with CSR in mind, it is being produced by different people all over the globe to be reused for you and your knowledge will be direct input for making the product better, iterate on the development and implementation.

And hence, a company that is using open source has a sustainable competitive advantage by using valuable rare resource in the most optima form. Therefor I dare any company that is using software to produce goods, to take using open source software into account and into its’ Corporate Social Responsibility policy. For by using open source software, we can truly make a better world by using more knowledge and less resources.

A very healthy situation for any company.

PS: if you want more information on this vison, do visit the 12 Best Practices from Wunderkraut session at the DrupalCon Amsterdam. Or visit Wunderkraut at booth number 1 in the sponsor lounge, right by the coffee! We are part of the community that uses and make open source software. With passion.

Categories: Drupal

DrupalCon Amsterdam: Call for Drupal Lightning Talks: Now is your chance to showcase the power of Drupal!

22 September 2014 - 3:03am

Lightning talks are already a crowd favorite at other conferences and camps (think O'Reilly's Ignite!), so your DrupalCon track chairs have decided to bring them to DrupalCon Amsterdam!

Drupal powers the best in the web, and what better way to showcase how far we've come with Drupal than during DrupalCon, bright and early on Thursday morning? That's right, this special event will be taking the place of our Thursday Keynote.

What are lightning talks?

Lightning talks are 5 minute presentations about anything you think would be of interest to the DrupalCon audience and can be Drupal-specific OR web-based. Here are just some ideas:

  • Why I really love X module
  • Cool web tools I use every day
  • I really need X, and I've build a module for it
  • Did you know that you can do X with Y (Module, Theme, PHP, ...)?
  • The biggest fails of my projects in the last year
  • This technique I use is the best, and here's why
  • Don't use this technique, and here's why

These talks are short and not meant to be micro-sessions with a lot of slides and details. These talks should be stripped down to the basic points, the really spectacular bits, as you've only got 5 minutes to present. Keep it interesting and keep it short - the clock will be ticking!

I want to give a lightning talk

Interested in giving a lightning talk? Awesome. We suggest reading the following articles which outline what a great talk encompasses:

Currently 8 speaking slots (5 min each) are available. The DrupalCon Amsterdam track chairs select the talks and will be announcing selected speakers Wednesday morning before the keynote (if not sooner).

Sign up to speak by adding your topic to the comment section.

I want to attend

Great, this event will be something really new for a DrupalCon and we hope you'll support it! Join us in the Auditorium at the RAI at 09:00 on Thursday and listen to some inspirational talks! If you can't participate in person, you can still join in the action. We will be streaming this event, and our other keynote presentations, in real time. View the live stream schedule for the week.

Help spread the word

If you have a friend or colleague who will be attending DrupalCon Amsterdam and would be great on stage, be sure to let them know about this event and where to sign up.

Send a tweet

Categories: Drupal

KnackForge: How to change Twitter Bootstrap's tour template

22 September 2014 - 2:42am

After Zen, Bootstrap has been our favorite theme framework for Drupal sites we build. Bootstrap embraces a lot of interesting features with it. One among them is Tour, which could give a quick walk-through of various things in a site with a brief summary in a popup/tooltip style.

We leverage this to give a quick introduction to various administrative links and their purpose to Drupal admin.

I wanted to change the template of Tour content to meet our design. I would like to explain the same in this post.

The below piece of code from Bootstrap Tour favors showing Tour content.

Categories: Drupal

Acquia: Ultimate Guide to Drupal 8: Episode 7 - Code changes in Drupal 8

21 September 2014 - 11:25pm

Welcome to the 7th installment of an 8-part blog series we're calling "The Ultimate Guide to Drupal 8." Whether you're a site builder, module or theme developer, or simply an end-user of a Drupal website, Drupal 8 has tons in store for you! This blog series will attempt to enumerate the major changes in Drupal 8.

Categories: Drupal

Drupal Commerce: Updating Drupal Commerce created usernames

21 September 2014 - 7:10pm

Thanks to the work of the Drupal security team, we released Drupal Commerce 7.x-1.10 on September 10 to address an information disclosure vulnerability. Last week we released a companion module to that update, Commerce Username Update, to help administrators manage the username update the release requires. The new version also includes a handful of minor bug fixes and a new feature to better support free order notifications on the checkout form.

Read more to learn more about the patched vulnerability and new feature.

Categories: Drupal

Drupal Easy: The Big Picture: Drupal 8 Migrate in Core

21 September 2014 - 12:45pm

Migrating from major version to major version of Drupal core has always been a significantly large task for all but the simplest sites. The upgrade path that has traditionally been part of Drupal core has always been limited in what it can do, so most sites were forced to use alternative methods to migrate configuration and content. Sometimes these migrations were manual, sometimes automated, and most often a combination of the two.

Drupal 8 aims to greatly reduce the friction of migrating sites from Drupal 6 and Drupal 7 by adopting a proven and extensible approach to site migrations. The Migrate module has been the go-to tool for migrating a large number of sites to Drupal 7 from earlier versions of Drupal as well as from other content management systems (including custom ones.)

This blog post aims to provide an overview of how the migration system in Drupal 8 works, our current progress, and how new contributors can get involved. The Migrate in Core initiative began in earnest about a year ago at DrupalCon Prague, when it was decided to use some code and concepts from the Migrate and Drupal-to-Drupal Data Migration modules as a starting point for a new and improved upgrade path.

At the current time, the Drupal 6 to Drupal 8 migration is almost complete, while the Drupal 7 to Drupal 8 migration is just getting started. There are a few blocking issues that we're trying to get past in the next couple of weeks (including files migration and link field migration). We feel that we'll be able to leverage much of the work we've done on the Drupal 6 to Drupal 8 migration for the Drupal 7 to Drupal 8 migration. In fact, we have a great issue for a new contributor to help us kick of the Drupal 7 work just waiting for someone to tackle.

-->

read more

Categories: Drupal

PreviousNext: What is the Drupal Community Summit?

20 September 2014 - 2:31pm

It's the community behind the open source Drupal Content Management project that really sets it apart.  Thousands of developers around the world take part in building Drupal, and building the web with Drupal. This post peers behind the scenes at what makes the community tick.

Categories: Drupal

Dries Buytaert: Reflections on Drupal in Japan

20 September 2014 - 11:46am
Topic: DrupalLocation: Japan

I spent the last week in Japan. The goal was two-fold: meet with the Drupal community to understand how we can grow Drupal in Japan, and evaluate the business opportunity to incorporate an Acquia subsidiary in Japan (we already offer Acquia Cloud in Japan using Amazon's Tokyo data center).

I presented at two Drupal meetups in Japan; spent the week meeting with members of the Drupal community, Drupal agencies, large system integrators (IBM, Accenture, Hitachi, Fujitsu, Ci&T and SIOS) and the Japanese government. In between meetings, I enjoyed the amazing food that Japan has to offer.

The community in Japan is healthy; there are some noteworthy Japanese Drupal sites and there are passionate leaders that organize meetups and conferences. The Japanese Drupal community is bigger than the Chinese Drupal community but compared to North America and Europe, the Japanese Drupal community is relatively small; the largest Drupal agency I met with employs 20 developers.

The large system integrators, with the exception of Ci&T, have not done any Drupal projects in Japan. We're way behind our competitors like Sitecore, Adobe Experience Manager and SDL in this regard. All of them enabled the large system integrators to sell and use their products. It was great to meet with all the system integrators to make them aware of Drupal, and the potential it could have to their business. It's clear the large system integrators could benefit from an Open Source platform that allows them to move faster and integrate with more systems.

The biggest challenge is the lack of Japanese documentation; both marketing materials as well as developer documentation. Most of the Japanese do not have much confidence in their English speaking ability and struggle to use Drupal or to participate on drupal.org. My recommendation for the Japanese Drupal community is to organize regular translation sprints. Translating one or more of the best-selling English Drupal books to Japanese could also be a game-changer for the community.

Another problem has been the historic challenges with drupal.jp. The anonymous owner of the domain drupal.jp claims that drupal.jp is the official Drupal site in Japan (it's not officially approved) and runs it without much regard or consultation with the broader Japanese Drupal community. I promised the Japanese community to help fix this.

I returned from my trip feeling that the Japanese market offers a great opportunity for Drupal. Japan is the world's third-largest economy, after the United States and China. With continued leadership, Drupal could be huge in Japan. I’d love that, as I would like to go back and visit Japan again.

Categories: Drupal

Drupalize.Me: Our Favorite HTML and CSS Resources

19 September 2014 - 12:08pm

You want to learn HTML and CSS, or maybe you just need a refresher on the current state of web technology—where should you start? This is a question we get asked a lot at Drupalize.Me. Our theming and module development videos often assume that you're familiar with basic HTML and CSS. But not everyone is, and you've got to start somewhere. At the moment, creating HTML and CSS vidoes is low on our list of priorities. We're not saying we'll never do it, but for now we serve our members best by rocking Drupal-specific content. And there's already a lot of great resources available for HTML and CSS. I thought I'd share some of my favorites here. I also tapped the Lullabot "hivemind" for additional recommendations.

Categories: Drupal

Jonathan Brown: Generating safe markup in Drupal 8

19 September 2014 - 11:29am

The most insecure part of a Drupal website is typically the theme. Drupal 8 is using Twig as its template layer. This is a massive leap forward. It's no longer possible to put SQL queries in a template file!

Furthermore, Drupal 8 is now taking advantage of a security feature of Twig: autoescape. Every variable in a Twig template will be escaped if it is not marked as safe. This makes it much harder to introduce XSS vulnerabilities.

Unfortunately any HTML that your module produces will end up being double-escaped and the HTML itself will be visible instead of the browser's rendering of it. The quick and dirty way to fix this problem is to wrap your string with \Drupal\Component\Utility\SafeMarkup::set:

<?php
$output = SafeMarkup::set('<div class="my-module">' . $my_variable . '<div>');
?>

But this defeats the whole point of using autoescape. The correct approach is that all HTML created by a module should be declared in a Twig template. This means that all the variables are guaranteed to be escaped. It is also very easy to implement.

First you need to declare the template in your hook_theme():

<?php
function my_module_theme(array $existing, $type, $theme, $path) {
  return array(
    'my_module_my_template' => array(
      'template' => 'my-template',
      'variables' => array(
        'variable1' => NULL,
        'variable2' => NULL,
      ),
    ),
  );
}
?>

You then need to create a Twig template file, for example my_module/templates/my-template.html.twig:

{#
/**
* @file
* Default theme implementation for my template.
*
* Available variables
* - variable1: The first variable.
* - variable2: The second variable.
*/
#}
<div class="my-template">
  This is the first variable: <b>{{ variable1 }}</b>.
  This is the second variable: <i>{{ variable2 }}</i>.
</div>

When you need to generate your html you should use the drupal_render() function:

<?php
$render = array(
  '#theme' => 'my_module_my_template',
  '#variable1' => t("First"),
  '#variable2' => t("Second"),
);

$output = drupal_render($render);
?>

Strings returned by drupal_render() are automatically marked as safe and will not be escaped again.

Categories: Drupal

Appnovation Technologies: Straight from the Source: Achieving Your Goals with osCaddie

19 September 2014 - 11:02am
See why global non-profit organization Teach For All chose our osCaddie solution var switchTo5x = false;stLight.options({"publisher":"dr-75626d0b-d9b4-2fdb-6d29-1a20f61d683"});
Categories: Drupal

Drupal core announcements: Today there are zero Drupal 8 beta blockers! Here's what's next.

19 September 2014 - 10:17am

As of 06:58 UTC today, September 19, there are zero Drupal 8 beta blockers. This means that, after more than nine months of focused effort, we are almost ready to release the first Drupal 8 beta!

When will Drupal 8.0.0-beta 1 be released?

Today (September 19), we have released one more Drupal 8 alpha, Drupal 8.0.0-alpha15. This alpha can be treated as a "beta release candidate". If no additional beta blockers are identified in the next 10-14 days, we will then tag the first beta! (If we do discover additional beta blockers, then we will evaluate them and adjust our timeline.)

What does beta mean?

Betas are good testing targets for developers and site builders who are comfortable reporting (and where possible, fixing) their own bugs, and who are prepared to rebuild their test sites from scratch if necessary. Beta releases are not recommended for non-technical users, nor for production websites.

See Dries' original announcement about the beta for more information on the beta and the criteria for beta blockers. The explanation of the Drupal 8 release management tags explains the differences between critical beta blockers and other issues impacted by the beta phase.

How can I help? Help stabilize the beta

The beta is an important milestone for Drupal 8. Help test the final alpha for critical and potentially beta-blocking bugs, and take extra care to avoid introducing regressions during this pre-beta window.

Beta deadline issues (complete by September 28)

This final pre-beta window is our final chance to complete beta deadline issues. As a reminder, changes to the following have a beta deadline:

  1. Non-critical changes to the core data model. (See the beta-to-beta upgrade path and data model stability policy and the beta-to-beta-upgrade path critical task for ongoing discussion of what is included in the Drupal 8 data model, how we will handle small data model additions, and when we will support a beta-to-beta upgrade path).
  2. Non-critical, backward-compatibility-breaking changes to the public APIs of the following critical subsystems:
    • The Configuration system
    • The Entity Field API
    • The Plugin API
    • The Menu and Routing APIs
  3. Other broad, non-critical changes that significantly break backward compatibility, at core maintainer discretion.

Beta deadline issues can be committed up until Sunday, September 28, after which there will be a freeze to ensure stability. If you have questions or concerns about completing a particular change, speak to a core maintainer about it soon.

If you know of issues that would introduce any of these changes, add the "beta deadline" issue tag so that contributors can find and help complete them before the beta. The following issues are particular priorities:

(Also see the full queue of known beta deadline issues.)

Keep in mind that API and schema additions may still be made during the beta phase, at core maintainer discretion. Limited API and data model changes will also happen during the beta phase, though core maintainers will try to isolate these changes to non-fundamental APIs or critical bug fixes. (See the ongoing beta-to-beta-upgrade path discussion.)

Beta target issues

"Beta target" issues are issues that we hope to complete early during the beta phase, but can still be added to Beta 2 or later. These are the next priority after important beta deadline issues. We especially need to work on:

(Also see the full queue of known beta target issues).

Thank you!

Many thanks to the 234 contributors who have helped resolve our 177 beta blockers in Drupal 8, and to the incredibly dedicated Drupal 8 branch maintainers. Your focus and effort is helping us build a solid Drupal 8 beta and, going forward, a better release.

Categories: Drupal

Bluespark Labs: Cleaning our repository history

19 September 2014 - 8:49am

In our daily work we all make mistakes in our git commits. Sometimes this errors can easily be repaired just by reverting our commits. But if we are working in a public repository and we have accidentally pushed some sensitive information, we now have a problem.

That sensitive information is in our repository history and anybody who has the enough time to explore can gain access to that. Our clients or even ourselves are now dealing with a privacy issue.

We can always try to repair that commit in our local environment and push our code again using the --force parameter. But we know, when you do that, a kitten dies. And if your team members already pushed something, everything in the repository will be messed up.

So the best option is to try and fix this in a more elegant way that allow us to erase all the traces of our mistake, but preserves repository integrity.

Git provides the filter-branch command, but sometimes this powerful tool becomes too complicated and slow. In trying to find an easier way to do it, finally came across the BFG Repo-Cleaner.

This tool is an alternative to git filter-branch that provides a faster and easier way to clean git repositories. It is written in Java, so you need to make sure you have JRE 6.0 or above installed. To clean your repository you only have to follow the steps below:

Clone your repository using the --mirror option. Beforehand, you should repair manually your mistakes in the repository.

1 $ git clone --mirror git://example.com/my-repo.git

Now, download BFG and execute it against your cloned repository.
1 $ java -jar bfg.jar --strip-blobs-bigger-than&nbsp;1M&nbsp;my-repo.git
This step will remove all the blobs bigger than 1MB from your repository.

Once the index has been cleaned, examine your repository's history and then use the standard git gc command to strip out the unwanted dirty data, which Git will now recognise as surplus to requirements:
1 2 3 $ cd my-repo.git $ git reflog expire --expire=now --all $ git gc --prune=now --aggressive

Finally, once you're happy with the updated state of your repo, push it back up
1 $ git push

If everything went well, your repository won't include any of the accidentally committed files.

Here you have some common examples to use with Drupal:
Delete all files named 'id_rsa' or 'id_dsa' :
1 $ java -jar bfg.jar --delete-files id_{dsa,rsa} &nbsp;my-repo.git

Delete database dumps:
1 $ java -jar bfg.jar --delete-files *{mysql,mysql.gz}

Delete files folder:
1 $ java -jar bfg.jar --delete-folders files

We have to remark that BFG assumes that you have repaired your repository before executing it. You need to make sure your current commits are clean. This protects your current work and gives you peace of mind knowing that the BFG is only changing your repo history, not meddling with the current files of your project.

Finally, here you have some useful related links:

Tags: Drupal Planet
Categories: Drupal

Code Karate: Drupal 7 Honeypot Module

19 September 2014 - 5:48am
Episode Number: 169

In this tutorial you will learn about the Honeypot module. The Honeypot modules is a SPAM prevention module that uses a hidden form field to catch SPAM bots from posting onto your site. This tutorial shows you how to configure the module to work on various forms on your site.

Tags: DrupalFormsWebformDrupal 7Drupal PlanetSpam Prevention
Categories: Drupal


Google+
about seo