سیاره دروپال

Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to خوراک سیاره دروپال

We're counting down the days to the official SooperThemes Drupal 8 Release! Count with us as we will be writing a Drupal 8 related blog post every day for the next 8 days.

Drupal 8 is known for being heavier and slower than Drupal 7. However, Drupal 8 doesn't deserve this image and I think it got this image from lazy benchmarking: Testers just install Drupal's default profile, run some ab tests and call it a day. This is not a realistic test! Real Drupal websites will have hundreds of pages, menu items, configuration objects, more complex theming, more modules etc. 

I did some more extensive testing to compare our Drupal 7 products with the Drupal 8 versions that are to be released next week. The beautiful thing (for this test) about our products is that we maintain them with feature parity across Drupal 8 and 7. We provide installation profiles that combined have thousands of content items, menu items, and configuration settings that make them very close to real-world Drupal 8 & 7 websites. Perfect material for benchmarking!

Test 1: Drupal 8 vs Drupal 7 Cached Page Delivery

Drupal 8 default profile cached page benchmark. Drupal 7 255% faster than Drupal 8.

Ok let's get this over with first. Drupal 8 is built on a PHP core that is slower to parse than Drupal 7 and uses more memory. On an empty Drupal installation you will really notice this difference because the empty shell will act like a magnifying glass on the underlying architecture. In the chart above you can see that Drupal 7 is more than twice as fast at delivering cached pages to anonymous users. 

This test is what most people will refer to when saying Drupal 8 is slower than Drupal 7 but this is in fact the least interesting test for 2 reasons:

  1. Nowadays it is very easy to put a cache in front of Drupal. You can use Nginx, Varnish, or Cloudflare with the free plan to serve thousands of cached pages per second, regardless of whether Drupal 8 or 7 or anything else is behind the cache. 
  2. Any empty installation with Drupal's default profile is a bad model for a real website.
Test 2: Drupal 8 vs Drupal 7 Autenticated Views Portfolio Display 

Drupal 8 Glazed Main Demo views display benchmark. Drupal 8  is 228% faster than Drupal 7.

For this second test we use the Main Demo installation profile with our Glazed Theme and Glazed Builder products. This means we have a dropdown menu with 100+ items, a database with around 100 nodes, lots of views displays and contrib modules, and our Glazed theme is enabled which subthemes the bootstrap basetheme. This is a much closer simulation of a real-life Drupal website than the default profile is!

We're benchmarking a views display that draws fields from nodes and taxonomy terms, does some interesting templating and is then pulled into a page using Glazed theme to display the view along with peripheral content.

As you can see in the chart Drupal 8 is now twice as fast as Drupal 7. Despite the heavier core, Drupal 8 is faster when handling large amount of configuration, views, and heavier themes like Glazed and the Bootstrap basetheme. I suspect this is due to the more elaborate caching architecture in Drupal 8. Especially template files are now heavily cached and so are other important Drupal components.

Tested page: https://demo.sooperthemes.com/glazed-main/portfolio/premium1

Test 3: Drupal 8 vs Drupal 7 Autenticated Drag and Drop Page 

Drupal 8 Glaezd Main Demo views display benchmark. Drupal 8 12,5% than Drupal 7.

Our previous test showed an extreme example of Drupal 8 being faster due to its better handling of views. This 3rd test shows what we typically see when benchmarking Drupal 8: Drupal 8 is slightly faster in loading pages in our Glazed Theme demos. We see similar results when testing drag and drop pages, or other content types that don't use the drag and drop builder. In fact our Page Builder module does not significantly impact performance even when loading multiple Glazed Builder editors within the same page. 

The Drupal 8 and 7 installation profiles have near feature-parity but in fact the Drupal 8 version includes the Admin Toolbar module and the Drupal 7 profiles do not include an admin menu module. This means that each page comes with an additional 200 menu items in the Drupal 8 tests. In Drupal 7 I usually install the admin_menu module for faster administration, and this module is known to be significant burden on the server. The fact that Drupal 8 is faster in our tests despite loading the additional 200 menu items is impressive! 

Tested page: https://demo.sooperthemes.com/glazed-main/elements/layout-elements/columns

