Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 16 min 16 sec ago

Drupal @ Penn State: Producing new applications in our network

Wed, 21/10/2015 - 22:36

This video shows the automation involved in creating a new tool in ELMSLN. A tool in ELMSLN = new install profile = new domain = new drupal distribution.

Categories: Elsewhere

Drupal @ Penn State: A Significant Event

Wed, 21/10/2015 - 22:36

Yesterday something significant occurred, http://brandywine.psu.edu launched on the new Polaris 2 Drupal platform. And soon the Abington Campus web site will move to the same platform. And perhaps many more.

Categories: Elsewhere

Chapter Three: Giving Back

Wed, 21/10/2015 - 21:30

A couple years ago, we decided to make a substantial investment in Drupal by employing a Drupal 8 Core Developer. The investment has paid off in ways we never anticipated, transforming our company for the better.



How it began

Drupal 8 development began in 2011. It plugged along for a couple of years and as it got closer to becoming a reality it became clear that the Drupal community would need to adapt their skill sets to accommodate the changes inherent in the new platform architecture. This was daunting. We knew the cost of getting our team ramped up on Drupal 8 was significant and that there could be a steep learning curve.

Categories: Elsewhere

Drupal.org frontpage posts for the Drupal planet: Drupal 7.41 released

Wed, 21/10/2015 - 21:25

Drupal 7.41, a maintenance release which contain fixes for security vulnerabilities, is now available for download. See the Drupal 7.41 release notes for further information.

Download Drupal 7.41

Upgrading your existing Drupal 7 sites is strongly recommended. There are no new features or non-security-related bug fixes in this release. For more information about the Drupal 7.x release series, consult the Drupal 7.0 release announcement.

Security information

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

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

Bug reports

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

Changelog

Drupal 7.41 is a security release only. For more details, see the 7.41 release notes. A complete list of all bug fixes in the stable 7.x branch can be found in the git commit log.

Security vulnerabilities

Drupal 7.41 was released in response to the discovery of critical security vulnerabilities. Details can be found in the official security advisory:

To fix the security problem, please upgrade to Drupal 7.41.

Known issues

None.

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

Drupal core announcements: Drupal 7 core updates for October 2015

Wed, 21/10/2015 - 19:20

Welcome to the first in an occasional series of posts about recent happenings in Drupal 7 core.

This is modeled after the Drupal 8 posts that have been going on for a while; you can find all Drupal 8 and Drupal 7 core updates on the Drupal Core Updates page going forward.

Drupal 7.40 released

Drupal 7.40 was released last week! This is a maintenance release containing bug fixes, performance improvements, and a few new features. Now is a good time to test it out and upgrade your sites. If you discover any problems introduced by this release, report them in the issue queue.

Drupal 7.40 contains no security fixes, but Drupal 7.39 (released in August) does, so make sure your sites are updated to at least that version. Note that there is a security release window coming up today (October 21) also.

New features in Drupal 7 core

Many people have the misconception that Drupal 8 will be the first version of Drupal that allows new features to be added after the initial stable release, but in fact that's been the policy for Drupal 7 since early 2012.

Several features have been added to Drupal 7 since it was released, but awareness is not as high as it could be which is one of the reasons we haven't added more. One goal of this series of posts is to highlight features that have been added recently as well as new ones that are up for consideration. A sample is below.

For site builders For developers
  • Want a convenient theme debugging tool? There's one built into Drupal core (since Drupal 7.33). Just add the indicated line to the settings.php file in your local testing environment (or, since Drupal 7.40, uncomment the line that's already in the default settings.php file) and debug away.
  • Do you like PHP traits? You can now easily use them because the Drupal 7 autoloader supports them (since Drupal 7.40). Just be aware that they are a PHP 5.4 feature, so if your module relies on them then sites running on earlier versions of PHP won't be able to use your module.
  • When specifying dependencies in your module's .info file, you now can (and are encouraged to) specify the project that your module depends on also (since Drupal 7.40) - for example, dependencies[] = views:views_ui to declare a dependency on the Views UI module within the Views project, rather than just dependencies[] = views_ui. This extra information will help resolve ambiguities and can potentially be used by other tools in the future, for example by the drupal.org testbot or Drush to be able to automatically download dependencies that currently can't be downloaded automatically.

If you have ideas for other new Drupal 7 features you'd like to work on, get started in the issue queue (but keep in mind that they still must be subject to the backwards-compatibility policy).

Proposed Drupal 7 changes that need your feedback

