MidCamp - Midwest Drupal Camp: Get your session in now...

Get your session in now...

Call for Speakers

We’ve had 30+ sessions submitted already and we’d love to add your words to that number. We’re looking for talks geared toward beginner through advanced Drupal users, as well as end users and business owners. Please see our session tracks page for full descriptions of the kinds of talks we are looking for. Listen to the recording of our Speaker Workshop for some ideas.

Submit a session now!

Important Dates:

  • Proposal Deadline: January 25 (Wednesday), 2023 at midnight CST

  • Tickets on sale: very soon! Keep an eye out.

  • Early-bird deadline and speakers announced: early February (all speakers are eligible for a free ticket, and anyone who submits a session that is not accepted will be eligible for early-bird pricing even after it closes)

Sponsors Get Early, Privileged Access

Get early and privileged access to new talent and customers by sponsoring MidCamp. We have a variety of sponsorship packages available.

Starting at $600, sponsoring organizations can target their jobs to a select group of experienced Drupal talent, maximize exposure by sharing space with dozens of jobs instead of millions, and have three days of being face-to-face with applicants.

Because sponsors make MidCamp possible, we want to return the favor by helping your organization grow within the community and save you time.

Find the right sponsorship for you!

Stay In The Loop

Join the MidCamp Slack and come hang out with the community online. We will be making announcements there from time to time. We’re also on Twitter and Mastodon.

Keep an eye on this space, we will be releasing more blog posts with venue details, hotel and travel options, fun social events, speaker announcements and more! Our preliminary schedule is up now.

We can’t wait to see you soon! Don’t forget, cancel all those other plans and make MidCamp the only thing happening on your calendar from April 26-28, 2023. 😀

Greg Boggs: Get Involved: Ways to Contribute to Drupal, No Experience Required

There are many ways to contribute to an open source project like Drupal, and not all of them require a deep understanding of programming or web development. Some examples of ways to contribute include:

How to Contribute to Drupal - Ways for Everyone to Get Involved

  1. Testing and reporting bugs: This can be done by looking through the issue queue on Easy Breadcrumb and look for issues that are marked “Needs Review”.

  2. Documentation: Writing and improving documentation is a valuable way to help others learn and use Drupal.

  3. Translation: Helping to translate the interface and documentation of Drupal into diffrent languages.

  4. Support: Answering questions on forums and providing assistance to others in the community.

  5. Design and User Experience: Helping to improve the look and feel of Drupal, and making it more user-friendly.

  6. Marketing and outreach: Helping to promote Drupal and increase its visibility.

  7. Code contributions: If you do have the skills, contributing code is a graet way to help improve Drupal and add new features. Swap the “Needs Review” filter to “Needs Work” and pick a task!

Drupal Contributor Resources

So, anyone can contribute to Drupal community, regardless of their technical skills. To get started with contributing to Drupal, there are a few resources that can be helpful: - Drupal Best Practices is a series of best practice posts that will help you get better at site building. - The Drupal community is a great place to connect with other developers and contributors. You can find information on upcoming events, join groups, and participate in discussions. - The Drupal issue queue is where you can find bugs and feature requests that need to be addressed. You can start by looking for issues that are labeled “novice” or “mentored” to find tasks that are well-suited for new contributors. - The Drupal documentation is a good resource for learning about the platform and its various components. - The Drupal handbook is a great resource for understanding the process of contributing to Drupal, including information on coding standards and best practices. - The Drupal Maintainers Slack channel is a great place to ask for help and connect with other developers, especially #maintainer channel which is for project maintainers and developers to discuss on how to maintain modules.

Centarro: Custom Order Number Patterns in Drupal Commerce

Drupal Commerce differentiates between the serial numeric ID assigned to an order by the database on save and the order number used to formally identify a placed order. Orders typically start as "drafts" (as in the case of shopping carts) and are assigned an order number when placed (as when a customer completes checkout).

In Commerce 1.x, the order number defaulted to the order ID. This created confusing order number sequences in admin listings when carts were checked out long after they were created or when they were abandoned. Businesses that required sequential order numbers without gaps needed custom code to make it happen.

