Drupal Planet

Subscribe to Drupal Planet feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 1 hour 47 min ago

Third & Grove: Magento 2 Cluster Deployments With Deployer

March 3, 2017 - 9:19am
Magento 2 Cluster Deployments With Deployer jwatts Fri, 03/03/2017 - 08:19
Categories: Blogs

OSTraining: How to make a complex webform in Drupal 8

March 3, 2017 - 7:45am

One of our OSTraining members asked us how to make a user input form using Drupal 8 Webform module. So, we thought what could be a more useful answer than a comprehensive, easy to follow lesson.

For the purpose of this tutorial we will use the Webform module. If you would like to use the "Webform Devel" option, you will also need the Devel module.

Categories: Blogs

Aram Boyajyan: Programmatically creating custom block types for Panels

March 2, 2017 - 7:37pm
Programmatically creating custom block types for Panels Fri, 03/03/2017 - 00:37

The most potent Drupal module for creating very complex layouts is definitely Panels. It integrates with a lot of other parts of your Drupal site, so you can show views, nodes, webforms, blocks, and pretty much anything else you can think of. Page builder is very easy to use and allows administrators visual representation of complex pages.

Categories: Blogs

Drupal Association blog: Saving time and money for the Drupal community

March 2, 2017 - 7:20pm

As you know, we've been highlighting the work of the Drupal Association Engineering Team during our membership campaign. Every day, this small team moves the needle forward so that we all have a better experience as users of Drupal.org. In this post, we explore how the team's recent work results in faster, less expensive Drupal development.  

Helping Drupal development move faster with DrupalCI

DrupalCI testbots are the next generation of testing infrastructure for Drupal.org, funded by the Drupal Association and maintained by the Engineering team. For any project on the site, DrupalCI testing can be enabled from the Automated Testing link on the Project page. Every time a contribution to the Drupal project needs to be tested, DrupalCI spins up a testbot on AWS to test those changes. The DrupalCI testbots are helping Drupal contributors to test patches faster than ever before and they are more cost effective than our last generation testbots, both in price-per-test and in expense to maintain.

In recent months, we've added a number of new features including:

We're proud to say that our work on DrupalCI has increased the speed of Drupal development, saving time and money!

We'd also like to thank the volunteers who've helped us to bring this project to life: Mile23, jthorson, nick_schuch, dasrecht, ricardoamaro, mikey_p, chx, shyamala, webchick, and jhedstrom.

Want to keep up with the engineering team? Subscribe to change notifications so you can see ongoing improvements.

Making the greatest impact with member and donor funds with a leaner Drupal.org

Drupal.org is more portable and maintainable because of updates in 2016 that streamline our infrastructure. We've virtualized the majority of the infrastructure and standardized on Debian 8 images. We've also updated our configuration and user management from Puppet 3 + LDAP to Puppet 4 + Hiera. Dev sites are more robust and we can create staging and development environments faster than before.

All of this makes Drupal.org more cost-effective to run, easier to maintain, and increases our development velocity when we're working on new features to support the community. These efficiencies help to conserve membership and donor funds for other programs to help the Drupal community, like fiscal sponsorship for camps, and Community Cultivation Grants.

Improving developers' lives by supporting Composer workflows for Drupal

Composer is the defacto standard for managing dependencies in the PHP world. Over the course of 2016, the Drupal Association Engineering Team developed Composer endpoints for Drupal allowing Drupal developers to use Composer to manage dependencies, and allowing PHP developers at large to manage Drupal as part of their larger PHP projects in this standard workflow.

Composer is a force multiplier for enterprise site owners and developers within the Drupal community and at large. By supporting Composer, we've further opened Drupal to the wider PHP community, thus bringing new people into the fold to contribute.

A big thanks to everyone who helped with Composer: seldeak - the creator of Composer and Packagist.org, webflo - the creator and maintainer of http://packagist.drupal-composer.org, timmillwood, dixon_, badjava, cweagans, tstoeckler, mile23, and also Appnovation, who sponsored the initial development of Drupal.org's composer endpoints.

A more secure home for the Drupal community

