Elsewhere

frobiovox.com: Basic Hello World with composer and php

Planet Drupal - Tue, 16/08/2016 - 19:40
Getting started with composer I want this to be an introduction to using Composer. If you are looking for more information about using Drupal with Composer then you should checkout the official composer facade doc page on drupal.org. I will not be talking about publishing to Packagist. My php is nearly always for Drupal, and as such, if I publish anything it will most likely be to a project on...
Categories: Elsewhere

Galaxy: GSoC’ 16: Port Search Configuration module; coding week #12

Planet Drupal - Tue, 16/08/2016 - 19:14

Google Summer of Code' 16 coding phase has almost come to an end. The link for the final submissions will be open from 16-23 August 2016. I am sure all the students and mentors had a memorable time learning new technologies, sharing their ideas and giving shape for the proposals submitted to the organisations in the initial phase. Now ,its time for the works to get evaluated.

As you know, I was engaged with porting search configuration module to Drupal 8.The past week I devoted for documentation of the ported module, writing few tests for the module and then fixing some of the issues reported/ I came across in the testing time. The collapsible elements were not active. It had to be ported to the HTML5 elements. This was an important fix that I could achieve in the past week. So, I will help you understand what this actually is.
In Drupal 7, to make the field-sets collapsible, we had to set the collapsible attribute as true.

$form[‘settings’] = array(
‘#type’ = ‘fieldset’,
‘#title’ = t(‘Search Configuration’),
‘#collapsible’ => TRUE,
‘#collapsed’ => TRUE,
);

In Drupal 8, we make use of the HTML5 details and the open elements to achieve this collapsible state for the field-sets. I.e,

$form[‘settings’] = array(
‘#type’ = ‘details’,
‘#title’ = t(‘Search Configuration’),
‘#open’ => TRUE,
);

This was one important task that was left behind. I should have done it before. So, now the collapsible issue is fixed for now. Now, I need to spend some time for the testing the module documentation.

Another issue that I had to fix was the removal of the !placeholders. The !placeholder has been removed from the t() and the format_string() of Drupal 8. This has been moved to :variable format.
<.a href = “:variable”>@variable

Documentation is always an important process when it comes to any software development. We need to document the functionalities available and the various functions added to the module so that it will be beneficial for users as a future reference. I found time to document the important functions involved. I am sure this is really an essential component for developers who would like to contribute to this module. I have documented mainly the helper functions which have been used in the module.

I was mentored by Karthik Kumar, Naveen Valecha and Neetu Morwani. They stood along with me for any sort of help and helped me a lot to improve my basic skills in Drupal. Thanks to all of you for the support and co- operations. I am also thankful to Alan for his tips and suggestions even in his very busy schedules. He was also very much helpful in reviewing some of the patches for some of the issues reported. I can never forget the contribution of our organisation admin- Slurpee in the progress of my project. The weekly analysis of the project and the blog posts on the status updates have really benefitted me. I would also like to extend my sincere thanks to all the other community members for supporting me and guiding me in this long process. I really enjoyed this project development process. I could learn a lot and I want to stay connected with the Drupal community contributing to various projects and help the members of the community. It is really a proud moment to see our commits being reviewed by experienced developers. Moreover, the support from the community members was really exciting. People were ready to share ideas and help whenever I was stuck in the implementation process. I would also thank Google for bringing up a platform for university students to work on some of the high quality projects of the open source organisations.

Tags: drupal-planet
Categories: Elsewhere

Arpit Jalan: GSOC 2016- Making Label Detection results configurable and improving documentation- Week 12

Planet Drupal - Tue, 16/08/2016 - 18:02
TL;DR Last week I had worked moving the helper functions for filling Alt Text of image file to a new service; and moving the reused/supporting functions of the tests to an abstract parent class, GoogleVisionTestBase. This week I have worked on improving the documentation of the module and making the label detection results configurable.
With all major issues and features committed to the module, this week I worked on few minor issues, including the documentation and cleanup in the project..
It is an immense pleasure for me that I am getting the feedbacks from the community on the Google Vision API module. An issue Improve documentation for helper functions was created to develop more on documentation and provide the minute details on the code. I have worked on it, and added more documentation to the helper functions so that they can be understood better.
In addition, a need was felt to let the number of results obtained from the Vision API for each of the feature as configurable, and allow the end user to take the control on that. The corresponding issue is Make max results for Label Detection configurable. In my humble opinion, most of the feature implementations and requests to the Google Cloud Vision API have nothing to do with allowing the end user to configure the number of results. For instance, the Safe Search Detection feature detects and avoids the explicit contents to be uploaded, and does not need the number of results to be configurable. However, the taxonomy tagging using Label Detection should be user dependent, and hence, I worked on the issue to make the value configurable only for Label Detection purpose. This value can be configured from the Google Vision settings page, where we set the API key. I have also developed simple web tests to verify that the value is configurable. Presently, the issue is under review.
I have also worked on standard coding fixes and pa-reviews and assisted my mentor, Naveen Valecha to develop interfaces for the services. I assisted him on access rights of the functions, and fixing the documentation issues which clashed with the present one.
Lastly, I worked on improving the README and the module page to include all the new information and instructions implemented during the Google Summer of Code phase.
With all these works done, and all the minor issues resolved, I believe that the module is ready for usage with all the features and end user cases implemented.
Next Week, I’ll work on creating a video demonstration on how to use Google Vision API to fill the Alt Text attribute of an image file, detect the emotion in the user profile pictures and to group the similar images which share the same dominant color.
Categories: Elsewhere