Conclusion: Drupal 8 Is A Heavier System With More Extensive Caching That Can Make It Faster Than Drupal 7 In Real-Life Situations

At the start of its life Drupal 8.0 got a lot of criticism for being slow. Now in 2018, Drupal 8.5 has seen a significant number of performance improvements and while it's still slower than Drupal 7 at the core, it's faster in complex situations that are more relevant to real-life Drupal websites.

Drupal 8 is faster where it matters, and more scalable! It's also important to add that both test installations did not have any special settings enabling caching of content, views, blocks, etc. Drupal 8 has a much more advanced and more granular caching system that lets you finetune and optimize your experience for logged in users on a grander scale than was every possible with Drupal 7. Notably there is the BigPipe module that gives you lightning fast loadtimes for your primary content and it can then separately lazy-load less important content, like the footer, menus, and sidebar blocks.

For sure this test brings good news to SooperThemes customers, who will enjoy a faster experience our of the box with our Glazed demo installation profiles. As a side note: importing demo content is also twice as fast in our Drupal 8 installation profiles versus Drupal 7.

What is your experience?

Drupal's performance is a complex thing to test and I'm sure you can get different results in varying situations, if you have any questions about the test or if you want to share your own experience with Drupal 8's performance let me know in the comments!

It was great to get back to DrupalCon this year.  I really enjoyed the Con, and this was one of my favorite DrupalCons in the eight years I’ve been going. Drupal as a community is getting more serious about diversity. In the past, there’s been an undercurrent of people saying “diversity is good” for a... Read more »

The post Diversity and Staying Grounded: Recapping Drupalcon 2018 appeared first on Advomatic.

I went to DrupalCon this year with the goal of doing things a bit differently this time. I’m a bit of an introvert with people at first, but I’ve been told I don’t come off that way. So, I decided to leverage that and just push myself through things that, in years past, I would... Read more »

The post A Week of Firsts at Drupalcon appeared first on Advomatic.

As part of Philly Tech Week this year, Drupaldelphia expanded their scope to include topics like Drupal, Agile, JavaScript (Node.js, Angular, React), case studies, and many more!!

Boomeranging back to Pennsylvania from DrupalCon Nashville, Adam Bergstein will be attending and presenting this year at Philadelphia's premier Drupal Camp.

This is a first blog post about how we build the team portal for Roparun.

But first what is Roparun? The Roparun is a relay race of over 500 kilometres from Paris and Hamburg to Rotterdam, where people in teams, take part in an athletic event to raise money for people with cancer. It’s also called an adventure for life. This is also clear from the motto, which for years has been: ‘Adding life to days, when days often can’t be added to life’.

So each year Roparun organizes this race and around 400 teams participate in the event. The first part of the project was to setup donation functionality and that is working right now.

The next part of the project is to create a new portal for team captains where they can manage their team data, (e.g. name of the team, start location and the individual team members). We have chosen to have this in a separate Drupal website.

In CiviCRM each team captain is registered as a participant to the Roparun event with the role team captain. The team captain can login into the portal as soon as he has been registered as a team captain and till the event is over.

The first part of this project is that we wanted the team captains being able to login and we have created a module called CiviMRF User Sync. This module build on top of the CiviMRF framework.

This user sync module uses the CiviCRM api to create drupal user accounts. See screenshot below for the configuration.

What you can see is that we use a custom api to retrieve the team captains. This custom api returns the email, contact id and the team id of the team captain. We store the e-mail address as the username and at the email field at the user level.

As soon as a new team captain is registered a new user record is created and the team captain receives an e-mail with a link to create a password.

As soon as an existing team captain is removed from CiviCRM the user account is cancelled and the team captain receives an email indicating that his account is disabled.