Here are some possible Drupal 7 changes on the horizon that need feedback from Drupal 7 site builders or developers to make sure we don't cause problems for existing sites and existing code (and some of them need developers to work on the patches also):

  • We'd like to add an "administer fields" permission to core which would be required to use the field UI (in addition to whatever permission is required by each entity type the fields are attached to). This should benefit site builders and allow for more secure permission setups, but it could have a minor impact on existing sites and a moderate impact on contributed module automated tests; see the linked issue for details.
  • Should we turn on page caching and CSS/JavaScript aggregation in the Standard install profile in Drupal 7 (similar to what Drupal 8 did)? See the linked issue for details and to provide your feedback.
  • How about simplifying the Modules page, in particular to hide the less-useful dependency information by default? This could potentially be a big user-experience win for Drupal 7 sites. Discussion (and potentially patches) are needed on the linked issue.
  • Would your Drupal 7 sites be impacted if we added a default clickjacking defense to Drupal 7 core? This is a security improvement which would involve preventing Drupal 7 sites from being shown inside an iframe on a site with a different domain. For sites that need to be shown inside such an iframe, the protection could be turned off, but we need to make sure we get this right before adding it to core.
  • We'd like to allow the "Limit allowed HTML tags" filter to also restrict HTML attributes in Drupal 7, to make Drupal's text filtering options a bit more flexible. Help in particular is needed with backporting the Drupal 8 patch on that issue.

Please leave constructive feedback on any these topics in the individual issues linked above.

Proposed new release schedule for Drupal 7

We're considering adopting a similar release schedule for Drupal 7 that Drupal 8 will be using (i.e., a 6-month feature release schedule, with pseudo-semantic versioning). See the linked issue for details and to participate in the discussion.

And that's a wrap

Thanks for reading; hopefully you found this post useful!

If you'd like to see more of these posts in the future (or if you'd like to help write them) or if you have any general feedback, feel free to leave your feedback in the comments. But if you have feedback on specific issues mentioned above, please leave it on the relevant issue instead. Thank you.

Categories: Elsewhere

Dries Buytaert: Announcing Acquia Content Hub

Wed, 21/10/2015 - 19:11

The explosion of content continues to grow. With more and more organizations managing multiple sites and digital channels, the distribution of content is increasingly difficult to manage. Content can easily become siloed in different sites or platforms. Different data models make it challenging to access, update, and replicate content changes across your sites.

Today, we're excited to announce Acquia Content Hub, a cloud-based content distribution and discovery service. Content Hub serves as a central content repository or hub that allows for bidirectional distribution of content between different platforms. Content Hub lets authors and site owners reuse content from other sites, commerce platforms, and more. To facilitate sharing between all these different systems, we normalize the content, and provide centralized tools to search and discover content within your network of sites. In addition, Content Hub can automatically keep content consistent across different sites (publish-subscribe), mitigating the risk of out of date information, all while respecting workflow rules on the local destination site.

I'm excited about the launch of Content Hub because I believe it will become a critical building block for creating digital experiences that are smart, personal, contextual, predictive, and continuous across digital touch-points in our lives (see Big Reverse of the Web). It's an ambitious vision that will require organizations to better leverage all of their content and data. This means that eventually all data has to get linked: from textual, audio and video data, to customer information and customer support data, to sensory and contextual customer information. To process that amount of data, we will have to build smart systems on top of it to create better digital experiences for the customer. Last year we launched Acquia Lift, and now 12 months later we're launching Content Hub -- both are important steps towards that vision.

Categories: Elsewhere

OSTraining: How to Create a Popular Articles View in Drupal

Wed, 21/10/2015 - 18:15

Many sites want to showcase their most popular content to visitors.

However, creating a "Popular Articles" list in Drupal is harder than it might seem.

In this video, Robert shows you how to use the Statistics module (part of the Drupal core) to organize your articles by popularity.

This video is taken from our Advanced Views class.

Categories: Elsewhere

Red Crackle: Reducing Drupal's page load times using Fastly CDN

Wed, 21/10/2015 - 17:54
If you have ever optimized a Drupal site, you must have heard that you should serve static assets using a Content Delivery Network (CDN). In this post, we'll go over how CDNs help in reducing page load times. We'll cover one CDN, Fastly, in detail. The reason being that in addition to caching static assets, it caches dynamic HTML content as well and since it's built on top of Varnish, it integrates with Drupal seamlessly.
Categories: Elsewhere

Palantir: Building a Better Drupal

Wed, 21/10/2015 - 17:52