Thanks to the Number Pattern module we added in Commerce 2.x, site builders have much greater control over order number generation via configuration alone. Number Pattern is used to generate order numbers and invoice numbers (via Commerce Invoice), and it is available for other contributed modules to use as well.

See selection here in the order type edit form:

Read more

Golems GABB: Layout builder toolset. Must have contrib modules for better layout control

Layout builder toolset. Must have contrib modules for better layout control Editor Tue, 01/24/2023 - 11:42

Dries Buytaert once wrote:

"...it can work with structured and unstructured content, and with templated and free-form pages."

One might call it primitive, but those who master it will be delighted with it because it is the basis. Hello friends! Today our focus is on Drupal Layout Builder. This is a nifty tool that all marketers and developers need.
Layout Builder is the best Drupal responsive web design tool for today. Drupal already has it at its core! That's awesome! Using Layout Builder in Drupal 8 or 9, you can add/remove sections to customize your pages following your requirements and display content using different layouts.

Matt Glaman: Leveraging the list cache tag for entity types

Recently I wrote about launching my wife's web store for her holiday cookie orders. During the launch, I had a little hiccup. The homepage controller has code to display the available published products. When it came time, I published the products, and... the homepage stayed the same. I was confused. I wrote the code and knew it was collecting cacheable metadata. It should have been updated once changes happened to the products. So, I did what all Drupalists do when things don't work as expected: clear the cache. Then I needed to figure out why this didn't work so that the homepage would be updated once we unpublished the products.

Specbee: How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website

How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website Akshay Devadiga 24 Jan, 2023 Subscribe to our Newsletter Now Subscribe Leave this field blank

Git has been a reliable version control tool for a large number of closed and open-source projects. With Drupal being an extremely collaborative open-source content management framework, a trackable, transparent, and distributed version control system like Git is a perfect fit. Git replaced a long-time version control partner – CVS – in early 2011 and became every Drupal developer and contributor’s favorite tool for its security, distributed nature, agile workflow, and of course, being open source!

If you’re a Drupal developer, you should be familiar with patches already. Patches are like band-aids. They are small pieces of code that are added on top of already existing code files to support it or fix any issues. Different types of patches include bug fixes, security vulnerability fixes, performance enhancements, styling fixes, etc. If you are a regular contributor to the Drupal project, you should know that to fix an issue in Drupal core or contributed modules, you must submit a patch to an issue in the issues queue. These patches are then examined and tested by the module maintainer and applied if found beneficial.

This is a revised version of the article. We’d like to thank Anktiha Shetty and Pratik Kadambari for all their great inputs! 

Image removed.


There are different ways to apply a Git patch. Let’s learn more about various Git Diff commands and how to create/apply a patch with the help of Git diff and Git apply. We will assume that you have already cloned/obtained a copy of the project in your local repository and have pulled the latest changes so you’re not working on an older version of the project. Take a look at some Github best practices here.

What does the Git Diff command do? 

Git diff is a command to output the changes between two sources inside the Git repository. The data sources can be two different branches, commits, files, etc.

The common use cases of git diff commands are listed below.

•    $ git diff 

This command will output all the modified changes which are not added to git or staged.

Image removed.


•    $ git diff filename

This will output the changes of that current file to its previous committed state.

Image removed.


•    $ git diff branch_name

This will output the modifications of the current branch to the mentioned branch to its previous committed state.

Image removed.


•    $ git diff --staged (or --cached) path/to/file

Once the changes are added to Git or moved to staging, you will not be able to see the diff of the files. To see the staged changes, you can use diff with --staged or --cached option.

Image removed.

 

•    $ git diff HEAD

To see the changes from both staged and unstaged changes (not untracked files) together, you can use the git diff HEAD command. If you have all changes staged for commit, then both commands i.e., --staged/–-cached and HEAD will output the same.

 

Image removed.

 

Image removed.

 

•    $ git diff commit_id1 commit_id2

To see the difference between any two commits you can use this git diff command where you need to mention the two commit ids.

Image removed.