Four Kitchens: Launch Announcement: American Craft Council

Planet Drupal - Tue, 16/08/2016 - 18:00

The American Craft Council (ACC) gets a shiny new Drupal 8 site, encouraging visitors to appreciate the culture of craft. […]

Categories: Elsewhere

Lars Wirzenius: 20 years ago I became a Debian developer

Planet Debian - Tue, 16/08/2016 - 17:47

Today it is 23 years ago since Ian Murdock published his intention to develop a new Linux distribution, Debian. It also about 20 years since I became a Debian developer and made my first package upload.

In the time since:

  • I've retired a couple of times, to pursue other interests, and then un-retired.

  • I've maintained a bunch of different packages, most importantly the PGP2 software in the 90s. (I now only maintain software for which I'm also upstream, in order to make jokes about my upstream being an unco-operative jerk, and my packager being unhelpful in the extreme.)

  • Got kicked out from the Debian mailing lists for insulting another developer. Not my proudest moment. I was allowed back later, and I've tried to be polite ever since. (See also rules 6.)

  • I've been to a few Debconfs (3, 5, 6, 9, 10, 15). I'm looking forward to going to many more in the future. It's clear that seeing many project members at least every now and then has a very big impact on project cohesion.

  • I had a gig where I was paid to improve the technical quality of Debian. After a few months of bug fixing (which isn't my favourite pastime), I wrote piuparts in order to find new bugs. (I gave that project away many years ago, but it seems to still be going strong.)

  • I've almost ran for DPL twice, but I'm glad I didn't actually. I've carefully avoided any positions of power or responsibility in the project. (I live in fear that someone decides to nominate me for something where I'd actually have make important decisions.)

    Not being responsible means I can just ignore the project for a while when something annoying happens. (Or retire again.) With such a large project, eventually something really annoying does happen.

  • Came up with the DEP process with Zack and Dato. I also ran the second half of the DEP5 process to get the debian/copyright machine readable format accepted. (I'm no longer involved, though, and I don't think DEP is much now.)

  • I've taught several workshops about Debian packaging, including online for Debian-Women. It's always fun when others "get" how easy packaging really is, despite all the efforts of the larger variety in tooling and random web pages go to to obscure the fundamental simplicity.

  • Over the years Í've enjoyed many of the things developed within Debian (without claiming any credit for myself):

    • the policy manual, perhaps the most important technical achievement of the project

    • the social contract and Debian free software guidelines, unarguably the most important non-technical achievements of the project

    • the whole package management system, but especially apt

    • debhelper's dh, which made the work of packaging simple cases so easy it's nearly a no-brainer

    • d-i made me not hate installing Debian (although I think time is getting ripe to replace d-i with something new; catch me in a talkative mood at party to hear more)

    • Debian-Women made an almost immediate improvement to the culture of the larger project (even if there's still much too few women developers)

    • the diversity statement made me a lot happier about being a project member.

    I'd like to thank everyone who's worked on these and made them happen. These are important milestones in Debian.

  • I've opened my mount in a lot of places over the years, which means a lot of people know of me, but nobody can actually point at anything useful I've actually done. Which is why when I've given talks at, say, FOSDEM, I get introduced as "the guy who shared an office with Linus Torvalds a long time ago".

  • I've made a number of friends via participation in Debian. I've found jobs via contacts in Debian, and have even started a side business with someone.

It's been a good twenty years. And the fun ain't over yet.

Categories: Elsewhere

Acquia Developer Center Blog: Making Drupal User File Uploads Safe(r)

Planet Drupal - Tue, 16/08/2016 - 16:48

Do you let users upload files to your Drupal site? You know that "user" is a synonym for attacker, right?.

To keep your Drupal site secure you need to remember and account for the fact that any string or file upload that comes from a user can be an attack. Even if you don't let users register without administrator approval, a site user may have re-used their password or otherwise have their account compromised and then used to attack the site.

Tags: acquia drupal planet
Categories: Elsewhere

Zivtech: 3 Developer Podcasts to Hear

Planet Drupal - Tue, 16/08/2016 - 15:58
Podcasts are a great way to get intel on the go. Listen while you walk, drive, exercise, or unwind. According to recent research in The Infinite Dial 2016, podcast listening has experienced sharp gains, with an average of 5 podcasts consumed per week.


If you can think of a topic, there’s probably a podcast about it. Web development is no different. Here are three podcasts to listen to if you’re a developer. Code Newbies​ For new developers, it’s enlightening to listen to others talk about how they started coding and the struggles that they faced along the way. Saron always interviews interesting people (including many women in tech) and has a segment where she asks about the worst advice the interviewee has ever received. With over one hundred episodes, there’s a lot of content to leave you feeling inspired. Javascript Jabber This podcast has an incredible amount of content at over two hundred episodes and counting. Rather than a single interviewee, the episodes include panels of individuals, all with different but equally insightful perspectives. As a newer developer, you’ll get exposure to new concepts and resources, which is extremely valuable considering Javascript is all the rage these days. PhillyDev Podcast This podcast is fairly new and was created by a NYCDA grad. It’s fun and informative and provides a closer look at the Philly tech scene: it highlights the movers and shakers, how they got into the field, and the technologies they use. Steven always includes his “sweet nug” segment where he asks the interviewee to share a piece of wisdom or a recommendation for his listeners.

Do you have a favorite podcast about development? Let us know in the comments below!

Categories: Elsewhere

InternetDevels: Lviv Euro DrupalCamp 2016: every drupaler’s destination for September 3-4

Planet Drupal - Tue, 16/08/2016 - 14:47

Greetings, dear readers! We have recently welcomed you behind the curtains to show you how we organize our famous IT events. And now it’s time to announce one of them approaching! This is a very famous annual Drupal meetup, long awaited by so many people across Ukraine and beyond. Lviv Euro DrupalCamp 2016 in the magic city of Lviv is coming on September 3-4!

Read more
Categories: Elsewhere

Bits from Debian: Debian turns 23!

Planet Debian - Tue, 16/08/2016 - 14:30

Today is Debian's 23rd anniversary. If you are close to any of the cities celebrating Debian Day 2016, you're very welcome to join the party!

If not, there's still time for you to organize a little celebration or contribution to Debian. For example, you can have a look at the Debian timeline and learn about the history of the project. If you notice that some piece of information is still missing, feel free to add it to the timeline.

Or you can scratch your creative itch and suggest a wallpaper to be part of the artwork for the next release.

Our favorite operating system is the result of all the work we have done together. Thanks to everybody who has contributed in these 23 years, and happy birthday Debian!

Categories: Elsewhere

Jay L.ee: How To Make The Web Widgets Module Work With Drupal 7.50

Planet Drupal - Tue, 16/08/2016 - 14:04

For users of the awesome Web Widgets module, you'll notice that it'll no longer work after installing Drupal 7.50. But after digging into this issue, I realized that the problem was much simpler than I had originally imagined (Drupal 7.50 supporting PHP 7). Sometimes all it takes is to just RTFM lol. Anyway, here's how to solve it:

1) Understand what the source of the issue is. The cause of the problem was "Protection against clickjacking enabled by default".

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

ComputerMinds.co.uk: Dependency Injection - how to access services in controllers

Planet Drupal - Tue, 16/08/2016 - 14:00

If you are trying to get to grips with Dependency Injection in Drupal 8 then here is a walk-through of how I applied it in one of my Drupal 8 test projects.

I have a project I have been using to investigate Drupal 8 since alpha10 which has been invaluable in my learning process. But as a result, some of my code is over 2 years old and written when I barely had a grasp of Drupal 8 concepts.

In the past week a very old @todo jumped out to me:

Categories: Elsewhere

Michal &#268;iha&#345;: Gammu 1.37.4

Planet Debian - Tue, 16/08/2016 - 11:00

It has been almost three months since last Gammu release and it's time to push fixes out to users. This time the amount of fixes is quite small, covering Huawei devices and text mode for sending SMS.

Full list of changes in 1.37.4:

  • Improved support for Huawei E3131.
  • Fixed SMS support for MULTIBAND 900E.
  • Fixed SMS created in text mode.

Would you like to see more features in Gammu? You an support further Gammu development at Bountysource salt or by direct donation.

Filed under: Debian English Gammu | 0 comments

Categories: Elsewhere

Dries Buytaert: Drupal goes to Rio

Planet Drupal - Tue, 16/08/2016 - 09:05

As the 2016 Summer Olympics in Rio de Janeiro enters its second and final week, it's worth noting that the last time I blogged about Drupal and the Olympics was way back in 2008 when I called attention to the fact that Nike was running its sponsorship site on Drupal 6 and using Drupal's multilingual capabilities to deliver their message in 13 languages.

While watching some track and field events on television, I also spent a lot of time on my laptop with the NBC Olympics website. It is a site that has run on Drupal for several years, and this year I noticed they took it up a notch and did a redesign to enhance the overall visitor experience.

Last week NBC issued a news release that it has streamed over one billion minutes of sports via their site so far. That's a massive number!

I take pride in knowing that an event as far-reaching as the Olympics is being delivered digitally to a massive audience by Drupal. In fact, some of the biggest sporting leagues around the globe run their websites off of Drupal, including NASCAR, the NBA, NFL, MLS, and NCAA. Massive events like the Super Bowl, Kentucky Derby, and the Olympics run on Drupal, making it the chosen platform for global athletic organizations.

Categories: Elsewhere

Drupal Blog: Drupal goes to Rio

Planet Drupal - Tue, 16/08/2016 - 09:00

As the 2016 Summer Olympics in Rio de Janeiro enters its second and final week, it's worth noting that the last time I blogged about Drupal and the Olympics was way back in 2008 when I called attention to the fact that Nike was running its sponsorship site on Drupal 6 and using Drupal's multilingual capabilities to deliver their message in 13 languages.

While watching some track and field events on television, I also spent a lot of time on my laptop with the NBC Olympics website. It is a site that has run on Drupal for several years, and this year I noticed they took it up a notch and did a redesign to enhance the overall visitor experience.

Last week NBC issued a news release that it has streamed over one billion minutes of sports via their site so far. That's a massive number!

I take pride in knowing that an event as far-reaching as the Olympics is being delivered digitally to a massive audience by Drupal. In fact, some of the biggest sporting leagues around the globe run their websites off of Drupal, including NASCAR, the NBA, NFL, MLS, and NCAA. Massive events like the Super Bowl, Kentucky Derby, and the Olympics run on Drupal, making it the chosen platform for global athletic organizations.

Categories: Elsewhere

Keith Packard: udevwrap

Planet Debian - Tue, 16/08/2016 - 08:32
Wrapping libudev using LD_PRELOAD

Peter Hutterer and I were chasing down an X server bug which was exposed when running the libinput test suite against the X server with a separate thread for input. This was crashing deep inside libudev, which led us to suspect that libudev was getting run from multiple threads at the same time.

I figured I'd be able to tell by wrapping all of the libudev calls from the server and checking to make sure we weren't ever calling it from both threads at the same time. My first attempt was a simple set of cpp macros, but that failed when I discovered that libwacom was calling libgudev, which was calling libudev.

Instead of recompiling the world with my magic macros, I created a new library which exposes all of the (public) symbols in libudev. Each of these functions does a bit of checking and then simply calls down to the 'real' function.

Finding the real symbols

Here's the snippet which finds the real symbols:

static void *udev_symbol(const char *symbol) { static void *libudev; static pthread_mutex_t find_lock = PTHREAD_MUTEX_INITIALIZER; void *sym; pthread_mutex_lock(&find_lock); if (!libudev) { libudev = dlopen("libudev.so.1.6.4", RTLD_LOCAL | RTLD_NOW); } sym = dlsym(libudev, symbol); pthread_mutex_unlock(&find_lock); return sym; }

Yeah, the libudev version is hard-coded into the source; I didn't want to accidentally load the wrong one. This could probably be improved...

Checking for re-entrancy

As mentioned above, we suspected that the bug was caused when libudev got called from two threads at the same time. So, our checks are pretty simple; we just count the number of calls into any udev function (to handle udev calling itself). If there are other calls in process, we make sure the thread ID for those is the same as the current thread.

static void udev_enter(const char *func) { pthread_mutex_lock(&check_lock); assert (udev_running == 0 || udev_thread == pthread_self()); udev_thread = pthread_self(); udev_func[udev_running] = func; udev_running++; pthread_mutex_unlock(&check_lock); } static void udev_exit(void) { pthread_mutex_lock(&check_lock); udev_running--; if (udev_running == 0) udev_thread = 0; udev_func[udev_running] = 0; pthread_mutex_unlock(&check_lock); } Wrapping functions

Now, the ugly part -- libudev exposes 93 different functions, with a wide variety of parameters and return types. I constructed a hacky macro, calls for which could be constructed pretty easily from the prototypes found in libudev.h, and which would construct our stub function:

#define make_func(type, name, formals, actuals) \ type name formals { \ type ret; \ static void *f; \ if (!f) \ f = udev_symbol(__func__); \ udev_enter(__func__); \ ret = ((typeof (&name)) f) actuals; \ udev_exit(); \ return ret; \ }

There are 93 invocations of this macro (or a variant for void functions) which look much like:

make_func(struct udev *, udev_ref, (struct udev *udev), (udev)) Using udevwrap

To use udevwrap, simply stick the filename of the .so in LD_PRELOAD and run your program normally:

# LD_PRELOAD=/usr/local/lib/libudevwrap.so Xorg Source code

I stuck udevwrap in my git repository:

http://keithp.com/cgi-bin/gitweb.cgi?p=udevwrap;a=summary

You can clone it using

$ git git://keithp.com/git/udevwrap
Categories: Elsewhere

Palantir: The Secret Sauce, Ep. 27: A Peek at Drupal GovCon

Planet Drupal - Tue, 16/08/2016 - 04:19
The Secret Sauce, Ep. 27: A Peek at Drupal GovCon The Secret Sauce manley Mon, 08/15/2016 - 21:19 Ken Rickard, Kirsten Burgard, and James King with Allison Manley Aug 16, 2016

We want to make your project a success.

Let's Chat.

Drupal GovCon has been gaining momentum for four years now. Curious about what it has to offer?

On this week’s episode of The Secret Sauce, we are joined by guests Kirsten Burgard and James King, organizers of Drupal GovCon.

iTunes | RSS Feed | Download| Transcript

Subscribe to all of our episodes over on iTunes.

Stay connected with the latest news on web strategy, design, and development.

Sign up for our newsletter. Transcript

Allison Manley [AM]: Hi again everyone, and welcome to The Secret Sauce, a short podcast by Palantir.net, that offers a quick bit of advice to help your business run a little bit better. 

I’m Allison Manley, an Account Manager, and today we have a different Secret Sauce. Ken Rickard, our Director of Professional Services, recently attending Drupal GovCon in Washington DC in July, and got to sit down with two of the organizers: James King from the National Institutes of Health (NIH), and Kirsten Burgard from the US Department of State to chat about this annual Drupal event. So they are going to share what this event is about, and why you may want to check it out next year. 
 
All right! Take it away Ken . . . 

Ken Rickard [KR]:  This is Ken Rickard. We’re at the Palantir Secret Sauce podcast. This is our broadcast from Drupal GovCon, and we’ve invited two of the organizers to join us today: we’re with Kirsten Burgard and James King. 

Kirsten Burgard [KB]: Yay! Welcome to Drupal GovCon.

KR: Thank you. This is I think my third or fourth . . . it used to be Capital Camp, and it’s now GovCon. This is the second year I’ve been here at the NIH, I know that. So tell me, how did the two of you get involved in this event?

KB: Well, it started . . . this is all really Tim Wood’s fault. He’s at the Department of Commerce. And he thought it would be really great if we all got together and started to do events, mini events where we could share information. The very first event one we did we had thirteen people. Then we decided to hold a larger event as a government-focused one at Commerce, and that was 2012.
 
KR: Yes, I was there.
 
KB: Yeah, we killed the wifi before 8:00 in the morning [laughs]. I had never seen that before. We thought we’d get about 200 people. We had 330. And at that event James approached me and said, “Hey, what about NIH hosting it?” And I thought, ‘this is never going to happen. Who at NIH is really going to make this happen?’ And it’s been James for three years now.
 
James King [JK]: So I did go to the Commerce event, and I had started using Drupal since 2010. When I got hired here in 2009, they gave me a project that hadn’t been started, and they bought this thing called Drupal and had a server, and I knew nothing about Drupal so I was learning on my feet Drupal 6. And I started playing with it and really liked it, and wanted to learn more about it. Found out about the Commerce event and that, like what was there, but saw how cramped it was.
 
KB: [Laughs]
 
JK: And wanted to get involved, and also selfishly wanted to be able to get more exposure at NIH on Drupal. I work for the NIH Library . . . the internal research library for NIH . . . and one of the things that we’re trying to do is foster community in different areas. And since I have a technology background, I’m trying to encourage use of technology across NIH. And Drupal being one of the things we’re working on, we were trying to encourage more people to know about and use Drupal.
 
So it made sense to at least try to have an event at our place. Since then obviously this has continued to grow, and we now have user group meetings as well just for NIH people. And those are growing as well.
 
KR: Yeah, the GovCon is a little bit of a special event of all the ones that I go to. Most of the ones that I go to are regionally-themed, but this one is industry-themed, or in this case, government service.
 
KB: Yeah.
 
KR: Public service themed. So, I mean, what are the goals of the whole idea? What are we trying to accomplish here?
 
KB: Well when we started doing DrupalGov . . . it’s actually called Drupal For Gov . . . we really just wanted to make it possible for government practitioners in open source communities to get together. Drupal just had the largest influx of folks within government. We also have Linux people, WordPress people, Joomla people. We have a wide cross-section of open source CMS’ mostly, and some back-end things. And our primary goal was to make it possible for government employees to get access to the information they needed. Whether it was training, or collaboration, or even just innovative new thoughts and processes.
 
Oftentimes in government we’re very stove-piped. We don’t collaborate, we don’t cross sections. We don’t . . . even within my old agency, Department of Veterans Affairs, one section didn’t talk to the next section. It’s very confrontational almost between offices. So to make an organization like ours, which started with 11 people, to an event that now has over 1,000 people attending, is pretty weird [laughs]! It’s just pretty darn weird.
 
JK: So as a librarian geek or information professional, information architect, I very much embrace the idea of open source, but also government use. The government spends a lot of money with contractors developing themes, developing modules, so forth, at a minimum I wanted to try and bring together the NIH people to be able to share that. To not only share the products, the deliverables, but to share lessons learned, to share the modules they’re using, tips and tricks, to come together on training, and so forth. Drupal GovCon was an easy way to foster that.
 
Having it here on campus made it very easy for the NIH people to come, but we’re also trying to be a sharing, open environment, so we’re making it as broadly available as possible. That’s why we continue to try to keep it to be free so that any level person, whether they’re a budding sysadmin, or developer, or a UX person, we’ll be able to come and learn.
 
KB: And we’ll have something for them too. We have sections that aren’t just like the regular “here are the tracks,” but actually sections across the board, and on top of that, additional training too.
 
KR: Yes, it’s a very interesting lineup. You have a very diverse speaker group, and very diverse attendee group. It’s interesting too, a lot of the Drupal events are weekend events . . . this is during the week. And so it’s almost a professional event. I think that’s fascinating too.
 
So based on the success we’ve seen from the last few years, I was at the Commerce event, what are you hoping to see next year?
 
KB: So next year might be a little bit more difficult because like I said, we’re over 1,000 now. Our attendee drop is nowhere where it needs to be on a free event. So typically a free event will have like a 50% drop in attendance over registration. Ours hovers at less than 40%. That makes it much more difficult for us to gauge how many lunches to buy, how many cups of coffee we need . . . we ran out of coffee yesterday morning an hour into coffee service, and we bought 800 cups! We ran out of lunches really close to the very end, so it wasn’t as like a lot of people had to go buy lunches. I believe we ran out of lunches again today, but not badly . . . only a couple.
 
JK: No, we were pretty close. The auditorium seats 500.
 
KR: And that’s the biggest space we have available.
 
KB: Yeah. And what we do through the day is we flux space everything. So we try to tell all the attendees, “Please, refresh your screens. Sessions will move.” And they do. And sometimes speakers forget where they’re supposed to be.
 
JK: I appreciate and I expect that we’ll continue to have that diversity as highlighted in our keynotes. The first day keynote was challenging attendees to really look at diversity and bias that’s in the industry, and how do we step back and address that. Today was more of a practical on how do we practically move an agency top-level site to Drupal. And tomorrow . . .
 
KB: Tomorrow it’s all security. We actually have the keynote from Velocity from last year, Laura Bell, who is a security expert from New Zealand. So I’ve had all kinds of fan boys come up to me and say, “oh my god, how did you get Laura Bell?” and I’m like, “I asked.” [laughs] 
 
KR: That might be the lesson for folks to takeaway from this episode of the podcast is sometimes all you have to do is show up and ask.
 
KB: Yeah. Show up and ask. It works really well.
 
KR: All right. Thank you both for joining me.
 
KB: Thank you. 

AM: That’s the end of this week’s Secret Sauce. For more great tips, check out our website at palantir.net, and check us out on Twitter. Our handle is @palantir. 

Have a great day!

Categories: Elsewhere

Drupal Association News: Changes for the Drupal Association Events Team

Planet Drupal - Tue, 16/08/2016 - 02:22

As Megan mentioned in her blog post, The Association’s mission is to unite the community to build and promote Drupal and DrupalCon remains an important way to achieve this mission. Unfortunately, our DrupalCon team is smaller due to staff reductions and we needed to adjust our work accordingly. To decide on what to eliminate, we took a critical look at what services the Association can continue to provide with minimal impact to the mission critical event elements that help move the Project forward.

DrupalCon has traditionally supported our contribution journey, helping developers and other contributors level up their skill to not only build better sites, but to also learn how to contribute code to core or through modules. We will continue providing the programing elements to support our contributors.

Over the years, these events have attracted some people whose  organizations aren't Drupal service providers. They've been organizations who chose, or considered, Drupal for their own systems. Going forward, we want to focus more on welcoming these newcomers and make sure they connect with content that serves their needs, for example: how to expand their use of Drupal and find new ways to solve their business solutions, find agencies and new technologies to include in their solutions, and connect with their peers. We already began this work through Summits and we are looking into other programs for them in the future.

Yet, while we will sustain our programming and even expand upon it, we do need to eliminate some of our workload. As a team, and with Megan and the board of directors, we looked at all of our work with a few lenses - what can we streamline, what can other remaining staff pick up and run with, what do we need to reduce or eliminate. We tried to prioritize the things that were mission critical to the project, would be noticeable to a community members' event experience, and do as many cuts behind-the-scenes as possible.

Things that we have decided to eliminate:

  • Hotel welcome letter - If you've stayed at one of the partner hotels at a DrupalCon, you may have noticed the welcome letter from the Drupal Association. We will not be producing these letters going forward.
  • Extended Sprints hosted lunches - I know this one may be disappointing, but it's time consuming for staff to manage, particularly on site during the Con and has a direct expense associated with it. Having no formal ticketing or RSVP system made planning the appropriate amount of food (with a myriad of unknown dietary needs) rather challenging and occasionally left attendees grumbling if their needs weren't met.
  • Re-bidding vendors each year - We have cultivated a list of reliable & cost-effective vendors for various production supplies that offer competitive pricing. Rather than seeking additional bids for each Con, and then picking the ones we used last time, we will renew previous contracts when feasible, a good working relationship is established, and the value is less than $25,000 USD. (behind-the-scenes)

Things that we have decided to decrease or reduce:

  • Scholarship reimbursement procedure has changed - In the past we have assisted recipients in making appropriate accommodations - hotel arrangements on our staff block, working with a travel agent to procure flights, etc. Moving forward, recipients will book / arrange for their own travel and accommodations and will submit expenses to the Drupal Association for reimbursement.
  • Scholarship funds will be reduced - We have reduced the grants / scholarship budget from 20,000€ to 10,000€. We made this reduction as a part of our cost savings effort.
  • BOF boards will be pre-printed - We will have a cut-off date and print sessions directly onto signage. You would be surprised how much time it takes on site to get those boards lined up and written out. We will reserve the slots that weren’t booked by the cut-off date as well as additional timeslots for on-site sign-ups.
  • Visa letters will not be mailed - we will no longer print and mail visa letters unless specifically requested to. The PDF that is emailed to the attendee is sufficient for the majority of visa applications. Special requests will be honored.
  • Customer service will be distributed - Whereas in the past we had one primary team member focused on customer service, we are now taking a team approach to this. Submissions to our Contact Us form are now being split amongst staff and on site registration support will now happen from a variety of staff members. (behind the scenes)
  • DrupalCon website theming has shifted - While the Drupal Association engineering team continues to maintain events.Drupal.org, we no longer have staff resources to build new features, nor to implement the custom themes we use to represent the character of our host cities. Instead, we have updated our contracts with our contracted DrupalCon design firms so that they will provide the sub-themes for upcoming events. (behind the scenes)

Our goal throughout this process was to make DrupalCon continue to be as seamless of an experience for you as possible. While we believe we've done a solid first pass at turning the behemoth amount of work into a realistic workload for the remaining team, there may continue to be minor tweaks as we run through our first Con with our new team format.

As we rebound from the re-organization, we look forward to enhancing what DrupalCon provides. We have a host of ideas, and are eager to dig in with this new framework to see what all we can accomplish with the assistance of the community.

If you are interested in getting involved with DrupalCons, here are 7 easy ways you can contribute:

  1. Stay at a partner hotel
    This lowers event costs, which keeps ticket prices lower. Hotels want your business and we are able to negotiate special rates and accommodations for the group with group purchasing power. When we fill up our hotel block - the hotels "comp" hotel room nights for the Association - dropping our production expenses notably. For instance in New Orleans, we earned 122 free hotel room nights.
  2. Thank a sponsor, talk to them on site
    Sponsorships greatly subsidize the costs of DrupalCon. Go out of your way to tell a sponsor thank you, ask them about why sponsoring DrupalCon was important to them. Check them out in the exhibit hall, they've got more going on than just t-shirts… ...although they do make great t-shirts!
  3. Thank the speakers and program team
    They are volunteering a substantial amount of their time to speaking at DrupalCon, or selecting sessions for DrupalCon - it is no small feat. They are driven to contribute to the community and help everyone become super Drupalers by sharing their knowledge.
  4. Buy a ticket
    Rather self-explanatory, but DrupalCon conference, training, and summit ticket sales are vital to the sustainability of future DrupalCon events.
  5. Spread the word, invite someone
    Tell your co-workers, maybe a counterpart at a client or customer, speak at a local meet-up, tweet it out - that DrupalCon is the place to go for Drupal education and training. 92% of people believe recommendations from friends and family, use your influence to impact an event you care about.
  6. Volunteer on site
    In the weeks before the Con we ask for people who are interested in volunteering on site to step up. There are a host of ways, from helping stuff name badges, to watching sessions and counting attendees, to being a sprint mentor. There is a volunteer role to fit all types of interests.
  7. Complete the surveys!
    After the Con we always email out a survey, please complete them with your feedback. We read every response and use it to make decisions for future Cons.

About Rachel

Rachel Friesen (RachFrieee) joined the Drupal Association in April of 2014, and is the Events Manager. She leads the events team that produces DrupalCons across the globe. You probably have seen her running around a DrupalCon talking into a walkie talkie or at the Closing Session.

When not wrangling events, Rachel can be found running and biking around Portland, OR, USA.

Categories: Elsewhere

Talha Paracha: GSoC'16 – Pubkey Encrypt – Week 12 Report

Planet Drupal - Tue, 16/08/2016 - 02:00

This week marks the completion of my Google Summer of Code 2016 project Pubkey Encrypt. So I’ve spent the past 3 months building this module for Drupal 8 in the supervision of mentors Adam Bergstein (@nerdstein) and Colan Schwartz (@colan). You can download Pubkey Encrypt from its official Drupal.org project page. Accordingly, the module provides a way of encrypting data with users’ login-credentials. It is based on ownCloud’s Data Encryption Model and is an attempt of providing an easy-to-use security module for website maintainers.

Categories: Elsewhere

myDropWizard.com: Creating a static copy of a Drupal 6 site

Planet Drupal - Mon, 15/08/2016 - 22:40

As you probably already know, Drupal 6 is end-of-lifed. This creates many risks for Drupal 6 site owners to keep their site up! First and foremost: security updates are difficult to find and get. Because the energy of the Drupal community as a whole is focused on Drupal 8, the resources dedicated to keeping Drupal 6 secure are very limited. So, your site is more vulnerable to be hacked.

Many low-end website owners shrug off the risk of being hacked. Don't dismiss this risk! Your website could be defaced, have private data become public, and jeopardize your business and reputation. Those may be obvious risks. What may be less obvious is that a hacked Drupal 6 website can be used to infiltrate and deface other websites hosted from the same server. These can be websites operated by your organization - or in a shared hosting environment - even other businesses and organizations.

Take steps to protect yourself. myDropWizard offers Long-Term Support for Drupal 6, so, that is one option.

However, it is possible that you may not need support! For example, if your site doesn't get updated at all - or very minimally - it may be an option for you to get rid of Drupal altogether. I have a video tutorial that will walk you through how to do such a cloned backup.

Categories: Elsewhere

Virtuoso Performance: Translation migration and more

Planet Drupal - Mon, 15/08/2016 - 19:46
Translation migration and more

I’m running a bit behind, but I want to make it a practice to blog about each migration project I’m involved with (with each client’s permission, of course). Constructed examples are all well and good, but there’s nothing like real-world scenarios to give the flavor of using the migration framework in practice. Where possible (again with the client’s permission), I will share the full migration implementation on GitHub, so people can see not only code snippets illustrating particular points, but their full context.

This spring I contracted with North Studio, a web and mobile development shop based in British Columbia, to assist with the migration of their customer The Carlyle Group’s multilingual site from Drupal 6 to Drupal 8. As happens more often than not when moving from one major version to another of Drupal, the opportunity was taken to refactor the site, rethinking some of the original site structure as well as taking advantage of the new Drupal 8 architecture. One aspect of restructuring was consolidating 26 content types into 8. At the time I joined the project, some of the new content types, and all of the taxonomy, had already been manually recreated in Drupal 8, and my responsibility was to develop automated migration of five remaining content types (four of them with translations), plus editorial user accounts.

User migration - mapping roles

The user migration makes use of the core d6_user migration almost verbatim - the crucial difference is that, as with content types, roles are being consolidated in the move to Drupal 8. In d6_user, roles are mapped 1-to-1 from Drupal 6:

roles: plugin: migration migration: d6_user_role source: roles

In this project, the desired roles were already setup in the Drupal 8 site, and we used a static map to translate the Drupal 6 numeric role IDs to the corresponding Drupal 8 role configuration IDs, consolidating three different D6 roles into the D8 “manager” role.

roles: plugin: static_map source: roles bypass: true map: 4: manager # content author 3: manager # developer 6: manager # html content author 16: media_room_manager # media room manager 11: translator # translator Files

As with users, the migration is mostly identical to the core d6_file migration. The key difference in the file migration itself is that, because much of the content (including files) has already been moved to D8, we want to be sure that the automated file migration we’re implementing here only pulls the files that are referenced by the specific content types we’re migrating. We do this by creating a source plugin extending the core d6_file source plugin, and overriding prepareRow() to ignore any file ID (fid) which is not in the field tables for those content types (by returning FALSE). Note that we could just as easily have done this by implementing hook_migrate_prepare_row(), or a subscriber to the PREPARE_ROW event provided by migrate_plus, and throwing MigrateSkipRowException. In a later post (for a later project) I will demonstrate the event subscription approach.

The other side to this is populating file fields on nodes. We would be able to do this using the core d6_cck_file process plugin - but that has a hardcoded reference to the core d6_file migration. Therefore, we needed to define our own carlyle_cck_file process plugin, extending d6_cck_file to override create() and reference our own file migration (named, imaginatively enough, ‘file’).

Nodes Conversion of node references to taxonomy references

One aspect of the site refactoring was the conversion of some node types to vocabularies (and thus node references become taxonomy term references). For example, the former “industry” node type became an “industry” vocabulary. This vocabulary was already populated with all necessary terms when this migration project started - the challenge was to convert the node references. There were two elements to this:

  1. A getTargetTitles() method was added to a common source plugin class, CarlyleNode, which from a node reference field name would gather the node ID (nid) references in that source property, look up the title for each referenced node, and set the source property to the list of titles.

  2. The migration configuration file mapped the field using the entity_lookup process plugin (provided in migrate_plus). This lookup enables one to populate a reference field by looking up the incoming source value against a given property of the destination field’s target type, and set the referenced entity ID.

So, given this field mapping:

field_industry: plugin: entity_lookup source: field_industry ignore_case: true

The source property is initially populated by the core migration framework with the referenced node IDs on Drupal 6. In prepareRow(), getTargetTitles() is invoked to convert those nids to node titles (which in the node->vocabulary conversion were used as the term names). Then, in the processing stage, the entity_lookup plugin queries the field_industry target vocabulary for terms with those names, returning the term IDs to populate the term references. The ignore_case setting, of course, makes sure case differences between the manually-created terms in D8 and the incoming values don't prevent us from making the match.

Translations

The biggest challenge of this project was handling translated nodes. At the time of this project, migration of translations had not yet been implemented in core. The issue to implement this for Drupal 6 had become an epic, because the mechanism for storing node translations had changed completely - before Drupal 8, each translation was a separate node, referencing the parent node via a ‘tnid’ column in the node table. With Drupal 8, all versions of a piece of content are stored as a single node, with each revision containing all translations of the node as of the time of that revision (and a new translation introducing a new revision). Substantial progress had been made by others (particularly vasi) on that patch at the time I needed the functionality here, but had run into the problem of properly setting the “default” language for the node (the language of the parent node in D6). For this to work, that parent node needs to be migrated before any of its translations are, and we simply could not come up with a clean way to do this within a single migration. The solution I came up with for the Carlyle project, on which the core solution was ultimately based, was to have separate migrations for the parent node and for its translations - by making the translation migration dependent on the parent node migration, we guaranteed things were created in the right order.

I will note that the following notes, as well as the code on GitHub, are not the code exactly as implemented for this project (which was basically the proof-of-concept for the core solution), but reflects the final solution committed to Drupal core as of 8.1.8 and later (and thus what you would use to implement your own translation migrations).

Considering bio nodes, the node_bio migration imports the parent nodes for each logical piece of content - nothing is special here to support translation, it’s a straight-forward node migration. The migration of bio node translations (node_bio_translation) is nearly identical to node_bio with the following differences:

  1. The source plugin is flagged for translations:

    source:
      plugin: bio_node
      node_type: bio
      translations: true

    This tells the node source plugin to import only translated nodes - i.e., those which have a tnid which is neither 0 nor identical to nid. When this is omitted, only untranslated nodes (tnid == 0) and parent nodes for translation (tnid == nid) are imported.

  2. The nid is explicitly set to the nid of the D8 version of the original translation (which was migrated by node_bio):

    nid:
      plugin: migration
      migration: node_bio
      source: tnid

    Note that the node_bio migration does not map nid - we cannot preserve the original nid in this case, because the destination site has manually-created content which would conflict with migrated nids.

  3. The destination plugin is flagged for translations:

    destination:
      plugin: 'entity:node'
      translations: true

    This triggers some code to make sure that a translation is created on the node if the incoming language does not already exist on the node, and to add language as a destination key field to the map table for this migration.

Community contributions

The following community contributions were made in the course of this project.

Migrate Drupal 6 core node translation to Drupal 8 - as noted above, this project was the proof-of-concept for the separate-translation-migration approach which became part of the solution in core. Several people contributed the code which made this solution a reality.

default_value: null in static map skips empty rows - For this project (specifically in the podcast node migration), we needed to have a lack of a match in a static_map plugin return null, preventing the subsequent entity_lookup plugin from running. There was a core bug preventing this from working properly, which I fixed.

config-devel-import-one does not work with a .yml argument - A question frequently asked in #drupal-migrate is how to get changes to a migration configuration entity in config/install to take effect, without uninstalling and re-enabling your module? Starting with this project I’ve been using the cdi1 command in the config_devel module to reload changes - well, once I fixed this little bug.

Route collision reported when alias matches a different language - The translation migration in this project triggered this pathauto bug. My diagnosis assisted in getting this fixed, and I also contributed some work on the tests.

mikeryan Monday, August 15, 2016 - 12:46pm Tags Planet Drupal Drupal
Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator - Elsewhere