In his semi-annual “Driesnote” at DrupalCon Barcelona last month, Drupal founder and project lead Dries Buytaert spoke openly and frankly about some of the challenges facing the Drupal project and ecosystem. One of those challenges is the increasing amount of time it’s taken to develop each release as Drupal has grown larger and more complex.

In my session the next day, Architecting Drupal Businesses that Are Built to Last, I discussed how building complex software is in many ways like building a large building. Much as the way that we’ve approached construction has changed over time, so has the way that we approach building websites.

For most of recorded human history our largest structures were made simply by piling huge stones on top of each other. The Great Pyramid of Giza was built by thousands of laborers over a period of 10-20 years and completed around 2560 BC. For nearly four thousand years, it was the largest structure in the world at about 481 feet.

This is also pretty much how we built websites back before content management systems became widespread; there was a vision of what the end product needed to look like, and we’d just keep piling on more code and markup until it was done. It was usually a very labor-intensive process that took a long time to complete, and you didn’t have a lot of flexibility with the end product, but it got the job done.

The Great Pyramid was surpassed in height only in the 14th century by the Lincoln Cathedral in the United Kingdom’s East Midlands. At 525 feet tall, it was reputedly the tallest building in the world from about the year 1300 until its central spire collapsed in 1549 and was not rebuilt.

Cathedral construction in the Middle Ages was a community-funded and supported effort, frequently taking decades or even centuries to complete. When building a cathedral, the general approach was to get something fully functional up first, usually the chancel, which is where the high altar sits and the choir sings. Once this “minimum viable product” was completed, you could then extend outward as time and money became available, all the while maintaining a working place of worship. Because these buildings were built in stages over long periods of time, they also could evolve during construction and there was a fair amount of architectural experimentation and innovation as a result.

And this is what building a website with a content management system can get you; you can get a basic site up and running fairly quickly, then build on top of it and innovate over time without having to take it down or over from scratch. Like the cathedrals of the Middle Ages, open source content management systems like Drupal, WordPress, and Joomla! are community projects that are supported and maintained by a wide variety of agencies, paid developers, and volunteers.

The Washington Monument, which was completed in 1884, is the world’s tallest stone structure even today at 555 feet tall. It’s very large and impressive, but like the pyramids, cathedrals and other monuments that came before it, the Washington Monument is primarily not functional in nature, but ornamental. Despite their tremendous diversity of shapes and sizes, the kinds of tall buildings that were constructed up until the late 19th century were designed as places of worship and monuments to kings, emperors, and presidents, not as places that you could live or work in every day.

And this is also the limitation of many websites that are designed as completely bespoke solutions. They’re great expressions of the business needs that existed at the time and place in which they were built, but all too often they aren’t built to adapt as those needs change over time.

In 1884, the same year that the Washington Monument was completed, a Chicago architect named William Le Baron Jenney made a huge innovation with the Home Insurance Building, which was built using a load-bearing structural steel frame that supported the entire weight of the walls, instead of load-bearing walls that carried the weight of the building. This was called the Chicago Skeleton method. For the first time, it was possible to have a tall building with usable space all the way up to the top floor.

Steel replaced stone architecturally, and the age of the skyscraper began. Its pinnacle was reached in 1931 with the construction of the Empire State Building, which is 1,250 feet in height. These skyscrapers were a huge leap forward, but they were ultimately limited by the both the cost of building them and the inflexibility of the skeleton method; you could pretty much just build a tower straight up. The Empire State Building remained the tallest building in the world for 40 years.

This is the point that we have reached with Drupal 7. While the raw size and functionality of the sites we can build has scaled greatly, we’ve also hit the limits of Drupal’s cost effectiveness, technical overhead, and flexibility. Drupal 7 as a project has had difficulty adapting to meet some of the needs of today’s Web. It’s often cheaper and easier to use a framework than it is to use Drupal, and while that’s true for sites of all sizes, it’s particularly true for the largest customers, who often choose to create their own bespoke platforms. It’s been very clear for some time that something needs to change.

In 1969, Skidmore Owings and Merrill (SOM) were hired to create a building with 3 million square feet of office space for thousands of Chicago-based employees of the Sears Corporation. To meet this challenge, SOM architect Bruce Graham and engineer Fazlur Kahn designed an approach that combined nine individual “tubes”, each of which was essentially an independent building, clustered in a three-by-three matrix. The Sears Tower was completed in 1974, and reached a height of 1,729 feet.

The advantages of the bundled tube structural system is that it provides great economic efficiency, because it required less steel, and offers greater flexibility for buildings to take on more shapes. The structural innovations introduced by the Sears Tower four decades ago brought about a renaissance in skyscraper construction that continues to this day.