Keeping Drupal.org secure is also the responsibility of the Drupal Association Engineering Team (though we rely on some trusted volunteers to help - thanks, mlhess and basic!). From heartbleed, to dirtycow, to cloudbleed - the team is always ready to respond when a vulnerability is disclosed. But the team is not just reactive - they also take proactive steps to keep Drupal.org and all our users' data safe. From ensuring that most of our servers are only available to each other on a back-end network, to putting in protections against DDOS attacks, to building anti-spam tools to prevent bad actors from registering accounts on the site- the Engineering Team is looking to prevent problems before they happen.

We'll keep at it, with your support

Every day, we're on call to keep Drupal.org running and improving. The list of small changes we make to have a big impact on your Drupal.org experience grows by the day. You can help sustain the work of the Drupal Association by joining as a member. Thank you!

Categories: Blogs

Metal Toad: Extending Drupal 8 Fields That Contain Data

March 2, 2017 - 6:21pm
Extending Drupal 8 Fields That Contain Data Marcus Bernal Thu, 03/02/2017 - 22:21 The Exception

Data protection is one of the primary advantages of Drupal, but sometimes there are exceptions to the rule and you might need to modify a field to account for some change in business needs. There are a few rule bends (read hacks) that can be done to circumvent Drupal's checks and still maintain data integrity. You should only perform this when extending a field or changing something reasonable that is allowed by the database server. For example, expanding a varchar length or changing unformatted string into a formatted text field.

Categories: Blogs

Lullabot: Users Gonna Use—How Lullabot Does Usability Testing

March 2, 2017 - 5:00pm
Matt and Mike sit down with three of Lullabot's senior UX designers to talk the ins and outs of usability testing within our design process.
Categories: Blogs

David Lohmeyer's Blog: Reverse core threaded comment ordering in Drupal 8!

March 2, 2017 - 4:09pm

The default ordering of all comments in Drupal 8's core comment module is ascending, meaning the oldest comments are displayed first. Sometimes you don't want this.

Assuming your comment field's machine name is field_comments, put this code into a module to get descending comments. I was having trouble with threaded comments, but this works since it alters the query by the c.thread database column instead of just 'torder':

Categories: Blogs

Drupalize.Me: New Hands-on Exercises for Module Development

March 2, 2017 - 2:17pm

We've added several new tutorials to our free Hands-on Exercises: Movie Project, which dive into module development. The first 16 exercises covered site building and theming. These latest additions continue to develop the same movie review site. They require you to start building your own custom modules to add a custom form for adding movie information to the site and use an external API to find and grab the information you need.

Categories: Blogs

TheodorosPloumis blog: Creating custom Backend with Drupal 8. Tips and proposals.

March 2, 2017 - 12:17pm

Drupal is a powerful system. But one of the disadvantages is the lack of a unified backend. Others can say that the backend is targeted on "professionals". In fact there is a backend already on core but since Drupal is so flexible and customizable each Drupal website or app may need different backend design and development. For example a user that already knows how to manage a Wordpress site should probably be able to manage another Wordpress site in the feature. This is not always true with Drupal and the UX may vary from site to site.

All these years while building websites for customers I have ended to some main best practices and tips for the backend of a Drupal project. The larger a project is with many content types and user roles the most required is the backend. If there is a redesign process happening it is mandatory to ask the admins what were their problems with the backend.

But let’s get to the point. Here are some proposals and tips.

Categories: Blogs

Agaric Collective: Start contributing to Drupal

March 1, 2017 - 4:50pm

I’ve been working on open source projects for a long time and contributing to Drupal for 6 years now.

And I want to share my experience and the things that helped me contribute to Drupal.

Where you can help:

I think one of the first problems I had to face when I started contributing was picking up an issue from the Drupal issue queue and to start working on it. When I started, all the issues seemed very hard or complex (and some are), fortunately there are a list of issues for people who want to start contributing to Drupal, these issues have the Novice tag. The idea of these issues is for someone to feel the experience of working on an issue.

What you need to know

Some of the things to learn while working on novice issues are:

  • Use git
  • Learn to create a patch using git
  • When a ticket is old and the patch doesn’t apply anymore it is necessary to reroll the patch, that is a very common thing on the issue queue and is just updating the patch so it can be applied to the project again.
  • Every time a new patch is uploaded, it is necessary to provide an interdiff. An interdiff is just a file showing what changed from the previous patch to the new one. This is a very important thing as it helps a lot for the reviewer to know what has changed. This is especially important if it is a big patch.
  • Use the Drupal Coding Standards, and the easiest way to follow along is by using PHPCS and later integrate it with your IDE
  • The changes must pass the "Core Gates" which essentially are checklists of things that every contribution must have in order to keep the quality of the code up to standards.