If you want to see the list of commits made in the Git repo, use the command $ git log. This will list out all the commits (starting from the latest commit) along with their respective commit ids, the author (developer) and the date it was committed on.

Creating a Git patch with git diff

To create a Git patch, we can use any of the git diff commands to get the changes. We then need to save the changes to a file which can be used as below.
 

•    $ git diff > my_custom_patch_file.patch

 

Image removed.

 

Image removed.

 

Image removed.

Apply the Git Patch 

Drupal developers will want to apply Git patches frequently to update changes or to fix bugs. Developers will create a patch file that can be used by other developers according to their needs. To apply a git patch to the current branch use the following command.

•    $ git apply patch_file.patch 

 

Image removed.

 

Try the above command with the -v or --verbose option. It will cause additional information about the current patch being applied to be reported (as shown below).

 

Image removed.

Other useful Git patch apply conditions:

1. Working with trailing white spaces

Use --whitespace option to handle such situations.

Here the patch is created accidentally with trailing whitespaces (as shown below).

Image removed.

 

If the patch is applied as is: $git apply patch_file.patch
The patch will be applied (with whitespace warnings) and will still retain the whitespaces which can cause linting errors.

To fix trailing whitespaces while applying the patch, use the option --whitespace=fix, the patch will be applied, and trailing whitespaces will be removed.

Usage: $git apply --whitespace=fix patch_file.patch

2. Checking the patch before applying

To check before applying the patch, use option --check
The command will show no warnings and errors if the patch is applied cleanly.

Image removed.

 

Image removed.

 

3. To see file statistics before applying the patch

Use --stat option with the git apply command. It will list all files which will be changed upon applying the patch.

Image removed.

 

The patch will only show information, and will not be applied. 
To apply patch along with “stat” options add option --apply in command.

Usage: $git apply --stat --apply patch_file.patch

4. To apply only changes that are getting removed

Use Option --no-add with git apply.

For example:

Image removed.

 

Here only changes in red will be applied and green will be excluded.

Usage: $git apply --no-add patch_file.patch

 

Image removed.

 

5. Exclude and include the patch to be applied to selected files

Use --exclude option to exclude files from applying patch change.
    
$git apply --exclude=file_name.ext patch_file.patch 
    
Changes on other files, excluding mentioned file, will be reflected.

Vice versa: 

$git apply --include=file_name.ext patch_file.patch 

Changes only on the mentioned file will be reflected.

There might be a situation when the developer does not have write access to the project but still wants to suggest a change or fix a bug. The best way to go around that is to create a patch file. And because patches are additions to the code, testing and reviewing them is easy. This brief guide aims at helping Drupal developers get more familiar with git diff and git apply commands to be able to efficiently create and apply Git patches as needed. Contact us to know more about how we can help you with your next Drupal website.

Drupal Planet Drupal Tutorial Drupal Development Drupal

Leave us a Comment

 

Recent Blogs

Image Image removed.

How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website

Image Image removed.

Installing Drupal 9 on Windows Subsystem for Linux from Scratch

Image Image removed.

How to Integrate Drupal 9 with Bitly for URL Shortening

Want to extract the maximum out of Drupal? TALK TO US

Featured Success Stories

Image removed.

Upgrading and consolidating multiple web properties to offer a coherent digital experience for Physicians Insurance

Image removed.

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Image removed.

Great Southern Homes, one of the fastest growing home builders in the United States, sees greater results with Drupal 9

View all Case Studies

Talking Drupal: Talking Drupal #383 - Programming the Physical World

Today we are talking about Programming the Physical World with Stephen Cross.

For show notes visit: www.talkingDrupal.com/383

Topics
  • What is meant by Programming in the Physical World
  • How do people interact
  • How are we focusing today’s topic
  • What is a Microcontroller
  • What would you not use a microcontroller for
  • How do they get programmed and what language
  • How do you contain the device
  • Do you need to solder
  • How does this relate to Drupal
  • What have you used it for in the past
  • Where should I get started
Resources Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Stephen Cross - www.StephenCross.com @stephencross

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Alexa Currently provides only a basic integration, for a developer to create a customized handler module to implement the specific functionality they need. An alexa_demo submodule provides a reference.