This kind of renaissance is also what Drupal 8 offers with its object-oriented approach, configuration management, improved APIs and native Web services support. Drupal 8’s more modular architecture makes it much easier to create so-called “headless” or “decoupled” websites that play nicely with a wide variety of frameworks and Web services.

When you have this kind of flexibility, all sorts of things are possible. This is the direction Drupal needs to go in order to remain competitive with other platforms like WordPress, Typo3, Adobe Experience Manager, and Sitecore.

Drupal answers the increasing call for skyscraper websites. It can and does support some of the largest, most trafficked, most complex sites on the planet, and with Drupal 8 we’ll be even better equipped to do so.

Images used in this post are done so under Creative Commons. In order:
https://flic.kr/p/7BUH63 - CC BY-SA 2.0
https://flic.kr/p/7sxMP9 - CC BY-SA 2.0
https://flic.kr/p/dERZT6 - CC BY 2.0
https://flic.kr/p/mZU9d2 - CC BY 2.0
https://flic.kr/p/o8AnpS - CC BY-ND 2.0

Categories: Elsewhere

Drupal Commerce: Commerce 2.x Stories: Update

Wed, 21/10/2015 - 16:50

Drupal 8 is now ready for production use, with RC1 released just recently. This also means that work on D8 contrib is accelerating, and everyone is curious about when they can start their first eCommerce sites.

A production ready Commerce 2.x beta won’t happen for another two months. However, we’re ready to start releasing related modules, tag Commerce alphas, write documentation, and track our progress more publicly. Starting from today we’ll do weekly blog posts showing the current state of Commerce 2.x. And for the people who want to build the future instead of just anticipating it, we’re holding IRC meetings every wednesday at 3PM GMT+2 on #drupal-commerce.

So, what have we been up to?

Categories: Elsewhere

Wunderkraut blog: The Wunderkraut Gotcha collection volume 3

Wed, 21/10/2015 - 15:28

The developers of Wunderkraut have worked hard on digging up fun and exciting surprises about Drupal since the last edition was published. Now that Drupal 8 is just around the corner, I expect that this will be the last edition of gotchas about Drupal 7 - brace yourself for new ones in Drupal 8!

Thanks to my great colleagues who have helped me gather this list: Georg, Cristian, Jani, Aleksi, Juho, Mikael, Olli, Federico, Janne, Pauli, Florian, Andreas, Tuomas, Jim, Peeter, Miķelis, Greg

Token translatability

Georg writes: 

This annoyed me for two days and took another colleague of mine almost a day until I accidently came across it, to help him out:

You configure breadcrumb, metatags or you-name-it in this great dynamic way like: "Read all about [node:field-headline]", which is replaced to, say "Read all about Munich".

Everything is just fine.

Until you are starting with translation stuff.

The token simply resist being translated, no matter what.

You put it though t() and surely find it in the translation interface, you translate it to German like "Lies alles über [node:field-headline]" and end up with a German/English mixture: Lies alles über Munich. (while you would expect to see the german word for Munich here: München).

Lots of blood, sweat and tears later you find out that tokens with underscores work just fine: 

Put "Read all about [node:field_headline]", translate it to "Lies alles über [node:field_headline]" and you are done.

Disabling e-mails sent out to new users by Drupal

You know, sometimes you don’t want Drupal to send people all those emails when they are signing up to your site. The slightly annoying problem is that the Drupal interface to choose which emails get sent out is a bit hidden. Deep down somewhere: 

[11:14] Cristian: I just need to disable that single email ... and I*m not finding a contrib module for that [11:17] Sampo: I think there should be a variable for each of those notifications, but not all of them are exposed to the UI. maybe [12:39] Cristian: @sampo, you were right . I've added the following to settings.php and all is right in the world [12:39] Cristian: $conf['user_mail_register_no_approval_required_notify'] = FALSE; Here is a list of possible values (check the $notify = variable_get('user_mail_' . $op . '_notify', $default_notify); line https://api.drupal.org/api/drupal/modules!user!user.module/function/_user_mail_notify/7 [12:50] Jani: @Bernt This _should_ provide a UI for those: https://www.drupal.org/project/mailcontrol Panels and Display Suite and region names with 3-col are not friends 

Aleksi wrote this to me: 

Hi! Juho asked me to give this link to you for your next blog post? http://g.recordit.co/LDi4RcRgrx.gif

It's an issue where Panels layout doesn't work with Display Suite and the issue occurs because I used names like 3-col in the region. 

Time zone handling with Tokens