Don’t work on novice issues forever

While working on novice issues is a good way to start, it is necessary to jump to issues not marked as novice as soon as we feel comfortable with the things listed above. The non-novice issues are where we can really learn how Drupal works.

A few ways to start working on non-novice issues are:

  • reviewing patches from other users, so you can learn how a change is done and start checking how the core works, reading code from others is a great way to improve your abilities as developer and at the same time help to keep moving the issues along, so they can be fixed.
  • Another way to contribute is by writing tests, every patch with a fix must have a test to avoid regressions. While writing tests sounds like a hard thing to do, Drupal 8 help us a lot with this. There is a whole page written about the topic. Also the Examples module does not just provide examples of how to do things with Drupal but also how to test them, so keep that module at hand as it is a great resource. Drupal 8 has thousands of tests already, so for sure there is at least one which is very similar to what you need to do.
  • Pick an issue related to the component you want to know more about, Drupal 8 has a lot of components, and if you want to know how a specific part works just pick one of its bugs and work on it. Don’t worry if the bug seems easy to fix in the issue but in the code it is not, that is normal. Before you start fixing the bug, it is necessary to understand what the problem is and part of that is learning how that specific part of the component works. So when finally a patch can be provided for that issue you will now know how that component works. This is (for me) the best way to learn. While you help Drupal to be more stable, at the same time you gain understanding on a very deep level of how Drupal works.
  • Be your own critic while you are working on client work, if there is something which doesn’t seem right, don’t hesitate to look at an issue with that problem before you do a workaround, maybe someone has already written a patch and it might just need a reroll, a review or a test. Sometimes you can help while working on a project. At Agaric we recently found a bug while working on a project and it was a 6 year old issue that just needed a review and an extra test. Now it is fixed, for us and for everyone.
Final comments

When feeling frustrated while working on an issue, remember the Thomas Edison quote "Genius is one percent inspiration, ninety-nine percent perspiration", while we keep trying and keep working and asking questions and trying new things, just don’t give up, eventually we will make it happen. When someone starts contributing, it is normal to feel like they are not good enough. Just keep trying!

Remember, contributing for most of the people is an unpaid labor, don’t feel disappointed if there is an issue where you spent a good amount of time and no one reviews it, there are issues that have been around for years which aren’t committed, but even if they aren’t, the next developer with your same problem will find your patch and use it. So even if your code is not part of a module/core it still helps.

Going to conferences and meeting Drupalistas is a good way to keep you motivated and to learn new things. It is fun to meet in person the Drupal.org users who helped you in the issue queue.

Another thing that might help to keep you motivated is to see your name at DrupalCores.com. There you can see a list of users and mentions: for every new mention/contribution your nick will gain a few place in that rank.

Categories: Blogs

Freelock : 6 things to consider before the next AWS outage

March 1, 2017 - 3:28pm
server-rack-space.jpg

Yesterday Amazon Web Services (AWS) had a major outage in their US-East datacenter, in Virgina. It made all sorts of national news, largely because it affected some major online services.

Drupal PlanetAmazonCloudNetwork AdministationNetworksServermaintenanceHosting
Categories: Blogs

Lullabot: Drupal Serialization Step-by-Step

March 1, 2017 - 3:24pm

In my previous article about the serializer component, I touched on the basic concepts involved when serializing an object. To summarize, serialization is the combination of encoding and normalization. Normalizers simplify complex objects, like User or ComplexDataDefinition. Denormalizers perform the reverse operation. Using a structured array of data, they generate complex objects like the ones listed above.

In this article, I will focus on the Drupal integration of the Symfony serializer component. For this, I will guide you step-by-step through a module I created as an example. You can find the module at https://github.com/e0ipso/entity_markdown. I have created a different commit for each step of the process, and this article includes a link to the code in each step at the beginning of each section. However, you can use GitHub UI to browse the code at any time and see the diff.

undefined

When this module is finished, you will be able to transform any content entity into a Markdown representation of it. Rendering a content entity with Markdown might be useful if you wanted to send an email summary of a node, for instance, but the real motivation is to show how serialization can be important outside the context of web services.