We have also created a drupal module to store the team id at the drupal user record and use this team id in the view (see https://github.com/CiviCooP/roparun_team_portal)

So the first bit is done, meaning a team captains can log in. The next bit is to build the portal with Drupal Views and Webforms. The building blocks we are going to use for that is CiviMRF Webform, CiviMRF Views and at the CiviCRM site the form-processor. I will keep you posted on the developments of the next steps.

APIArchitectureCase studies and user storiesDrupalExtensionsInterface and designTips

We're counting down the days to the official SooperThemes Drupal 8 Release! Count with us as we will be writing a Drupal 8 related blog post every day for the next 8 days.

Drupal 8 content and content types video tutorial

view on sooperthemes.com if you can't see the video

This tutorial is for people who are new to Drupal 8. We'll be showing how to add content to Drupal 8 and how to change or add new content types. Content types are very flexible in Drupal 8 and that's what makes Drupal more powerful than WordPress and other systems for many use cases. 

Drupal 8's Content Overview Page

Just like all Drupal's previous versions this administration page is the central hub where all your content appears in one place. You get there by clicking the Content link in the toolbar. This takes you to an overview of all the pages in your Drupal website. From here you can edit and delete pages using the action links to the far right side of the table. Additionally you can operate on multiple pages at a time using the controls below the Action label.

The content administration page is not just for pages, using the primary tabs you can navigate to administration pages for files and comments. This can be extended by additional moduels that provide custom content entitities using Drupal 8's Entity API. For example on sooperthemes.com we also manage domain licenses and digital downloads on separate tabs, because these are custom entity types.

Adding Content In Drupal 8

Once you're at the content administration page it's easy to see how to add content. You start by clicking the blue button that reads "+ Add content". You'll now see a listing of content types that are available at your Drupal installation and you have to tell Drupal which type of content you would like to create. After choosing a content type you'll be taken to the content form where you get to fill in all the form fields that make up your content type. You'll learn more about these fields in the next section where we discuss adding fields to content types and adding new content types.

Drupal 8 Contact Management Administration Page

Adding Content Types In Drupal 8

The ability to create new content types and choose from a large selection of different field types is what makes Drupal the system of choice for many organisations that manage a lot of content. Companies of all sizes including Tesla, Disney, United Nations, and Qualcomm use Drupal because it's the best solution for managing a large amount of content on the internet.

To manage content types in Drupal 8 click Structure in the toolbar and then click Content Types.  Now you're looking at a listing of content types installed on your website. If you just installed a new Drupal 8 website with the default profile you will see the Article and Basic Page items.  If you installed one of our theme demo profiles or the free Glazed CMS installation profile you'll have a bunch more options. Check out our YouTube video above for a quick tour. 

Once you're at content types overview click the "+Add content type" button to create a new page type. The minimum you can do here is give your content type a name, for example "Special Page, or Forum Topic". There's a number of other options for your consideration when creating a content type:

Option What it's for Description Administrative help text for content type Preview before submitting You can require or offer a preview of the content before submission Explanation or submission guidelines Additional help text for content editors Publishing options 

You can choose whether this content should immediately be published upon saving. More importantly you should also check the "Create new revision" checkbox to ensure that you can compare and revert to older version of the content in case something goes wrong when editing the content. 

The other 2 options "Sticky at top of lists" and "Promoted to the front page" are legacy options that reference different ways in which your content can be prioritized in content listings (called views in Drupal).

Display settings Choose whether to display the author and post date on this content type, which really only makes sense for blog posts or other social content. This should be disabled for most use cases.  Menu settings Selecting menus here enabled content editor to add the content items to menus on your website.

Creating A Jobs Content Type

Let's create an example content type for the new Careers section of our website. We'll need to post job vacancies, so let's call our new content type Jobs. To create a new content type go to Structure > Content Types and click the "+ Add content type".

Here we fill in the name of our content type and disable the options for author information and menu structure. After all we don't want all our job postings to clutter our menu system, you would use the views module to create an overview of available jobs.

Next click the "Save and manage fields" button. Now we're in the content type configuration page and this is where we add the fields that we need on our job vacancies. To see exactly how this works check out the video above!

Building A Content Type For Job Vacancies

Adding Visual Drag And Drop To Your Content Type

Finally we'll show you how to get even more control over the design of your content with Glazed Builder our visual drag and drop builder for Drupal 8 and 7. You can use Glazed Builder on any long-text field in Drupal on any type of entity. To enable Glazed Builder on your content type go to Structure > Content Type > Your Content Type > Manage Display. Here you can select one or more of your text fields (For example the body field) and switch the Format option from Default to Glazed Builder. Take a peak at the end of our youtube video to see the end result!

April 20, 2018 Sometimes we need to alter data after a Drupal 8 migration has finished. With the migration events system, you can easily accomplish this. Why We need to do this One of the university clients we are helping migrate their Drupal 7 to Drupal 8 site had an interesting dilemma. They use the Flag module to mark favorite content withi...

Fellow Acquian Matthew Grasmick and I just presented How to build a Drupal site with Composer AND keep all of your hair at DrupalCon Nashville, and though the session wasn't recorded, we posted the slides and hands-on guide to using Composer to manage your Drupal 8 sites to the linked session page.

Tags: acquia drupal planet

Last week I wrote a Drupal module that uses face recognition to automatically tag images with the people in them. You can find it on Github, of course. With this module, you can add an image to a node, and automatically populate an entity_reference field with the names of the people in the image. This isn’t such a big deal for individual nodes of course; it’s really interesting for bulk use cases, like Digital Asset Management systems.

I had a great time at Drupalcon Nashville, reconnecting with friends, mentors, and colleagues as always. But this time I had some fresh perspective. After 3 months working with Microsoft’s (badass) CSE unit – building cutting edge proofs-of-concept for some of their biggest customers – the contrast was powerful. The Drupal core development team are famously obsessive about code quality and about optimizing the experience for developers and users. The velocity in the platform is truly amazing. But we’re missing out on a lot of the recent stuff that large organizations are building in their more custom applications. You may have noticed the same: all the cool kids are posting about Machine Learning, sentiment analysis, and computer vision. We don’t see any of that at Drupalcon.

There’s no reason to miss out on this stuff, though. Services like Azure are making it extremely easy to do all of these things, layering simple HTTP-based APIs on top of the complexity. As far as I can tell, the biggest obstacle is that there aren’t well defined standards for how to interact with these kinds of services, so it’s hard to make a generic module for them. This isn’t like the Lucene/Solr/ElasticSearch world, where one set of syntax – indeed, one model of how to think of content and communicate with a search-specialized service – has come to dominate. Great modules like search_api depend on these conceptual similarities between backends, and they just don’t exist yet for cognitive services.

So I set out to try and explore those problems in a Drupal module.

Image Auto Tag is my first experiment. It works, and I encourage you to play around with it, but please don’t even think of using it in production yet. It’s a starting point for how we might build an analog to the great search_api framework, for cognitive services rather than search.

I built it on Azure’s Cognitive Services Face API to start. Since the service is free for up to 5000 requests per month, this seemed like a place that most Drupalists would feel comfortable playing. Next up I’ll abstract the Azure portion of it into a plugin system, and try to define a common interface that makes sense whether it’s referring to Azure cognitive services, or a self-hosted, open source system like OpenFace. That’s the actual “hard work”.

In the meantime, I’ll continue to make this more robust with more tests, an easier UI, asynchronous operations, and so on. At a minimum it’ll become a solid “Azure Face Detection” module for Drupal, but I would love to make it more generally useful than that.

Comments, Issues, and helpful PRs are welcome.

DrupalCon Nashville 2018 Session

Join Acro Media's technical Drupal Commerce veteran, Josh Miller (all things programming) and Business Developer, Becky Parisotto (all things business) as they walk through the wild world of physical commerce that is powered by and paired with a Drupal web interface. Both Josh and Becky work together with a number of physical commerce clients. Through our client’s requirements, we have gained a better understanding of the iceberg that is building an interface for retail, and allowing for that true omni-channel experience for both customer, and (sometimes more importantly) the business owner.

Josh will review the state of Point of Sale as it integrates with Drupal Commerce 2 on Drupal 8, compare and contrast fulfillment in the new shipping and inventory modules, and talk about a new module that handles requesting products from your suppliers and updates store stock when its received. Additionally, Becky will walk us through what Drupal Commerce is capable of in the way of “powering your business” and truly being the end to end backend brain for finances, accounting, product management, customer management, shipping, fulfillment, stock, inventory and community. Drupal Commerce is a big box of legos, come and learn how we build fully integrated businesses, from the web to the storefront to the back of house, to the warehouse, and more.

This is meant to be a practical review with easy to digest client examples and micro case studies of how we merge an online tool with a physical store. Setting clients in digital stone, all powered by Drupal.

Talk to us

Acro Media is a Drupal Commerce development agency that specializes in enterprise-level ecommerce. We are committed to building strong strategic partnerships and using our ecommerce expertise to help clients create a dynamic web presence that engages audiences, generates revenue, and boosts brand awareness.

I got word of concerns about the recent CKEditor 4 vulnerability that is responsible for a moderately critical vulnerability in Drupal 8. Rest assured that most Drupal 7 sites are not in danger. While both the Glazed Builder module and the Glazed installation profiles include their own copy of CKEditor 4, this vulnerability exists in an optional image plugin for CKEditor 4 "image2" that is not included in the default package of CKEditor 4 that our products carry. 

The only Drupal 7 websites that are affected by this vulnerability are sites that use a custom build of CKEditor that explicitly includes the image2 plugin.

Drupal 8 does include this additional plugin, which is why Drupal 8 users should update to 8.5.2 immediately. For Drupal 7 users the commotion has actually sparked some positive deveopment: the Drupal 7 WYSIWYG module has pushed a release that supports the latest CKEditor 4.9.2. This means I can update all SooperThemes products to CKEditor 4.9.2 and this brings us a number of bug fixes and improvements to inline editing. This update will be available tuesday.

The latest CKEditor reportedly also dropped it's reliance on the eval() function which means we can start using better Content Security Policy headers that include the unsafe-eval directive on Drupal 7 sites.

SooperThemes Drupal 8.x-1.0 Release Planned Tuesday

After 13 months of intensive development, testing, and preparation of our product infrastructure we're finally launching our Drupal 8 page builder module and themes tuesday! In the past few weeks I've been learning a ton by talking to customers about what they like and dislike about Sooperthemes and especially the drag and drop builder. If you have any feedback or ideas for future development of SooperThemes.com and our products just leave a comment here or use the contact form!

Update The Wording Of How Our Pricing Works: Pay Once To Use For Life. Optionally Renew Yearly For Support & Updates.

I've also updated the pricing information to reflect the fact that you can pay once to download all our products and use them forever. This is how SooperThemes subscriptions have always worked. This was apparently not clear from the information and marketing communication on the website. You pay once and only renew if you wish to receive continued support and product updates. This subscription based payment concept is really what has made SooperThemes a success over the past 3 years and the increased stability in revenue is what gave me the confidence to continue investing all my energy and money in developing the Glazed Builder module and our next generation themes for both Drupal 7 and 8. I also think it's fair to users of the product that they pay a small yearly contribution to continue getting support and product updates because the products are continuously in flux. Subscribers may stop the subscription at any time and continue using the products without support services.

DrupalCon Nashville 2018 Session

Join Shawn McCabe, Acro Media CTO, as he goes behind the scenes and teaches a bit about how PHP uses memory when it runs your code. PHP's ease of use and low barrier to entry also have some side effects to how memory is used, sometimes using memory differently and in places you didn't expect. If you're doing small pages that load quickly, for a low traffic site, this probably won't even be noticeable unless things go quite wrong. Once you get into heavy pages on high traffic sites, or even worse, long running background processes, then knowing a bit more about the memory you're using can help a lot.

In PHP, variables have a lot of meta-data they need to store, since they can be any size and of any type. They need all this meta data to store information like how much data they hold, what type of data it is and how it is stored. Often this "hidden" meta data cost will use more memory than the actual info you are storing, although recent versions of PHP have improved on this.

The idea isn't to learn every low level detail, just to have a little knowledge of what is happening with memory usage when you're programming so you can be cognizant of the choices you make and a bit more efficient in your usage.

Hopefully this talk will be interesting to even experienced developers, but you only need some programming basics to follow along.

Talk to us

Acro Media is a Drupal Commerce development agency that specializes in enterprise-level ecommerce. We are committed to building strong strategic partnerships and using our ecommerce expertise to help clients create a dynamic web presence that engages audiences, generates revenue, and boosts brand awareness.

At the end of February, I began working on an series of API endpoints that would allow for a progressively decoupled cart experience. There are a few reasons why we decided that Drupal Commerce needed an API solely for the cart.

  1. Performance: when a cart block is rendered on the server it has complicated cache metadata. Cart block contents vary per user and change too often to be cached effectively. As such these blocks incur heavy logic and rendering costs.
  2. Flexibility: modern consumers expect interfaces to be more reactive and match common UX patterns. These patterns almost always require client-side implementation using JavaScript that communicates to backend APIs.

In my last blog I brought up why the API-First and JavaScript Modernization initiatives matter to Drupal Commerce. I wanted to target something limited in scope that would provide big wins for Drupal Commerce users as we ventured into the fully and progressively decoupled Drupal realm.

As a result, we now have the Commerce Cart API module. Our first implementation will be the Commerce Cart Flyout module, which uses the RESTful endpoints provided by the Cart API module to create the dynamic cart interface shown in the sample animation below.

This moves us decidedly down the path of providing Drupal Commerce users with progressively decoupled components that improve the customer experience. In a following blog post, I’ll going to write about what it was like to build this module. (Hint: we didn’t “just do it” and release it into the Drupal.org namespace.)

I am planning on experimenting with more areas that we can perform progressive decoupling and look forward to connecting with folks about the topic at Decoupled Drupal Days in August. You should meet me there to join in the conversation!

I recently stumbled upon an article which stated some facts on technology and its impact on one of the biggest sectors in the world - Healthcare. I was taken by surprise to know that a survey which engaged patients of all varieties, stated that two thirds of them had not been in a discussion with the doctors about their own treatment, more than 35% did not have a clear picture about the goals of their treatment, and 20% received a conflicting information from different professionals.

We've made a list of Drupal camps and summits that you can attend in the second quarter of the year. Drupal events are bringing together Drupal developers, site builder, themers, end users and those interested in learning more about Drupal. We are attending Drupal events because of sessions and collaborative discussions.   Drupaldelphia 2018 United States, Philadelphia, PA Hussian College of Art 27-28. April 2017 This year, Drupaldelphia is a part of Philly Tech Week 2018 presented by Comcast, and it will be hosted at Hussian College of Art. There are 39 accepted sessions.https://… READ MORE
How to find the route name in Drupal 8? admin Thu, 04/19/2018 - 08:21

In many cases, a route name is something you might need to get something done in Drupal 8. For example to generate a link, or maybe create a local task in your module.

Some examples:

The path can be found in a routing.yml file

Some times you can just search for the path in your codebase, and then find the corresponding route name. Let's say that I wanted to link to the page mysite.com/admin/config/regional/translate. If I just search the codebase for this path, it would be revealed in the file locale.routing.yml:

locale.translate_page: path: '/admin/config/regional/translate' defaults: _controller: '\Drupal\locale\Controller\LocaleController::translatePage' _title: 'User interface translation' requirements: _permission: 'translate interface'

To link to this page using the API for generating links, I would then do something like this:

$link = Link::fromTextAndUrl(t('Translate interface'), Url::fromRoute('locale.translate_page'));

So to conclude, the route name for that particular page is the key in the routing file, in this case locale.translate_page.

The path can not be found in a routing.yml file

Now, this is what I really wanted to write about in this blog post. Getting the route name directly from a routing file is simple enough, but where do you look if the path can not be found in a routing file?

Find route name with PHPStorm

My first trick is to utilize the IDE I use, PHPStorm.

Start by setting a breakpoint in index.php on the line that looks like this:

$response->send();

Next step, refresh your browser on the page you want to know the route name for, and hopefully trigger your breakpoint. Then you click on the icon for "evaluate expression". On my work computer this has the shortcut key alt-f8, but you can also find it in the debugger toolbar, or via the menu (Run -> Evaluate expression).

Then evaluate the following code:

\Drupal::routeMatch()->getRouteName()

That should give you the name of the route. As illustrated below in a gif:

Find route name with any development enviroment.

Now, I realize that not everyone uses PHPStorm, so here is one solution that should work without having xdebug and an IDE set up:

Following the same tactic as above, let's open up index.php again. Now, just change the following code:

$response = $kernel->handle($request); +print_r(\Drupal::routeMatch()->getRouteName()); $response->send();

The difference here is adding the line with print_r.

Now visit the page you want to know the route name for. This will print the name of the route as the very first output of your Drupal site. Since you probably do not want this for your live Drupal site, this is best done on a development copy.

Other options

You can also use the module webprofiler which is a part of the devel module. This may or may not invlove more steps than necessary, depending on your project. But to be fair, that is also an option.

To finish off, here is an animated gif in the category "route". Let me know your tips and tricks in the comments!

If we do not have (yet) a contributed module (commerce_stock should be available soon), Drupal Commerce 2 already has an API to set up an simple inventory control, with the Availability Manager service. Let's look at how to set up a very simple stock control, based on a field (for example field_stock) that has been added on a product.

When Drupalgeddon 2 (SA-CORE-2018-002) happened a few weeks back, we saw plenty of buzz from agencies and other organizations throughout the community who were having patching parties.

Yay for patching! But were you left vulnerable by not updating all of your installations?

If you didn’t update development and staging sites, you may be at risk!

Due to the nature of the vulnerability, from the largest of enterprise applications to the smallest of brochure or hobbyist site builds, all Drupal sites were affected. This includes any testing or staging versions of your site. Depending on how you manage your local development sites, even those may have been exposed too!

Still not convinced? Read more to find out why you need to update ALL sites!

We're counting down the days to the official SooperThemes Drupal 8 Release! Count with us as we will be writing a Drupal 8 related blog post every day for the next 8 days.

Drupal 8 web forms and drag and drop forms video tutorial

view on sooperthemes.com if you can't see the video

This tutorial is aimed at people who just need a contact form or some other kind of user input form. We'll cover deciding between the core contact module and the popular webform module. We won't cover using the Drupal API to program complex forms that integrate with external applications.

Drupal 8 Core Contact Module

Whereas the Drupal 7 core contact module was not very useful due to a total lack of flexibility, the Drupal 8 version is much nicer. It's nicer because you can add fields to it. You're no longer limited to just the name, email, subject and message fields that were baked into the Drupal 7 version. 

Not only does the new contact form allow for custom text fields, it even supports file uploads, entity references, date fields, and other Field API fields.This simple yet powerful form builder module is not limited to just contact forms; you can use it to create questionnaires, gather user feedback, etc.  

Drupal 8 Contact module customized form

Better Together: Contact Module + Contact Storage Module

One major inconvenience of the Contact module is that is doesn't store any messages that are sent. Your only option is to send the message via email and afterwards there is no copy of the message in your Drupal site. The contact storage module will store your messages as entities. It lets you administer the messages and provides integration with the views module. Since the messages are stored as Drupal entities you also gain interoperability with other modules in the Drupal ecosystem. This will allow you to do even more, for example exporting messages as CSV, searching messages, and pushing messages to your CRM.

Webform Module

Drupal's popular webform module is a massive framework that offers a ton of extra options that the contact module doesn't have. You should choose the webform module if these extra features are useful to you and you're prepared to learn the ropes around a more complex user interface. The webform module can be intimidating at first because there are so many elements and settings... but once you're familiar with the interface you can configure and design very powerful forms fairly easily. 

To see what the webform module offers it's really better for me to show than tell. Check out the youtube video above where I show you the interface of the webform module.

Drupal 8 Webform module form using the flexbox layout option

Contact Module vs Webform Module

Personally I choose the webform module for anything that is more complicated than just the standard contact form with a subject and message field. The contact module is powerful and extendable, but the webform module gives you everything you need in one place. It's a purpose-built single-purpose application within Drupal and once you get familiar with it it's really very powerful. 

It also lets met build multi-column form layouts, a feature that I use often.

A feature-base comparison of Contact and Module based on features that I think are important: Feature
  • Multi-column layouts
  • Control labels and placeholders
  • Control Submit Button Text
  • Route email with form options
  • Search in submissions
  • Export submissions
Contact
  • ✔ (can't remove Preview)
  • ✔ (needs additional modules)
  • ✔ (needs additional modules)
Webform
Placing Drupal 8 Forms With Our Visual Page Builder

We believe interoperability with the Drupal ecosystem is important for Glazed Builder. This is why we don't include a proprietary form builder in Glazed Builder and instead encourage you to create forms with Drupal's webform module. Currently Glazed Builder let's you place blocks created with the webform module anywhere in your drag and drop page. The contact module doesn't provide blocks that we can drag and drop natively, but you can install the contact_block module to fix that.

Over the last couple years, organizations have been coming to us with a new problem. Instead of needing a single website, they need dozens, if not hundreds. They might be large universities with many departments, an association with independent franchises nationwide, or a real estate developer with offerings all over the world. Often, these organizations already have several websites supported by different vendors and technologies. They’ve become frustrated with the overhead of maintaining Drupal sites built by one vendor and Wordpress sites by another. Not to mention the cost of building new websites with a consistent look and feel.

While the details may vary, the broad ask is the same. How can we consolidate various websites onto a single platform that can be spun up quickly (preferably without developer involvement) and update and maintain these en masse, while maintaining enough structure for consistency and flexibility for customization. Essentially, they want to have their cake and would also like to eat it.

Over this series of posts, we’ll break down the various parts of this solution. We’ll first look at Pantheon’s hosting solution, and how its infrastructure is set up perfectly to give clients the autonomy they want. Then we’ll look at the command line tools that exist for developers to easily manage updates to dozens (if not hundreds) of websites. Lastly, we’ll look at the websites themselves and how Drupal 8 was leveraged to provide flexible website instances with structured limits.

Pantheon and Upstreams

Pantheon is a hosting solution designed specifically for Drupal and Wordpress websites. For individual sites they offer a lot of features, however the ones we’re most interested in are single click installations of a new website and single click updates to the code base. Using a feature called Upstreams, users can create fresh installs of Drupal 7, Drupal 8, or Wordpress that all reference a canonical codebase. When new code is pushed to any of those Upstreams, any site installed from it gets notified of the new code, which can be pulled into the instance with the click of a button.

Outside of the default options Pantheon maintains internally, developers can also build their own Custom Upstreams for website creation. Anyone with access to the Upstream can log into Pantheon and click a button to install a new website based on that codebase. In short this codebase will handle installing all of the features every website should have, establish any default content necessary, and be used to roll out new features to the entire platform. This setup allows non-technical users to easily create new websites for their various properties, and then handoff specific websites to their appropriate property managers for editing. We’ll go over more specifics of this codebase in a later post.

Since a developer is no longer required for the creation of individual sites, this frees up a lot of time (and budget) for building new features or keeping on top of maintenance. The process for rolling out updates is simple: the developer writes code for a new feature and pushes it to the upstream repository. Once pushed, every site connected to this upstream will get an alert about new features and a shiny button that pulls them in with a single click.

Pantheon and Organizations

At this point it’s worth mentioning that custom upstreams are a feature of a special account type called an Organization. An organization is used to group multiple websites, users, and Custom Upstreams under one umbrella. Organizations also come with additional features like free HTTPS and code monitoring services. It’s recommended that each organization signup with their own organization account, rather than use one tied to their development partner. This gives them full control over who can create new websites using their Custom Upstream, who can manage all their websites, and who can only access specific websites.

Organization accounts and Custom Upstreams go a long way in helping organizations reduce the overhead they may have from managing several properties simultaneously. Having the option to create an infinite number of websites in-house helps reduce the cost of growth. Having every website using the same codebase means new features can easily be rolled out to the entire platform and security vulnerabilities can be handled quickly.

The only downside with this approach is updates are generally applied one site at a time. The developer can push the code to the Custom Upstream, but it’s necessary to log into every website and click the button to update that site. For a handful of sites, this might be manageable. For dozens to hundreds, this problem becomes tedious. In the next post we’ll look at some of the scripted solutions Pantheon has for applying and managing an ever growing number of websites at once.

CCBot/2.0 (http://commoncrawl.org/faq/)

آخرین ارسال ها

محتواهای محبوب

درباره ما

Author
اینجا دروپال یعنی همه چیز. در مورد دروپال صحبت میکنیم. ماژول هامون رو به اشتراک میزاریم در مورد قالب دروپال ، فروشگاه دروپال، دروپال فارسی و تاریخ شمسی دروپال صحبت میکنیم و هرچیزی که در مورد طراحی سایت با دروپال میدونیم به هم انتقال میدیم. دروپالیون یک سایت شخصی نیست. ما دست همه کسانی که برای پیشرفت دروپال تلاش میکنند رو میفشاریم و با آغوش باز اونها رو در این سایت میپذیریم.

تماس با ما

با ما تماس بگیرید.

logo-samandehi