Mikael writes: Note that when displaying date/time values through tokens, it will use default timezone handling ...even you have configured in field that differently (like no timezone handling etc.)

Another inconsistency - with the date module

[10:23] Olli: Ehhhh... Nice gotcha from the drupal.org page:

<?php
$start_date = $wrap_node->field_my_data->value()['value'];
$start_date = $wrap_node->field_my_data->value->value();
?>

 

Above two methods of accessing the date value ARE NOT EQUIVALENT. The first one returns date string, and the second a timestamp! I think it should be noted on the page.

Olli also provides an example as to why that value->value() is there: 

Since for date fields:

->value()['value']; ->value()['value2'];

Is pretty much value->value() and value2->value();

Just slightly different output, for whatever reason. 

Block caching - a favourite that has gotten me too

Federico wrote about a strange case: 

I have a block that allows to add products to the cart right under the cart page (/cart). This is a form method post that sends to /cart.
 I can't get why it sometimes works, and then i get first a 302 response and then another GET request of /cart. Other times I get a 200 OK response instead and that's it, no product is added.


Why is this happening - I don’t see no logic to it.. 

And then a bit later: 

Wow @janne fixed it! it was a block being cached, damned little riot!

Following up after this: 

Jani: So resolution was DRUPAL_NO_CACHE Instead of the default DRUPAL_CACHE_PER_ROLE?
Pauli: One could say that you should always disable caching for any block that contains a form. 

Caching form token is a bad idea

Note: This is not a problem for anonymous users

This one I picked up from our favourite friend Drupal Answers: 

http://drupal.stackexchange.com/questions/74775/how-to-cache-forms-with-a-reverse-proxy-and-deal-with-stale-form-tokens

"When Form API generates a form, it also generates a token that is passed out with the form in a hidden field, and expected to be returned back. If it is, the form is processed.

If a rendered form were ever to be cached, say, by Varnish, this mechanism breaks. The first user submitting the form will consume the token, and following attempts to use the form will be rejected." writes user Letharion

Libraries API surprise

And here is one gotcha that I stumbled over in a blog post from Garrett Dawson at Aten Design: 

One gotcha that seriously gotcha'd me is the necessity of providing a value for either version argument or version callback. The documentation for hook_libraries_info() says that both are optional, but if at least one isn't provided, the library isn't available to load. If you're not concerned about the version of the library, you can use a short-circuit function for the version callback. 

See the original blog post for more

Rewrite Results with Path results in doubled language prefix

Drupal user Ursula posted an issue where she reported a problem with views and rewriting of paths on a multilingual site at https://www.drupal.org/node/1491742

To "Fields", I added "Content:Path" and another field (Content:Performance Title). I then, under "Rewrite results" of the second field, I check "Output this field as a link", and set [path] as the Link path. I tried this with "Use absolute path" and without.
The resulting link includes a doubled language prefix like:
http://example.com/en/en/linkednode

dawehner had a great solution at hand: https://www.drupal.org/node/1491742#comment-5802404

Well the problem is that the node:path field is not the best one to use here. A good way is to add a hidden nid field, and then use that as a token when outputting the link like this: node/[nid].

 Display Suite preprocessed fields are a can of worms

It is easy to start liking Display Suite’s preprocessed fields as they are quick to get working. But then you might want to put one inside a Field Group - and boom it won’t work as this issue states: https://www.drupal.org/node/1452198

I got some good advice from Juho

I also got smacked in the face a few times in one project by the "inside field group" issue, and after that, I learned that it's usually better to favour hook_ds_fields_info over ds preprocessed fields.

Creating a Views Bulk Operation based on example moduleIt is really easy to implement custom actions for VBO, just create a normal Drupal action. But if you want to edit entities, read this Drupal Answers article BEFORE you start working, note especially what it says about 'behaviour': 

http://drupal.stackexchange.com/questions/30910/how-to-create-custom-vbo-action

I found this information AFTER I had gotten it to work properly - I put the 'behaviour' in there because it made sense according to the example module, but my action didn't seem to work because VBO would overwrite my changes. Thank you VBO for 7 new grey hairs. I went through this so that you don't have to! 

Interesting way to fill up your database

Yet another tip from Florian

Be careful with what you put into the t() function. If you put a variable in there, there are good chances you'll fill your translation table very quickly...