Add a new normalizer service

These are the changes for this step. You can browse the state of the code at this step in here.

Symfony’s serializer component begins with a list of normalizer classes. Whenever an object needs to be normalized or serialized the serializer will loop through the available normalizers to find one that declares support for the type of object at hand, in our case a content entity. If you want to add a class to the list of eligible normalizers you need to create a new tagged service.

A tagged service is just a regular class definition that comes with an entry in the mymodule.services.yml so the service container can find it and instantiate it whenever appropriate. For a service to be a tagged as a service you need to add a tags property with a name. You can also add a priority integer to convey precedence with respect to services tagged with the same name. For a normalizer to be recognized by the serialization module, you need to add the tag name normalizer.

When Drupal core compiles the service container, our newly created tagged service will be added to the serializer list in what it’s called a compiler pass. This is the place in Drupal core where that happens. The service container is then cached for performance reasons. That is why you need to clear your caches when you add a new normalizer.

Our normalizer is an empty class at the moment. We will fix that in a moment. First, we need to turn our attention to another collection of services that need to be added to the serializer, the encoders.

Include the encoder for the Markdown format

These are the changes for this step. You can browse the state of the code at this step in here.

Similarly to a normalizer, the encoder is also added to the serialization system via a tagged service. It is crucial that this service implements `EncoderInterface`. Note that at this stage, the encoder does not contain its most important method encode(). However, you can see that it contains supportsEncoding(). When the serializer component needs to encode an structured array, it will test all the encoders available (those tagged services) by executing supportsEncoding() and passing the format specified by the user. In our case, if the user specifies the 'markdown' format. Then, our encoder will be used to transform the structured array into a string, because supportsEncoding() will return TRUE. To do the actual encoding it will use the encode() method. We will write that method later. First, let me describe the normalization process.

Normalize content entities

The normalization will differ each time. It depends on the format you want to turn your objects into, and it depends on the type of objects you want to transform. In our example, we want to turn a content entity into a Markdown document.

For that to happen, the serializer will need to be able to:

  1. Know when to use our normalizer class.
  2. Normalize the content entity.
  3. Normalize any field in the content entity.
  4. Normalize all the properties in every field.
Discover our custom normalizer

These are the changes for this step. You can browse the state of the code at this step in here.

For a normalizer to be considered a good fit for a given object it needs to meet two conditions:

  • Implement the `NormalizerInterface`.
  • Return `TRUE` when calling `supportsNormalization()` with the object to normalize and the format to normalize to.

The process is nearly the same as the one we used to determine which encoder to use. The main difference is that we also pass the object to normalize to the supportsNormalization() method. That is a critical part since it is very common to have multiple normalizers for the same format, depending on the type of object that needs to be normalized. A Node object will have different code that turns it into an structured array when compared to an HttpException. We take that into account in our example by checking if the object being normalized is an instance of a ContentEntityInterface.

Normalize the content entity

These are the changes for this step. You can browse the state of the code at this step in here.

This step contains a first attempt to normalize the content entity that gets passed as an argument to the normalize() method into our normalizer.

Imagine that our requirements are that the resulting markdown document needs to include an introductory section with the entity label, entity type, bundle and language. After that, we need a list with all the field names and the values of their properties. For example, the body field of a node will result in the name field_body and the values for format, summary and value. In addition to that any field can be single or multivalue, so we will take that into consideration.

To fulfill these requirements, I've written a bunch of code that deals with the specific use case of normalizing a content entity into an structured array ready to be encoded into Markdown. I don’t think that the specific code is relevant to explain how normalization works, but I've added code comments to help you follow my logic.

You may have spotted the presence of a helper method called normalizeFieldItemValue() and a comment that says Now transform the field into a string version of it. Those two are big red flags suggesting that our normalizer is doing more than it should, and that it’s implicitly normalizing objects that are not of type ContentEntityInterface but of type FieldItemListInterface and FieldItemInterface. In the next section we will refactor the code in ContentEntityNormalizer to defer that implicit normalization to the serializer.

Recursive normalization

These are the changes for this step. You can browse the state of the code at this step in here.

