All RPGs and Storygames by Tod Foley are now available at DrivethruRPG and RPGnow. Bring these games to your table!
Is this something you might like to do on your modules? Read on for more information.by Lee Rowlands / 19 January 2018 What is churn
As Matthias details in his blog post - churn is a measure of the number of times a piece of code has been changed over time. The red flags start to crop up when you have high complexity and high churn.Enter churn-php
Churn php is a library that analyses PHP code that has its history in git to identify high churn/complexity scores.
You can either install it with composer require bmitch/churn-php --dev or run it using docker docker run --rm -ti -v $PWD:/app dockerizedphp/churn run /path/to/codeSome results from core
So I ran it for some modules I look after in core, as well as the Drupal\Core\Entity namespace.Block Content File Times Changed Complexity Score core/modules/block_content/src/Entity/BlockContent.php 41 6 1 core/modules/block_content/src/BlockContentForm.php 32 6 0.78 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php 20 6 0.488 core/modules/block_content/src/Tests/BlockContentTestBase.php 16 6 0.39 core/modules/block_content/src/BlockContentTypeForm.php 18 4 0.347 core/modules/block_content/src/Controller/BlockContentController.php 8 6 0.195 Comment File Times Changed Complexity Score core/modules/comment/src/CommentForm.php 60 45 1 core/modules/comment/src/Entity/Comment.php 55 25 0.548 core/modules/comment/src/Tests/CommentTestBase.php 33 29 0.426 core/modules/comment/src/Controller/CommentController.php 32 20 0.274 core/modules/comment/src/CommentViewBuilder.php 37 16 0.25 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php 32 18 0.24 core/modules/comment/src/Form/CommentAdminOverview.php 29 17 0.191 core/modules/comment/src/CommentAccessControlHandler.php 17 28 0.19 core/modules/comment/src/CommentLinkBuilder.php 15 29 0.17 core/modules/comment/src/CommentManager.php 29 15 0.157 Drupal\Core\Entity File Times Changed Complexity Score core/lib/Drupal/Core/Entity/ContentEntityBase.php 115 173 0.808 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php 61 196 0.465 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php 56 203 0.427 core/lib/Drupal/Core/Entity/Entity.php 131 43 0.212 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php 41 105 0.16 Conclusion
So, what to do with these results?
Well I think if you're looking to simplify your code-base and identify places that would warrant refactoring, those with a high 'churn' score would be a good place to start.
What do you think? Let us know in the comments.Tagged Drupal Core, Code Complexity, Drupal 8
During the redesign process of a website, there are many small changes that can ultimately affect the traffic of the new site. The key is to identify any changes that might break SEO, or changes that might affect the way the site looks to search engine spiders ahead of time to avoid traffic drops. In the end, we want the site to look fresh and new while still getting the same traffic, or more, as the old design.
At Zivtech, we look at many factors in the planning phase of a website redesign project and try to identify those that could cause drops in traffic after the new design is launched. Once these have been identified, we ensure all of these tasks have been completed before launch. Let’s take a look at some of these factors and how to avoid traffic drops on your next website redesign project.Meta Tags
We typically build sites with Drupal, so the Metatag module handles much of the meta tag configuration and display on the site. If you aren’t using Drupal though, there could be some changes to your front-end design that could affect your meta tags and confuse search engine spiders. You’ll need to make sure that all of your pages have meta tags and that there aren’t any duplicates.Broken Links
Broken links are a huge problem during website redesigns. This could be a result of changes in the menu structure or in path structures for content types. Broken links mean that users and search engines can’t find the pages they’re looking for, which can really wreak havoc on your site traffic statistics.Read more
In my last post, we discussed why marketers might want to migrate their content to Drupal 8, and the strategy and planning required to get started. The spreadsheet we shared with you in that post is the foundation of a good migration, and it usually takes a couple sprints of research, discussion, and documentation to compile. It’s also a process that’s applicable to all migration of content, no matter the source or destination framework.
This allows you to display a modal after contact form's submission.
It will display a resume of what the user send.
This module requires the following modules:
Under certain circumstances, it might be necessary to build a specific version of Lightning with dependencies exactly as they were when it was released. But sometimes building older versions of Lightning can be problematic. For example, maybe a new dependency conflicts with an old one, or a patch no longer applies with an updated dependency.
In that case, you can use the new "Lightning Strict" package to pin all of Lightning's dependencies (and their dependencies recursively) to the specific versions that were included in Lightning's composer.lock file when it was released. (If this sounds familiar, a "Drupal Core Strict" package also exists that does the same thing for core. But note that package is incompatible with Lightning Strict since Lightning uses PHP 7.0 when building its lock file.)
In this example, we want to build Lightning 2.2.4 - which contains the migration to Content Moderation, Workflows, and Lightning Scheduler:$ composer require acquia/lightning:2.2.4 balsama/lightning_strict:2.2.4 --no-update $ composer update
Assuming you were updating from Lightning 2.2.3, you could then follow the update instructions for 2.2.4 found in our release notes. In this case, they are:$ drush updatedb && drush cache-rebuild $ drupal update:lightning --since=2.2.3
Once you've updated to the most recent version, you can remove the dependency on balsama/lightning_strict.
The package will automatically be updated when new versions of Lightning are released. Hopefully this will solve some of the problems people have experienced when trying to build older version of Lightning.
One of the things we do on an annual basis for our clients at Advomatic is an annual site audit – a high level kick-the-tires kind of site inspection. For Drupal sites, we check the logs for any glaring errors, check for overrides in Features, run some SEO and accessibility testing, and, of course, take it... Read more »
Leads capture module webform form submittions capture action service.
This module acts as an interface of PIVOTREV.com. PIVOTREV is a cloud based, online centralized review and rating system for real consumers community portal with a new way of product reviews to find out what real users are saying about your products or services you want to sale.
The Allowed Languages makes it possible to set restrictions on which content a user can edit based on language.
This modules was meant to clean up the toolbar, so you can use it to provide admin toolbars for your different roles.
Specifically, it is a great companion with toolbar_menu
Encrpt and Decrypt text in the URL's, In general, while Anonymous user's are given access to make some DB operations via UI, then important thing to make sure is its not hackable.. For this to make sure, minimum thing to do is encrypt the piece of text for the end user and decrypt back piece of text while doing the backend operation..heykarthikwithu Thursday, 18 January 2018 - 18:19:35 IST
This project/module helps to bulk import the nodes. Once you enable this module, you can start importing the nodes based on each content type.
The menu link can be found in "admin/structure". After this module is enabled, you will get the list of content types that are present in your site. Once you select the content type, all the fields listed in that content type will be displayed in the table format. Here, we are using nid as the identifier/primary key to bulk import nodes. Recommended file format is UTF-8 file format and of CSV file type.
Do you remember the awesome module Bibliography and Citation for Drupal 8? It allows keeping, outputting, exporting and importing bibliographic data.
Our web development team ADCI Solutions has come up with the addition - the Bibliography and Citation - Altmetric module.
Module which dispatches events for entity create, update, delete.
Provides abstract classes for event listeners for you to extend in your own modules to 'do stuff' on entity operations. Can use as a replacement for hook_entity_[update/insert/delete] from within your module file.
Abstract classes:EntityEventInsertSubscriber EntityEventUpdateSubscriber EntityEventDeleteSubscriber
Extend these classes with your own module subscribers.
One of the great things about Drupal, is that it's possible to build a pretty advanced site just by pointing and clicking and configuring things - what we call "site building" in the Drupal universe.
But with all that power, you can also make your Drupal site less secure - and possible to hack! - just by changing configuration settings! We covered other examples of this in a previous article.
Today we're going to talk about one of the most common... and most DANGEROUS: exposing your Drupal private files on the internet.
In this article we're going to discuss how to determine if your private files have been exposed, and also how to fix it.
Read more to find out!
We're Drupalers who only recently started digging deep into CiviCRM and we're finding some really cool things! This series of videos is meant to share those secrets with other Drupalers, in case they come across a project that could use them. :-)
You may recall the blog post that David put out way back in August 2017. He gave some very detailed instructions on how you can install CiviCRM on Drupal 8!
We have some new Drupal versions released since August, and we've had some requests to demonstrate how to go through some of the steps. So, I'm going to do just that!
Every step will be followed quite literally. Note that David assumed this was being installed on a development system running Linux. Since I'm running a Mac, this should be a great cross-platform test.
Watch the screencast to see if I run into any issues with the instructions:Video of CiviCRM secrets for Drupalers: Screencast of Drupal 8 + CiviCRM Installation
Some highlights from the video:
- Very quick install of Drupal 8 on a Mac running MAMP
- Download and installation of CiviCRM
- Brief comments along the way as I follow the steps
- Finish with a working Drupal 8 + CiviCRM site!
Please leave a comment below!