Watch out for this when using views and menu_get_object for taxonomy pages [16:34] Andreas: @Daniel #drupal-gotcha: menu_get_object('taxonomy_term' ..) does not return the expected result, when the taxonomy pages are overridden with views [16:35] Olli: Yep, need to menu_get_object('views_args', ...) or something similar [16:37] Andreas: @Olli yeah, and even worse, when the view is placed on a panel page, those things really bite you in the @ßß when the code relies on the configuration remaining unchanged :( [16:40] Andreas: And it is much easier for debugging, when we do not use the common drupalism to assign the function to a var inside an if test
 if ($term = menu_get_object(...)) gets stepped over in a blink of an eye by the debugger  Views query alter documentation has important information

kiamlaluno from Drupal Answers pointed out this important information:

If you look at the documentation for views_plugin_query_default::add_where_expression(), you will notice the following note. (The emphasis is mine.)

The caller is responsible for ensuring that all fields are fully qualified (TABLE.FIELD) and that the table already exists in the query. Internally the dbtng method "where" is used.

Batch runs on load balanced environments can give headaches

Tuomas reported this: 

[13:42] Tuomas: If you ever experience issues with batched exports on load balanced environments, this is useful [13:42] Tuomas: #These should be pointed to only one front. if(req.url ~ "^/batch") { set req.backend = web1; } else { set req.backend = default_director; }

Took a while to debug why not all items that should be on export aren't there. Seems some chunks got passed to different server and were not included in the export.

Note from Janne: An even better approach would be to use client director instead of round robin. That way you don't have to worry about forgetting some path, you still have loadbalanced stuff for all users, and it's even failsafe in that if the web1 goes awol it is still able to direct traffic to web2 instead.

 Date and views together 

Something tells me this one has struck many of us:

[11:51] Cristian: Hi . Has anybody @here encountered this before ? I have a field of type "date" which I use to collect date when a certain node was updated ( user inputs the data ) . I want to create a view where I filter all those nodes which have not been updated in the past 3 months. The views filter does not recognize the field as a "date" field but rather as a test field. Any ideas on what could be wrong ? [11:51] Jim: is views date enabled @Cristian? [11:52] Federico: u're missing views date or date_views maybe? yep the right module is date_views :) [11:53] Cristian: I'll go sit in the corner now ... thanks guys [11:53] Peeter: pshh.. someone take a pic of it. [11:55] Miķelis: ahh, the good old drupal. solve any problem by adding a module. :) [11:56] Federico: :p well sometimes brainfarts happen @Cristian :) [11:56] Cristian: @Bernt , there's another gotcha for you Weird error messages and crashing

I am pretty sure a lot of frontenders have been hitten by this one: A lot of core dumps with error messages that don’t really make any sense. 

After digging and digging you ask a colleague and he asks you if you’re using npm in your project? Ooh yes - and then you do realise that php-fpm core dumps because drupal didn't understand the info-files from npm-installed things, in it’s node_modules folders. 

Issue here: https://www.drupal.org/node/2329453

Thanks for reporting, Greg

Bonus: The problem that fixed itself

This is a nice WTF moment, when you spend a while fiddling with a module that doesn’t work right, you check the documentation, Google it a bit, maybe you even open up the debugger and step through the code to see what’s going on, you find the bug and then, only when you’ve even fixed the bug and are ready to create an issue and submit a patch you check the issue queue only to see that somebody beat you to it. 

A year ago. 

The moral to the story is of course to check the issue queue first, and check patches that don’t necessarily seem to be related. 

And if you know a module maintainer that have such lingering patches it doesn’t hurt to remind them over lunch. 

Categories: Elsewhere

Dries Buytaert: WPP-Acquia Alliance: a milestone for Drupal

Wed, 21/10/2015 - 14:23

Today Acquia announces the WPP-Acquia Alliance, a global partnership with the world's largest communications services company. This isn't just a milestone for Acquia -- I believe it to be significant for the Drupal community as well so let me tell you a bit more about it.

WPP is a marketing company. A very, very large marketing company. With more than 188,000 people in 112 countries, WPP's billings are nearly $76 billion USD and its revenues approach $19 billion USD.

The reason that the WPP-Acquia Alliance is interesting for Drupal, is because WPP's primary client is the Chief Marketing Officers (CMO). The influence of the CMO has been on the rise; their responsibility has evolved from "the one responsible for advertising" to having a critical role in designing the customer experience across all the customer touchpoints (including the websites). The CMO often has a deep understanding of how to use technology to deliver an integrated, system-wide customer experience. This is one of Drupal's strengths, and bringing organizations like WPP into the Drupal fold will help bring Drupal into the office of the CMO, grow the adoption of Drupal, and expands the opportunity for everyone in our community. If you believe, as I do, that the CMO is important, than I can't think of a better company to work with than WPP.