When the serializer is initialized with the list of normalizers, for each one it checks if they implement SerializerAwareInterface. For the ones that do, the serializer adds a reference to itself into them. That way you can serialize/normalize nested objects during the normalization process. You can see how our ContentEntityNormalizer extends from SerializerAwareNormalizer, which implements the aforementioned interface. The practical impact of that is that we can use $this->serializer->normalize() from within our ContentEntityNormalizer. We will use that to normalize all the field lists in the entity and the field items inside of those.

First turn your focus to the new version of the ContentEntityNormalizer. You can see how the normalizer is divided into parts that are specific to the entity, like the label, the entity type, the bundle, and the language. The normalization for each field item list is now done in a single line: $this->serializer->normalize($field_item_list, $format, $context);.  We have reduced the LOC to almost half, and the cyclomatic complexity of the class even further. This has a great impact on the maintainability of the code.

All this code has now been moved to two different normalizers:

  • FieldItemListNormalizer contains the code that deals with normalizing single and multivalue fields. It uses the serializer to normalize each individual field item.
  • FieldItemNormalizer contains the code that normalizes the individual field items values and their properties/columns.

You can see that for the serializer to be able to recognize our new `FieldListItemNormalizer` and `FieldItemNormalizer` objects we need to add them to the service container, just like we did for the ContentEntityIterface normalizer.

A very nice side effect of this refactor, in addition to the maintainability improvement, is that a third party module can build upon our code more easily. Imagine that this third party module wants to make all field labels bold. Before the refactor they would need to introduce a normalizer for content entities—and play with the service priority so it gets selected before ours. That normalizer would contain a big copy and paste of a big blob of code in order to be able to make the desired tweaks. After the refactor, our third party would only need to have a normalizer for the field item list (which outputs the field label) with more priority than ours. That is a great win for extensibility.

Implement the encoder

As we said above the most important part of the encoder is encapsulated in the `encode()` method. That is the method in charge of turning the structured array from the normalization process into a string. In our particular case we treat each entry of the normalized array as a line in the output, then we append any suffix or prefix that may apply.

Further development

At this point the Entity Markdown module is ready to take any entity and turn it into a Markdown document. The only question is how to execute the serializer. If you want to execute it programmatically you only need do:

\Drupal::service(‘serializer’)->serialize(Node::load(1), ‘markdown’);

However there are other options. You could declare a REST format like the HAL module so you can make an HTTP request to http://example.org/node/1?_format=markdown and get a Markdown representation of the node in response (after configuring the corresponding REST settings).

Conclusion

The serialization system is a powerful tool that allows you to reform an object to suit your needs. The key concepts that you need to understand when creating a custom serialization are:

  • Tagged services for discovery
  • How a normalizer and an encoder get chosen for the task
  • How recursive serialization can improve maintainability and limit complexity.

Once you are aware and familiar with the serializer component you will start noticing use cases for it. Instead of using hard-coded solutions with poor extensibility and maintainability, start leveraging the serialization system.

Categories: Blogs

Phponwebsites: Update multiple fields using #ajax in Drupal 7 form

March 1, 2017 - 3:18pm
     We know how to replace a field using #ajax in a form. Can we update multiple fields using #ajax in a form? Yes, we can update multiple fields using #ajax in the Drupal 7. We can achieve it using ajax_command_replace() in Drupal 7. For more details about ajax commands on Drupal 7, please visit https://api.drupal.org/api/drupal/7.x/search/ajax_command.

Update fields using #ajax in a Drupal form:
    Consider the following example. In this example, I've created a form with fields First, Second & Third name. I tried to update the Second & Third name fields when focus out on the First name field.
/** * Implments hook_form() */function phponwebsites_ajax_form($form, &$form_state) {  $form['firstname'] = array(    '#title' => t('First name'),    '#type' => 'textfield',    '#ajax' => array(      'callback' => '_generate_textfield',      'wrapper' => 'copied-text-field',    )  );
  $form['secondname'] = array(    '#title' => t('Second name'),    '#type' => 'textfield',    '#prefix' => '<div id="copied-secondname">',    '#suffix' => '</div>',  );
  $form['thirdname'] = array(    '#title' => t('Third name'),    '#type' => 'textfield',    '#prefix' => '<div id="copied-thirdname">',    '#suffix' => '</div>',  );
  $form['submit'] = array(    '#type' => 'submit',    '#value' => 'Submit'  );
  return $form;}