WPP will connect its Drupal developers from several agencies under one umbrella, creating a Drupal center of excellence, and the world's largest Acquia-certified Drupal practice. Globant, Hogarth, Mirum, Possible, Rockfish, VML and Wunderman are some of the agencies who'll be contributing to the WPP-Acquia Alliance, and building innovative Drupal applications for global clients. Acquia will provide WPP its open cloud platform, solutions for multi-site management, personalization tools, and more.

Categories: Elsewhere

Darryl Norris's Blog: Pokémon and Drupal with Pokéapi

Wed, 21/10/2015 - 11:16

I have been working on website (un)official Pokemon fan website and as part of this project we need to create pages with Pokemon data. I found Pokéapi which is a Pokémon RESTful API. Pokéapi have all the data (and even more) that what I need in order to generate my nodes. So, I wrote a module that is going to take data from Pokéapi and generate into nodes. I decide to upload that module into Drupal.org just in case someone was to build another Pokemon website.

Initially, I wrote a Drupal 7 module, but since this is a very simple module I decide to port this module to a Drupal 8 module. The D8 version does not require any extra contrib module thanks to the CMI. Here is the project page: https://www....Read more
Categories: Elsewhere

DrupalCon News: Show off your Drupal 8 Recipe at DrupalCon Asia!

Tue, 20/10/2015 - 23:58

The easiest way to get started with Drupal is to do some stuff with Drupal, without writing any code. Yes, there is a module for everything in Drupal. But what makes Drupal even more powerful is how you could get these modules work together, again without any coding!

So, What is a Drupal Site Building Recipe?

Well it could be a bunch of modules that you could put together to build a site that accomplishes a set goal. A set of instructions on how you configured the modules to work together would make the recipe even more interesting.

Categories: Elsewhere

OSTraining: Should I Use Context or Panels for Drupal Sites?

Tue, 20/10/2015 - 23:22

There are multiple different ways to design a Drupal site. You can code your theme, or you can use modules such as Panels, Context and Display Suite.

I'm reluctant to answer the question of which solution is "best", but we do often get asked about which approach Drupal site-builders should use.

In this video, Robert Ring compares Context and Panels, explaining different situations in which he'd choose to use each module. If you want to learn more, we have full classes on Contextand Panels.

Categories: Elsewhere

OpenConcept: Updating Google Analytics In Drupal

Tue, 20/10/2015 - 23:16
Foreword:

   Google Analytics is a great tool to see where people are browsing on your site, to monitor traffic, and possibly some other perks I'm unaware of.  ;)  So it's important to make sure it still works when you're upgrading the Google Analytics Tracking ID and updating the Google Analytics module, or just updating the module.

   Why would you want to do that?  Well: The 1.x branch of the Google Analytics module is now no longer supported, so if you want security updates you'll have to update to the 2.x branch (pretty straight-forward).

   If you're reading this post, you're likely about to attempt updating this module.  I had a hard time finding all this information, so I'm sharing it in a blog post in case anyone else might benefit.

   Important:  If you have a Google Analytics Classic Tracking ID it needs to be upgraded to the newer Universal Tracking ID in order to work with the 2.x branch of the Google Analytics module.

 

Run-down:
  • Determine Tracking ID type
  • Upgrade Tracking ID if needed
  • Ensure Tracking ID in module config matches one in Google Analytics account
  • Update Google Analytics module
  • Update Google Analytics Tokenzier module if necessary
  • Check that your site is reporting to Google Analytics

 

Walk-through:

   Start with the Tracking ID and find out whether or not yours is the Classic version or the Universal version.

   Once you log into Google Analytics, click on the "Admin" link in the top menu.  This is what Universal Google Analytics looks like:

   If you don't see that, you'll see something below the Property drop-down indicating that your Universal Analytics Upgrade transfer has not started, much like this:

   To begin upgrading to the Universal Tracking ID, click "Universal Analytics Upgrade".

   Once you've either upgraded or determined that your Tracking ID is Universal, make sure the Tracking ID in your Analytics account matches the Web Property ID in your Google Analytics module settings.  Drupal 7: /admin/config/system/googleanalytics.  Drupal 6: /admin/settings/googleanalytics.  This is at the top of the page.

   Now you can update the Google Ananlytics module.  Since there will be a decent amount of database updates, it would be a good idea to put the site into maintenance mode.  If you use Google Analytics Tokenzier, update that as well.  Explanation: Older versions of Google Analytics Tokenizer, when used with the 2.x branch of Google Analytics, use a function with deprecated PHP that will cause a WSOD.  No passing GO.  Right to white.

   Last, but not least:  Make sure your site is reporting to Google Analytics.  Once logged into Google Analytics you'll see a list which will contain a name representing your site.  Like so:

   Once you click on your site, you should see a menu to the left and content to the right.  When you click on "Real Time", it should expand a list.  Then you can click on "Content" to see a real time update of who's looking at what, which updates in a matter of seconds.  It will look much like this:

   When you scroll down the right-hand side you will see a list of pages on your site that people are currently browsing, which will show up almost instantly when you click around your own site.  Choose a page that isn't already in that list so it's easier to tell.

   If your site isn't reporting, double-check that your Tracking ID matches the Web Property ID in the Google Analytics module config and check the recent log messages to see if anything is interfering.

Topic: 
Categories: Elsewhere

Last Call Media: Baltimore Drupal Camp 2015

Tue, 20/10/2015 - 22:40
Categories: Elsewhere

Web Wash: Build a Blog in Drupal 8: Managing Blocks

Tue, 20/10/2015 - 22:26

The Block system in Drupal allows you to add arbitrary content into regions within a theme. A block could be as simple as just text or list content using Views.

In Drupal 7, the Block system is pretty limiting. For instance, a single block can only be assigned to a single region. You also have very basic control of hiding and displaying blocks.

To handle these short comings in Drupal 7 you would use Panels for complex layouts and Bean so you can add fields to blocks.

In Drupal 8, the Block system has been revamped and it's more flexible. The two big improvements: assign a single block to multiple regions and fieldable block types.

In this tutorial, we'll continue work on our Drupal 8 blog site. We'll add a static call-to-action which'll only appear in the sidebar on the blog page. This call-to-action could be some promotional content or a newsletter sign-up form.

Then we'll create a custom block type which we'll use to create reusable promotional content that can be added to any blog post.

Categories: Elsewhere

Evolving Web: Node smuggling, aka poor man&#039;s node_export

Tue, 20/10/2015 - 21:09

I needed to create a new webform on a production site recently. But as a dev, I don't have direct access to the production admin backend; I'm only allowed to push code changes and let the client's team migrate them to prod via drush updb. So I'm supposed to export the webform configuration to code, and deploy it via an update hook, but how?

read more
Categories: Elsewhere

Aten Design Group: Drupal 8: Programatically Adding a Views Footer

Tue, 20/10/2015 - 20:00

Recently, I needed to add some dynamic content to a Views footer. Specifically, I needed to change a link in the Views footer based on the current path, which isn’t an option from the Views UI. I found some good documentation showing how this can be done in older versions of Drupal (https://www.drupal.org/node/749452), but nothing for Drupal 8. I figured the approach must be similar in Drupal 8 so I started searching and reverse engineering.

First, I added a footer directly through the Views UI and exported my sites configuration using Drupal 8’s configuration management tools. Finding the footer in the exported YAML file provided some valuable insight on how I might add the footer programmatically.

Views Footer as found in the YAML export: footer: area_text_custom: id: area_text_custom table: views field: area_text_custom relationship: none group_type: group admin_label: '' empty: false tokenize: false content: Footer content is great plugin_id: text_custom

The YAML Views export provided the settings I needed to add the footer, but I also needed to figure out the right place to do it in code. If you are familiar with Views hooks, then you know there are a ton of them and sometimes finding the right one to use is a bit of trial and error. Since some of the Drupal 7 examples I found used function hook_views_pre_view(), I started with that hook. Using the Devel module, a great option for debugging in Drupal, and its dpm() function, I inspected the $view object. In Drupal 8, dpm() shows the available methods for an object. With a little bit of guesswork, the setHandler method seemed like the correct choice.

Output from the dpm() function.

I was able to add a Views footer with some code in a custom module: use Drupal\views\ViewExecutable; function YOURMODULENAME_views_pre_view(ViewExecutable $view, $display_id, array &$args) { if ($view->id() == 'view_machine_name' && $display_id === 'view_display') { $options = array( 'id' => 'area_text_custom', 'table' => 'views', 'field' => 'area_text_custom', 'relationship' => 'none', 'group_type' => 'none', 'admin_label' => '', 'empty' => TRUE, 'tokenize' => FALSE, 'content' => ‘Footer content is great.’, 'plugin_id' => 'text_custom', ); $view->setHandler('view_display', 'footer', 'area_text_custom', $options); } }

One piece of the Drupal 8 Views module has been solved!

Categories: Elsewhere

Pages