function _generate_textfield($form, &$form_state) {  if (!empty($form_state['values']['firstname'])) {    $form['secondname']['#value'] =  $form_state['values']['firstname'];    $form['thirdname']['#value'] =  $form_state['values']['firstname'];  }  $commands = array();  $commands[] = ajax_command_replace('#copied-secondname', drupal_render($form['secondname']));  $commands[] = ajax_command_replace('#copied-thirdname', drupal_render($form['thirdname']));  return array('#type' => 'ajax', '#commands' => $commands);}
When you tried to execute the above codes, it'll populate the same name on the other 2 fields. It looks likes the below image:


Now I hope you know how to populate multiple fields using #ajax in Drupal 7 forms.Related articles:
Remove speical characters from URL alias using pathauto module in Drupal 7
Add new menu item into already created menu in Drupal 7
Add class into menu item in Drupal 7
Create menu tab programmatically in Drupal 7
Add custom fields to search api index in Drupal 7
Clear views cache when insert, update and delete a node in Drupal 7
Create a page without header and footer in Drupal 7
Login using both email and username in Drupal 7
Disable future dates in date pop-up calendar Drupal 7
Categories: Blogs

Sooper Drupal Themes: It's The Details That Make A Good Product Great: Glazed Theme 2.6.3 And Builder 1.1.2 Updates!

March 1, 2017 - 12:53pm

It's the details that make the difference between a good product and a great product. The past 6 weeks were spent on refining the design patterns that constitute the Glazed branding and products. The result is a product that feels tight and inspires confidence. Just 2 years young, Glazed Builder is the new kid on the block but the progress since 1.0 has never slowed down. With the seeminlgy everlasting lack of quality Drupal themes for Drupal 7 and especially 8 I think that with Glazed Theme and Glazed Builder we have the platform that is needed to really fuse Drupal's powerful backend with beautiful designs in a maintainable, responsible way. In the future we'll be working hard on realizing this ambition, and publishing new designs for different niches.

Try Glazed Builder Now

The Admin demo is free, no registration required!

Better Controls Positioning

Glazed Builder is different from consumer tools like Wix and Squarespace because it doesn't put limitations on where you place elements. Our grid system is based on bootstrap and our tools allow you to use Bootstrap elements like you would if you were custom coding. You're coding without having to write or see the code. The consequence was that sometimes nested rows, tabs, accordeons etc. had so many controls that they could overlap. 

This problem is was not easily solved, that is probably why you find very few drag and drop builders without some restrictions to where you place your elements. With this week's release the problem is no longer a problem. We're introducing a new algorithm for controls positioning. Thanks to advancements in browser APIs it's now feasible to do hit detection efficiently. This means we create space for icons when necessary, but we leave the layout intact where we can. This doesn't just solve the overlapping controls problem but also creates a much closer WYSIWYG experience.  

Performance Improvements for Theme and Builder

With Mobile performance more important than ever it's our responsibility to be vigilant about performance and take action when we see opportunity for improvement. One such improvement is our menu system. Our unique mobile menu provides an unparalleled navigation experience, and uses a bit of JavaScript to manage this. This caused a menu flickering on long page because the menu initiation happened close to the bottom of the page. This code was moved to the beginning of the page to speed up the menu render.

Other improvements have been made by replacing jQuery with browser native APIs, partly using the new knowledge that was gained from creating our unique controls positioning algorithm. 

Material Style Box Shadows

Material Design box shadows are now available in the style tab using a simple slider. The slider represents the "surface level" metaphor used in Material Design's documentation and it renders elegant and simple shadows that are taken directly from Google's recommendations about drop shadows in Material Design.. 

Ready for Drupal 8

We're currently developing the Drupal 8 version of the Glazed installation profile and we are starting to upgrade our theme and modules.​ We previsouly aimed to release our Drupal 8 beta alongside the Drupal 8.3 release, but now that the D8media initiative has postponed their work to be released in Drupal 8.4 we are relaxing this deadline.

We're taking our time to make the right decisions about our installation profile, our theme, our drag and drop builder, and all the thousands of lines of code that make up our themes and demo websites. Expect to see Drupal 8 beta products somewhere after the 8.3 release of Drupal core and before the 8.4 release.

source

For more details about this week's updates:

        Try Glazed Builder Now

        The Admin demo is free, no registration required!

        Categories: Blogs

        Drupal blog: Drupal 8.3.0-rc1 is available for testing

        March 1, 2017 - 12:50pm

        The first release candidate for the upcoming Drupal 8.3.0 release is now available for testing. Drupal 8.3.0 is expected to be released April 5.

        Download Drupal-8.3.0-rc1

        8.3.x includes new experimental modules for workflows, layout discovery and field layouts; raises stability of the BigPipe module to stable and the Migrate module to beta; and includes several REST, content moderation, authoring experience, performance, and testing improvements among other things. You can read a detailed list of improvements in the announcements of alpha1 and beta1.

        What does this mean to me? For Drupal 8 site owners

        The final bugfix release of 8.2.x has been released. A final security release window for 8.2.x is scheduled for March 15, but 8.2.x will receive no further releases following 8.3.0, and sites should prepare to update from 8.2.x to 8.3.x in order to continue getting bug and security fixes. Use update.php to update your 8.2.x sites to the 8.3.x series, just as you would to update from (e.g.) 8.2.4 to 8.2.5. You can use this release candidate to test the update. (Always back up your data before updating sites, and do not test updates in production.)

        For module and theme authors

        Drupal 8.3.x is backwards-compatible with 8.2.x. However, it does include internal API changes and API changes to experimental modules, so some minor updates may be required. Review the change records for 8.3.x, and test modules and themes with the release candidate now.

        For translators

        Some text changes were made since Drupal 8.2.0. Localize.drupal.org automatically offers these new and modified strings for translation. Strings are frozen with the release candidate, so translators can now update translations.

        For core developers

        All outstanding issues filed against 8.2.x were automatically migrated to 8.3.x. Future bug reports should be targeted against the 8.3.x branch. 8.4.x will remain open for new development during the 8.3.x release candidate phase. For more information, see the release candidate phase announcement.

        Your bug reports help make Drupal better!

        Release candidates are a chance to identify bugs for the upcoming release, so help us by searching the issue queue for any bugs you find, and filing a new issue if your bug has not been reported yet.

        Categories: Blogs

        myDropWizard.com: It's NOT Amazon's fault the internet broke yesterday - it's OURS!

        March 1, 2017 - 12:26pm

        You probably noticed that many sites and apps were having serious problems yesterday due to an Amazon AWS outage.

        Some sites/apps were completely down, and others had partial or reduced functionality. In the Drupal world, Pantheon was affected: sites didn't go down (huzzah for Pantheon!), but everything was in read-only mode for several hours, so users couldn't upload files to their sites and many dashboard functions didn't work.

        Already, many are talking about how this outage is proof that the public cloud is a bad idea. Or, that Amazon messed up big time and maybe we should look at other cloud providers.

        However, I'm going to argue that it wasn't Amazon's fault that this outage took down so many sites and apps.

        And by extension, this isn't proof that the cloud is a bad idea, or that we should look to providers other than Amazon. The cloud is great, and so is Amazon AWS.

        I'm going to argue that it's OUR fault -- the web developers who make all these great apps and sites -- that this outage broke the internet.

        Please read more to find out why!

        Categories: Blogs

        Evolving Web: Drupal Theming and Site Building: 6 Best Practices

        March 1, 2017 - 11:39am

        There are many ways of building sites and themes - be it Drupal, Wordpress, Magento or any Content Management System. In my particular case, after nine years of building Drupal themes, reading how other themers do it, and learning from my mistakes, I came up with a few tips I would like to share with everyone.

        Choose a good base theme

        As I mentioned in my previous post, Planning Your Drupal 8 Theme: Choosing a Base Theme, there are lots of factors that will influence your final decision, but you'll eventually start feeling more comfortable with one, and that will be the one you'll be using for most projects.

        Study the options

        My first and most important tip: choose a base theme wisely. Try to see what other people use, how they do it and what experiences they had with it.

        Apart from the quality and popularity of a theme, the following questions will always help you make your choice:

        • How many people use it? Some themes like Bootstrap have more than 130,000 Drupal 7 & 8 reported installs. This means more people testing it, more live sites and more interest in pushing it forward.
        • Is its use increasing? A theme that more and more people use all the time is a good indicator of the project health. The "Installation ratio" indicates that it is growing up and gaining popularity across the community.
        • Is there someone regularly behind it? Just feel free to check the issue queue for the latest issues and commits.
        • How do I start? What if I have questions? Most themes include their own detailed docs. The issue queue is also a nice source for docs which help one learn how to work with the relevant theme.
        • How safe is it? Themes and modules are as safe as any Open Source software. Check for the well-maintained ones, and make sure their stable releases are covered by the Security Advisory Policy - the green shield close to the download.

        As I said before, feel free to explore all the available options at Drupal.org and ask yourself each one of those questions before making a final decision.

        ...and never modify the base theme

        Base themes are meant to be used as base themes, not as starter themes. If you edit theme files directly, the changes may be lost when you run updates in the future. Be sure to read the Creating a Drupal sub-theme docs in Drupal.org to properly use these on your projects.

        Views should always be your first approach

        There are many ways to build pages in Drupal, either using Views, Panels, Blocks, "Full HTML" on the node body and so on. But there is that feeling you get when you make it work using a View:

        "Wow... this is how it should be."

        When you use Views, you feel you are doing it right. You feel it is reusable, portable and very flexible. Any Drupal site should be, at least, 90% Views on the Front-end side.

        When creating a new page, I suggest preferring the following methods, in order: if you can't build your page with one method, only then fall back to the item below. The lower you go down the list, the less reusable and flexible your solution will be.

        Can I achieve it with...?

        • Views
        • Panels
        • Blocks
        • Paragraphs
        • Display Modes
        • Full HTML
        • Template Files
        In most cases, this has worked for me over the years. Just feel free to evaluate it against solutions you have built before. I would love to hear about your experience on comments below. Template files are the last option

        Based on the list above, editing the template files (.tpl.php on D6/7 and .twig on D8) should always be the last option of your theming strategy

        Template files should only be considered when:

        • Adding & editing regions.
        • Making global layout changes.
        • Customizing your layout structure.

        Remember that while overriding template files of a base theme, we are risking smooth support for future updates of it, making our update process harder when newer versions of the base theme come out.

        Use SASS for your styles

        With SASS, the maintainability and reusability of CSS styles go to an entirely new level. It is impressive how much time is saved and how flexible and easy to maintain SASS files are, compared to traditional CSS management.

        SASS helps you create styling that is more consistent across different site components, which makes themes more extensible. In a previous blog post, I detailed its benefits along with a comprehensive set of steps of how to add it to your theme while moving your existing stylesheets to SASS.

        Use Paragraphs for your landing pages

        Paragraphs is a new module every site builder should use for creating landing pages. It is definitely a new approach for managing different sections of content inside of the body field. You feel like you're managing movable pieces of HTML code, as it is a flexible way to add, sort & customize sections on a particular section of a page.

        If you are new to Paragraphs, my colleague Suzanne Dergacheva has an interesting post that details How to Create Landing Pages with Drupal 8 and Paragraphs.

        Where to go now

        Well, it is definitely up to you :) but I suggest everyone to take a look at the following posts as these will help you improve your theming workflow and overall knowledge of Drupal 8:

        And feel free to give some feedback below. Your comments will help me and everyone else improve our theming skills. + more awesome articles by Evolving Web
        Categories: Blogs

        Evolving Web: Drupal Theming and Site Building: 6 Best Practices

        March 1, 2017 - 11:39am

        There are many ways of building sites and themes - be it Drupal, Wordpress, Magento or any Content Management System. In my particular case, after nine years of building Drupal themes, reading how other themers do it, and learning from my mistakes, I came up with a few tips I would like to share with everyone.

        read more
        Categories: Blogs

        Acquia Developer Center Blog: 249: Changing lives, changing the world - voices from the Dublin Driesnote

        March 1, 2017 - 11:30am

        DrupalCon Dublin keynote community voices - In Acquia podcast 248, Acquia Office of the CTO Multimedia Designer, Alena "ASH" Heath and I talked about helping capture stories of contribution and change from the Drupal community. In this quick follow-up, here are the soundbites that were featured in Dries Buytaert's "Driesnote" address at DrupalCon Dublin, 2016.

        A warm round of thanks to Vijaya Chandran Mani, Zsófi Major, Drew Gorton, Franck Seferiba Salif Soulama, Suchi Garg, Ronan Dowling, Jack Holding, Sheena Morris, and Crispin Read. Thanks for all your help, contributions, and being part of the Drupal community!

        Skill Level: BeginnerIntermediateAdvanced
        Categories: Blogs

        Pages