Skip to main content

Blog

Drutopia Features

Actions

An action is a call for concrete work from supporters. It can stand on its own or be part of a campaign. It can have a goal and due date set. For example, a call for 50 people to call a prison by June 13th demanding an investigation into prisoner abuse. An action can also be turned into a fundraiser, allowing people to donate directly to the site through Stripe. No longer will groups be dependent on proprietary platforms such as GoFundMe and IndieGoGo.

Articles

Drutopia provides an article content type and related configuration, including article types (such as "Victories" or "Press releases") and topics which span all kinds of content on the site (such as "Tenant organizing" or "Environmental racism").

Blog Posts

Drutopia provides the blog content type and related configuration, ideal for giving individuals or groups more informal voices distinct from the organization as a whole.

Campaigns

A campaign page is a central place to explain an issue, publish updates about its activity, list out demands, post calls to action, and raise funds.

Groups

  • Groups broadcast to supporters their activity and ways to support.
  • Each group has a page within the website. A group can launch a campaign, call for an action and publish a news article.
  • All of these pieces of content are displayed on a group's page, creating a mini-site.

Profile Pages

Drutopia provides a People content type for showing visitors information about staff, volunteers, contributors, and more.

The Drutopia Initiative

The Drutopia initiative lays out a technique for configuring a Drupal distribution, for the commons.  It is a recognition and a reflection in software architecture that liberation requires organizing and collective action. We ask you not to sit back and let Drutopia work its magic, but rather to stand up and, with us, build a cooperative of grassroots organizations that work together to build tools that we can own together.

Core values of the Drutopia initiative:

  • Be inclusive regarding gender, gender identity, sexual orientation, ethnicity, ability, age, religion, geography, and class.
  • Commit to protection of personal information and privacy and freedom from surveillance
  • Value collaboration and cooperation above competition
  • Prioritize human needs over private profit
  • Foster non-hierarchical structures and collective decision-making

Drutopia encourages:

  • Users and adopters to pool their resources and take a lead role in prioritizing and crowdfunding new development
  • Designers, site builders, and developers to focus on rolling their work into shared solutions available to everyone, heightening the ability of groups of all stripes and sizes to benefit.

Strategy - Shared Configuration Management

Drutopia focuses on a specific use case for websites — grass-roots organizing — and pioneers an elegant model for reducing the costs of maintaining an individual Drupal site by providing a shared base configuration for a collection of websites that are run by various organizations with similar needs that contribute to the development cooperatively.

Learn more specifics about the cooperative development strategy behind Drutopia by reading the Drutopia White Paper.

Drutopia as a LibreSaaS or Platform Cooperative

We believe that the platforms that influence and affect so much of our lives (think Facebook and Google) should be owned by the people who use them. In the same line of thinking, the potential of the Drutopia configuration framework is truly unleashed as fully hosted, member-owned platforms. Members of the platform cooperatives will drive forward the vision of the project from the perspective of those most affected– shaping the development of new features. The platforms themselves can span multiple participating hosts that endorse and follow the hosted Drutopia standards.

Contribute to the Drutopia Initiative

Drutopia is a fully functional content management system apart from all these goals, and there are a few ways different individuals and organizations can contribute to this initiative:

1) Drutopia as a Drupal distribution that can be self-hosted by anyone, but the software project will be democratically governed by members of the Drutopia cooperative. For as little as $10 a year you can become a member who votes in leadership team elections, suggests features for the development roadmap, and is part of a community that is building tools for the grassroots.

2) Non-profits and other organizations that pay Chocolate Lilly or Agaric to build a Drutopia website for their organizing will be contributing to our development efforts, and helping us to move forward in attaining the goals of the Drutopia initiative.

3) Individuals and groups that recognize needs for specialized Drupal distributions should talk to us. We encourage you to reach out and bring together others that share the same needs, so that we can collectivize the development and maintenance of more Drutopia distributions. 

Cooperative Webhosting

Staying true to the core values of Drutopia, we hosting your site through, and include membership in, democratically governed May First Movement Technology cooperative.  May First is dedicated to supporting organizers and activists by providing tools and services that protect their data and privacy from governments and corporations.

Overview

  • Basic principles
    • COPE (Create Once, Publish Everywhere)
    • POSSE (Publish Once on your own Site, Syndicate Elsewhere)
    • Own your content and be in control of where it lives, and link back to your site as the canonical URL.
  • Development objectives
    • Away to automate posting that did not require being on the content edit form page.
    • Posting able to happen at the same time as publishing (especially for the use case of scheduled publishing of content on cron).
    • Wanted a relational architecture that incorporated a microblog node that could be edited inline on the content (such as article) edit form.
    • Easy to configure (on the Drupal side, at least!)
  • MPOSSE introduction
    • Has plugin status dashboard.
    • Can pause (soft disable) automated microblogging.
    • Posts are queued for asynchronous processing (not blocking your page save while potentially several API 
    • Option to delay posting to social media, say for five minutes until last published (each edit restarts the timer)
  • MPOSSE installation and setup
  • Environment management
    • Use environment configuration overrides to prevent posting to social media from test and local development sites, with either the soft disable feature and/or by preventing copying the social post table from live database during SQL sync.
  • ECA alternative approach
    • Event - Condition - Action module can be an alternative to MPOSSE; create custom microblogging workflows without writing code.

Since 1997 MIT's Cultura has brought students from two different parts of the world together in a series of online exchanges which help each group understand the other's culture. Students respond anonymously to thought-provoking prompts in their own languages and then discuss their classes' pair of responses bilingually.

Created by a French language class at MIT as an exchange between American students and French students, the project grew to include more than 30 schools and eight languages. A pioneer in international collaborative learning, Cultura also pioneered sharing the learning online.

Unfortunately, by 2014, most of Cultura's 18 years worth of archives were no longer online. To get them back on the web, Agaric used the Migrate module to bring their collection of HTML files into Drupal. A common approach for migrating from a list of files, each file representing what will become a node in Drupal, is to use MigrateSourceList as a source. It needs an instance of MigrateList and an instance of MigrateItem representing the collection and the individual entity.

The Migrate module provides the class MigrateItemXml for importing content from XML files, but our input happens to be HTML from the late 1990s and early 2000s. Luckily libxml which powers PHP XML support can also deal with HTML. Hence it does not require a lot of work to create a subclass of MigrateItemXml that can work with HTML files. The only method we needed to override is MigrateItemXml::loadXmlUrl which is expected to return an instance of SimpleXMLElement.

class MigrateItemHTML extends MigrateItemXML {
  protected function loadXmlUrl($item_url) {
    $dom = new DOMDocument();
    $dom->loadHTMLFile($item_url);
    return simplexml_import_dom($dom);
  }
}

This class can now be used to set up the source of a migration:

abstract class CulturaMigration extends XMLMigration {
  public function __construct($arguments) {
    // ...
    $base_dir = DRUPAL_ROOT . '/../archives';
    $directories = array(
      "$base_dir/{$arguments['directory']}",
    );
    $file_mask = '/(.*\.htm$|.*\.html$)/i';
    $list = new MigrateListFiles($directories, $base_dir, $file_mask);
    $item = new MigrateItemHtml($base_dir . ':id');
    $this->source = new MigrateSourceList($list, $item);
    // ...
  }
  // ...
}

Through the archives we can learn many interesting things, such as that some students at MIT literally don't know the meaning of solidarity.

"Wirth Co-op won't reopen", a tiny heading on the front page of North News announced. The story ran inside on page four.

The grocery store, right in my neighborhood, set out to build community wealth and provide healthy food in north Minneapolis. The loss of its promise is crushing.

Wirth Grocery's failure to act as a cooperative—with its own existence at stake—is even more upsetting. Cooperatives are one of the few spaces where people have a chance to take collective control of something that matters to them.

One epic month of blog post tutorials about migrating into Drupal 8 and 9 by Mauricio who also is the driving force behind Agaric's migration trainings and Agaric's upgrade services.

One man.  One month.  Many migrations.

Hear from us

Keegan is a Web Developer, focused mostly on building sites using Drupal and/or front-end JavaScript frameworks (like React.js), and is also a Drupal core contributor.

Keegan's longest-lived hobbies are being in nature, sonic-doodling, and studying the history and philosophy of science and technology. Having a degree in Environmental Science and Technology, Keegan learned early that there is no deficiency in the capabilities of modern technology to create a more equitable and sustainable global infrastructure, but a lack of funding. Hence, Keegan believes that the future of societal health depends on collective efforts to provision and employ information and communications infrastructure that is owned and controlled by the people who use it—not by the full-fledged military contractors that big tech comprises—so that love, democracy, community, and eco-friendly infrastructure can thrive.

Keegan is inspired, as a worker-owner of a tech coop, to have recognized the practical benefits of Libre software and of the cooperative model toward the respective protection and cultivation of attentional liberation, and is always beyond delighted to hear whenever someone else has made the same or similar discoveries. Most of all, Keegan is humbled to be immersed in a positive work-culture that emphasizes action-oriented ethical practices, and to be surrounded day-to-day by brilliant friends and mentors.

Respecting your privacy and being responsible with the data we collect from you is of the utmost importance to us.  We will not use or share your information with anyone except as described in this privacy policy.

Information collection and use

If you choose to leave a comment or a private message through our contact form, we may require you to provide us with certain personally identifiable information, including your name and email address. The information that we collect will be used to contact or identify you.

Log data

We want to inform you that whenever you visit our Service, we collect information that your browser sends to us that is called Log Data. This Log Data may include information such as your computer's Internet Protocol (“IP”) address, browser version, pages of our Service that you visit, the time and date of your visit, the time spent on those pages, and other statistics.

Cookies

We do not use cookies for visitors to our site. (Cookies are files with small amount of data that is commonly used as an anonymous unique identifier.)

Service providers

We employ a third-party company, Google, to assist us in analyzing how our website is used. Only anonymized data is collected.

Hotjar assists its us in providing our end users with a better experience and service as well as assist us in diagnosing technical problems and analyzing user trends. Most importantly, through Hotjar’s services, the functionality of the site can be improved, making them more user-friendly, more valuable, and simpler to use for the end users.

You may opt-out from having Hotjar collect your information when visiting a Hotjar Enabled Site at any time by visiting our Opt-out page and clicking ‘Disable Hotjar’ or enabling Do Not Track (DNT) in your browser.

Changes to this privacy policy

We may update our Privacy Policy from time to time. Thus, we advise you to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately, after they are posted on this page.

Contact us

If you have any questions or suggestions about our privacy policy, do not hesitate to contact us.

Transformation Inside and Out: North American Social Solidarity Economy Forum Participants Gather in Detroit for Reflection and Revitalization

In Detroit, many once thriving neighborhoods lay in ruins. Most of the houses in many city blocks can be in a state of severe disrepair, including some that have been completely gutted or burned, with perhaps one or two inhabitable homes that appear to still have people living in them. It should also be noted that 62,000 homes in Detroit last year were foreclosed. It looked like a city after a war.

Where do you think the children play?

I went to Detroit to attend the Social Solidarity Economy Network Forum. Organized by the Intercontinental Network for the Promotion of Social Solidarity Economy, or RIPESS, the forum addressed several problems by raising awareness that this type of economic debauchery is contagious unless we as citizens deal with it where it lives and rout it out from the roots - which inevitably lie in system-wide corruption. The Social Solidarity Economy Network Forum took place in April, and it was the first project of this North American coalition.

RIPESS is based on human values, diversity, inclusiveness, creativity and justice, and works to connect democratic workplaces, cooperative and individuals with the same values in local, national, regional and global frameworks. This is a huge effort and will take time, but this year, RIPESS and other sponsors made the NASSE Forum possible. The overall unifying message and focus of the North American Solidarity Economy Network Forum was three-fold:

  1. self-care is a topic I heard a lot of people repeating as a number one issue to consider - no one can help a movement without taking care of themselves first - period.
  2. “De-Colonization” of the movement
  3. Strengthening our connections to each other and to our communities were the topics that most workshops took time to discuss, even if not on their agenda. Cooperative people came from around the globe to share experiences and lessons learned on our journey towards building a solidarity economy network.

Laura Flanders was host to the opening of the conference and William Copeland (East Michigan Environmental Action Council) welcomed everyone to the event. Emily Kawano (RIPESS and US Solidarity Economy Network) gave the opening plenary as an overview of the International Social Solidarity Economy movement and defined the role of NASSE.

The crowd of 400+ citizens of the planet convened in solidarity at The Samaritan Behavioral Center where people could gather in small workshops to discuss and find paths to eradicate racism, sexism, cultural blockades and to unite on some single purpose methods to change the world we live in. The conference was a success in that it brought a diverse group of people together to transform the Solidarity Economy movement together and move forward on the road to "ownership" of the tools and the means of production! Many people at the forum represented a worker-owned cooperative, and are members of the United States Federation of Worker Cooperatives (USFWC). This organization does a tremendous job of gathering resources and sponsoring events that raise awareness and bring worker solidarity to the forefront of the Solidarity Economy Movement.

The Samaritan Behavioral Center had a large auditorium for the plenaries, group activities and panels which spoke to the group as a whole. The workshops were held in smaller conference rooms where people could easily participate in the conversations and connect with people to exchange contact information. In the large gathering hall panels with guests from Mexico, Canada, Greece and other parts of the world discussed how solidarity has affected their communities and what measures are needed to be put in place for the future generations to maintain solidarity. A generous time was allotted for questions and answers, of which there were plenty. Two Questions that come to mind addressed human rights and acknowledging that access to the Internet is a human right, which I will detail later in this article.

Free software for the revolution! Yes, we all agreed that the foundation of any people's movement for freedom must be built on a solid platform of freedom, not the privately owned platform. This means that we must build the future using free software, and free hardware must be a component also. How will we do this on the ground?

There must be free workshops for people in their own towns to learn about the options for privacy and security along with protecting their liberty. This brings to the forefront the Free Software Foundation in Boston, MA. The foundation is at the epicenter of our future freedoms and has many volunteers that help to raise awareness and introduce free software to the world through the GNU project.

The GNU project is a collection of free software available for downloading. Their tireless efforts working with other organizations that protect our freedom, like the Electronic Frontier Foundation will make the world a better place for each individual citizen, and the collective population also.

What are the highlights from the North American Solidarity Economy Forum (NASSE) in Detroit on April 8th through the 10th? The conference was well organized with plenaries, panels and enough smaller break-out workshops that allowed maximum interaction between participants. Diversity was present in all ways imaginable with people from around the globe in attendance. I met people from Greece, Canada and Mexico that are all involved in similar efforts to raise the cooperative levels in their community.

People listening to a presenter at the North American Solidarity Economy Forum.
People from Detroit to Athens and all across the world came to discuss solidarity economics.

The program of inter-related workshop and panel topics addressed by this event showed that a great amount of thinking went into the details and to covering the most vital issues that can propel a movement forward. Three topics emerged as the focal points of NASSE, and they are conversations and actions based on de-colonization of the Solidarity Economy, inclusion and getting to know each other better and the use of free software for the platforms we build and share.

The workshops consisted of many different tracks such as “Intro to the Solidarity Economy”, facilitated by Julie Matthaei and Jessica Gordon Nembhard of SEN. This open discussion covered the definition of the movement. It is really important to have an introduction to the framework of the Solidarity Economy at all events, for people new to the movement. There was one titled “Occupy, Resist, Produce. A talk with workers of the occupied Vio.Me factory in Greece”. Workers from Vio.Me Factory in Salonica, Greece detailed how they occupied their workplace and resumed production, while waging a legal battle to stop the corporation from selling the land. An amazing group discussion ensued.

All of the workshops were inter-connected in general theme as they relate to a community. What is good for the community in the way of connecting people to support creativity, privacy, autonomy and wealth - specifically communal wealth, without which a community does not truly exist. Wealth has been defined by a financial measure and the worth of a person is measured according to their assets. The Solidarity Economy Movement shows us that belonging to a community that treats members well and operates on the 7 Cooperative Principles can be the future.

At the conference, I facilitated a workshop titled: "Internet as a Human Right: the Role of Cooperatives and the Solidarity Economy" hosted by Juan Gerardo Dominguez Carrasco, MayFirst People Link. We talked about the Internet as an educational tool and foundation of our emerging new connected society. The need for rapid communication of information is not just a desired element, it is a necessity for being a relevant contributing member of a community and a citizen of the world. Without the Internet a person is relegated to a level of ignorance that will limit them to being low wage earners and unskilled workers.

Old, abandoned building in Detroit

There were workshops on a financial track that presented strategies for communities to practice alternative banking methods such as time banking and group loans for local initiatives. Ed Whitfield and Marnie Thompson both of the Fund for Democratic Communities in Greensboro, N.C., led a powerful workshop and discussion based on a cooperative they are helping to develop The Renaissance Community Co-op (RCC) in Greensboro, North Carolina. Their efforts will provide healthy food and a positive workplace for locals. They shared the methods they have been using to build a business that sustains the community. Local to Detroit, the West Grand Boulevard Collaborative, started in October, 2004, by Mildred Hunt Robbins and Tommie E. Robbins, Jr. is currently making good progress in revitalizing the community they live in. Plans have been made to renovate a gutted high rise building. They formed a group to have an alliance with neighbors and to have a bigger voice when raising concerns with the city.

De-colonization of the Solidarity Economy Movement was front and center in almost every aspect of the event. We are defining what it means to grow up colonized into an Extractive Economy (one that does not re-invest in the communities where the workers live) and the pathways to exit that state of mind, old traditions and ideologies. Some workshops that included a discussion on de-colonization found that listening to people add their voice to the solutions was inspiring. Inspiration alone does not a movement make. More is needed to give people the strength and fortitude to carry the movement forward. Workshops on healing and healthful living are a large part of the solidarity economy as we begin to treat the sources of trauma instead of just the symptoms. Creative problem solving along with collaborative games and exercises promotes good relationships. Action is another part of the solution and together, in solidarity, we can define powerful ways to act. One of many great examples of 'action', is Cooperation Jackson in Mississippi. They are taking some positive direct actions to change laws and city ordinance by working with the mayor and town officials to make changes on specific issues that affect their community. By having open and inclusive discussions and presenting solutions to problems, cooperators have found that some of their local representatives have ears.

A great way to get involved is to ask questions of your local activists and see what initiatives are already in progress. Detroit is not unique and this type of devastation can happen anywhere if we are not vigilant and constantly remaining alert to changes in laws and ordinances where we live. When Government services are removed from a city, neglect and decay prevail. The civil servants of Detroit have been remiss in their duties by implementing pernicious policies that have destroyed the city and led to bankruptcy, as this case study shows. I would love to hear about the efforts in your area to prevent Detroit policies that led to this destruction of lives and homes from landing on your doorstep.

Originally published by Grassroots Economic Organizing.

a crowd of people.

Today we will learn how to migrate content from Microsoft Excel and LibreOffice Calc files into Drupal using the Migrate Spreadsheet module. We will give instructions on getting the module and its dependencies. Then, we will present how to configure the module for spreadsheets with or without a header row. There are two example migrations: images and paragraphs. Let’s get started.

Example configuration for Microsoft Excel and LibreOffice Calc migration.

Getting the code

You can get the full code example at https://github.com/dinarcon/ud_migrations.

The module to enable, as in yesterday's post in which we imported Google Sheets, is UD Google Sheets, Microsoft Excel, and LibreOffice Calc source migration whose machine name is ud_migrations_sheets_sources. It comes with four migrations: udm_google_sheets_source_node.yml, udm_libreoffice_calc_source_paragraph.yml, udm_microsoft_excel_source_image.yml, and udm_backup_csv_source_node.yml. The image migration uses a Microsoft Excel file as source. The paragraph migration uses a LibreOffice Calc file as source. The CSV migration is a backup in case the Google Sheet is not available. To execute the last one you would need the Migrate Source CSV module.

You can get the Migrate Spreadsheets module using composer: composer require drupal/migrate_spreadsheet:^1.0. This module depends on the PHPOffice/PhpSpreadsheet library and many PHP extensions including ext-zip. Check this page for a full list of dependencies. If any required extension is missing the installation will fail. If your Drupal site is not composer-based, you will not be able to use Migrate Spreadsheet, unless you jump through a lot of hoops.

Understanding the example set up

This migration will reuse the same configuration from the introduction to paragraph migrations example. Refer to that article for details on the configuration. The destinations will be the same content type, paragraph type, and fields. The source will be changed in today's example, as we use it to explain Microsoft Excel and LibreOffice Calc migrations. The end result will again be nodes containing an image and a paragraph with information about someone’s favorite book. The major difference is that we are going to read from different sources.

Note: You can literally swap migration sources without changing any other part of the migration.  This is a powerful feature of ETL frameworks like Drupal’s Migrate API. Although possible, the example includes slight changes to demonstrate various plugin configuration options. Also, some machine names had to be changed to avoid conflicts with other examples in the demo repository.

Understanding the source document and plugin configuration

In any migration project, understanding the source is very important. For Microsoft Excel and LibreOffice Calc migrations, the primary thing to consider is whether or not the file contains a row of headers. Also, a workbook (file) might contain several worksheets (tabs). You can only migrate from one worksheet at a time. The example documents have two worksheets: UD Example Sheet and Do not peek in here. We are going to be working with the first one.

The spreadsheet source plugin exposes seven configuration options. The values to use might change depending on the presence of a header row, but all of them apply for both types of document. Here is a summary of the available configurations:

  • file is required. It stores the path to the document to process. You can use a relative path from the Drupal root, an absolute path, or stream wrappers.
  • worksheet is required. It contains the name of the one worksheet to process.
  • header_row is optional. This number indicates which row containing the headers. Contrary to CSV migrations, the row number is not zero-based. So, set this value to 1 if headers are on the first row, 2 if they are on the second, and so on.
  • origin is optional and defaults to A2. It indicates which non-header cell contains the first value you want to import. It assumes a grid layout and you only need to indicate the position of the top-left cell value.
  • columns is optional. It is the list of columns you want to make available for the migration. In case of files with a header row, use those header values in this list. Otherwise, use the default title for columns: A, B, C, etc. If this setting is missing, the plugin will return all columns. This is not ideal, especially for very large files containing more columns than needed for the migration.
  • row_index_column is optional. This is a special column that contains the row number for each record. This can be used as unique identifier for the records in case your dataset does not provide a suitable value. Exposing this special column in the migration is up to you. If so, you can come up with any name as long as it does not conflict with header row names set in the columns configuration. Important: this is an autogenerated column, not any of the columns that come with your dataset.
  • keys is optional and, if not set, it defaults to the value of row_index_column. It contains an array of column names that uniquely identify each record. For files with a header row, you can use the values set in the columns configuration. Otherwise, use default column titles like A, B, C, etc. In both cases, you can use the row_index_column column if it was set. Each value in the array will contain database storage details for the column.

Note that nowhere in the plugin configuration you specify the file type. The same setup applies for both Microsoft Excel and LibreOffice Calc files. The library will take care of detecting and validating the proper type.

Migrating spreadsheet files with a header row

This example is for the paragraph migration and uses a LibreOffice Calc file. The following snippets shows the UD Example Sheet worksheet and the configuration of the source plugin:

book_id, book_title, Book author
B10, The definitive guide to Drupal 7, Benjamin Melançon et al.
B20, Understanding Drupal Views, Carlos Dinarte
B30, Understanding Drupal Migrations, Mauricio Dinarte
source:
  plugin: spreadsheet
  file: modules/custom/ud_migrations/ud_migrations_sheets_sources/sources/udm_book_paragraph.ods
  worksheet: 'UD Example Sheet'
  header_row: 1
  origin: A2
  columns:
    - book_id
    - book_title
    - 'Book author'
  row_index_column: 'Document Row Index'
  keys:
    book_id:
      type: string

The name of the plugin is spreadsheet. Then you use the file configuration to indicate the path to the file. In this case, it is relative to the Drupal root. The UD Example Sheet is set as the worksheet to process. Because the first row of the file contains the header rows, then header_row is set to 1 and origin to A2.

Then specify which columns to make available to the migration. In this case, we listed all of them so this setting could have been left unassigned. It is better to get into the habit of being explicit about what you import. If the file were to change and more columns were added, you would not have to update the file to prevent unneeded data to be fetched. The row_index_column is not actually used in the migration, but it is set to show all the configuration options in the example. The values will be 1, 2, 3, etc.  Finally, the keys is set the column that serves as unique identifiers for the records.

The rest of the migration is almost identical to the CSV example. Small changes were made to prevent machine name conflicts with other examples in the demo repository. For reference, the following snippet shows the process and destination sections for the LibreOffice Calc paragraph migration.

process:
  field_ud_book_paragraph_title: book_title
  field_ud_book_paragraph_author: 'Book author'
destination:
  plugin: 'entity_reference_revisions:paragraph'
  default_bundle: ud_book_paragraph

Migrating spreadsheet files without a header row

Now let’s consider an example of a spreadsheet file that does not have a header row. This example is for the image migration and uses a Microsoft Excel file. The following snippets shows the UD Example Sheet worksheet and the configuration of the source plugin:

P01, https://agaric.coop/sites/default/files/pictures/picture-15-1421176712.jpg
P02, https://agaric.coop/sites/default/files/pictures/picture-3-1421176784.jpg
P03, https://agaric.coop/sites/default/files/pictures/picture-2-1421176752.jpg
source:
  plugin: spreadsheet
  file: modules/custom/ud_migrations/ud_migrations_sheets_sources/sources/udm_book_paragraph.ods
  worksheet: 'UD Example Sheet'
  header_row: 1
  origin: A2
  columns:
    - book_id
    - book_title
    - 'Book author'
  row_index_column: 'Document Row Index'
  keys:
    book_id:
      type: string

The plugin, file, amd worksheet configurations follow the same pattern as the paragraph migration. The difference for files with no header row is reflected in the other parameters. header_row is set to null to indicate the lack of headers and origin is to A1. Because there are no column names to use, you have to use the ones provided by the spreadsheet. In this case, we want to use the first two columns: A and B. Contrary to CSV migrations, the spreadsheet plugin does not allow you to define aliases for unnamed columns. That means that you would have to use A, B in the process section to refer to these columns.

row_index_column is set to null because it will not be used. And finally, in the keys section, we use the A column as the primary key. This might seem like an odd choice. Why use that value if you could use the row_index_column as the unique identifier for each row? If this were an isolated migration, that would be a valid option. But this migration is referenced from the node migration explained in the previous example. The lookup is made based on the values stored in the A column. If we used the index of the row as the unique identifier, we would have to update the other migration or the lookup would fail. In many cases, that is not feasible nor desirable.

Except for the name of the columns, the rest of the migration is almost identical to the CSV example. Small changes were made to prevent machine name conflicts with other examples in the demo repository. For reference, the following snippet shows part of the process and destination section for the Microsoft Excel image migration.

process:
  psf_destination_filename:
    plugin: callback
    callable: basename
    source: B # This is the photo URL column.
destination:
  plugin: 'entity:file'

Refer to this entry to know how to run migrations that depend on others. In this case, you can execute them all by running: drush migrate:import --tag='UD Sheets Source'. And that is how you can use Microsoft Excel and LibreOffice Calc files as the source of your migrations. This example is very interesting because each of the migration uses a different source type. The node migration explained in the previous post uses a Google Sheet. This is a great example of how powerful and flexible the Migrate API is.

What did you learn in today’s blog post? Have you migrated from Microsoft Excel and LibreOffice Calc files before? If so, what challenges have you found? Did you know the source plugin configuration is not dependent on the file type? Share your answers in the comments. Also, I would be grateful if you shared this blog post with others.

Next: Defining Drupal migrations as configuration entities with the Migrate Plus module

This blog post series, cross-posted at UnderstandDrupal.com as well as here on Agaric.coop, is made possible thanks to these generous sponsors. Contact Understand Drupal if your organization would like to support this documentation project, whether it is the migration series or other topics.

Learning Objectives

  • Understand the different approaches to upgrading your site to Drupal 11 using the Migrate API.
  • Revise site architecture and map configuration from the previous site to the new one
  • Use the Migrate Drupal UI module to understand module requirements for running upgrades.
  • Use the Migrate Upgrade module to generate migration files.
  • Cherry-pick content migrations for getting a content type migrated to Drupal 11.
  • Modify a migration to convert a content type to a user entity.
  • Modify a migration to convert a content type to a paragraph entities.
  • Migrate images to media entities.
  • Learn about writing a custom process plugin for providing a migrate path for modules that do not include one already.
  • Tips and recommendations upgrade projects.

Prerequisites

This is an advanced course that requires familiarity with the Drupal migration concepts. Our Drupal 11 content migrations training will give you all the background knowledge that you need. Alternatively, you can read the 31 days of migrations series in our blog or watch this video for an overview of the Migrate API.

Setup instructions

Having a Drupal 7 and Drupal 11 local installation is required to take this course. We offer this DDEV-based repository configured with the two Drupal installations used in the training. Alternatively, you can use a tool like Lando or Docksal. You will have to be able to restore a MySQL database dump containing the Drupal 7 database. Drupal 11 site needs to be able to connect to the Drupal 7 database. Drush needs to be installed in order to run migrations from the command line.

This training will be provided over Zoom. You can ask questions via text chat or audio. Sharing your screen, but you might want to do it to get assistance on a specific issue. Sharing your camera is optional.

What to expect

Rocket launch

Prior to the training

Attendees will receive detailed instructions on how to setup their development environment. In addition, they will be able to join a support video call days before the training event to make the the local development environment is ready. This prevents losing time fixing problems with environment set up during the training.

On the days of the training

  • The training totals 7 hours of instruction, which we usually split into 2 sessions.
  • A team of developers available to answer questions and help with training-related issues.

After the training

  • Attendees will receive copies of the training recordings.
  • Attendees will receive a free copy of the 31 days of migrations book.
  • Attendees will receive a certificate of completion.

We received the go-ahead from Studio Daniel Libeskind to take their web site live a few weeks ago, but it was presenting here at Pacific Northwest Drupal Summit that we realized we should mention it to the world.

The architect partners and their one-woman public relations powerhouse are fantastic, as was the project's driving force and designer, Todd Linkner.  We'll be sharing much more about this project, but in the meantime, enjoy this bold site:

http://daniel-libeskind.com

In the next few weeks, Mauricio Dinarte (dinarcon on drupal.org) will be traveling to deliver his expertise to multiple Drupal events in Europe and America. He is on a mission to continue sharing the knowledge gained from many years as an active member of the Drupal community. Over the last few years he has presented numerous sessions and full day trainings at more than 18 Drupal camp— so you may have been at one of his presentations about Drupal basic concepts, twig recipes, or D8 migrations!

In addition to touring, Mauricio is very active in both local and global communities. He serves as a lead organizer of the Nicaraguan Drupal community where he has trained dozens of people, some of whom have made Drupal their career. He is also a member of the Drupal Global Training - Community Working Group and was recently added to Drupal's MAINTENANERS.txt as part of the mentoring team.

Here is where Mauricio will be presenting next:

Driven by passion to teach others what he has learned, Mauricio's skills go way beyond coding and he has been on a mission to take part in as many International Drupal Cons and Camps as humanly possible. If you happen to be in any of the cities on Mauricio's itinerary, please say hello to him and shake his hand for me. He has touched the lives of many developers and would-be developers, and started some on a path to follow in his footsteps.

As Elon Musk destroys Twitter, a lot of clients have asked about alternative social media, especially 'Mastodon'— meaning the federated network that includes thousands of servers, running that software and many other FLOSS applications, all providing interconnecting hubs for distributed social media. Agaric has some experience in those parts, so we are sharing our thoughts on the opportunity in this crisis.

In short: For not-for-profit organizations and news outlets especially, this is a chance to host your own communities by providing people a natural home on the federated social web.

Every not-for-profit organization lives or dies, ultimately, based on its relationship with its supporters. Every news organization, it's readers and viewers.

For years now, a significant portion of the (potential) audience relationship of most organizations has been mediated by a handful of giant corporations through Google search, Facebook and Twitter social media.

A federated approach based on a protocol called ActivityPub has proven durable and viable over the past five years. Federated means different servers run by different people or organizations can host people's accounts, and people can see, reply to, and boost the posts of people on the other servers. The most widely known software doing this is Mastodon but it is far from alone. Akkoma, Pleroma, Friendica, Pixelfed (image-focused), PeerTube (video-focused), Mobilizon (event-focused), and more all implement the ActivityPub protocol. You can be viewing and interacting with someone using different software and not know it— similar to how you can call someone on the phone and not know their cellular network nor their phone model.

The goal of building a social media following of people interested in (and ideally actively supporting) your organization might be best met by setting up your own social media.

This is very doable with the 'fediverse' and Mastodon in particular. In particular, because the number of people on this ActivityPub-based federated social web has already grown by a couple million in the past few weeks— and that's with Twitter not yet having serious technical problems that are sure to come with most of its staff laid off. With the likely implosion of Twitter, giving people a home that makes sense for them is a huge service in helping people get started— the hardest part is choosing a site!

People fleeing Twitter as it breaks down socially and technically would benefit from your help in getting on this federated social network. So would people who have never joined, or long since left, Twitter or other social media, but are willing to join a network that is less toxic and is not engineered to be addictive and harmful.

Your organization would benefit by having a relationship with readers that is not mediated by proprietary algorithms nor for-profit monopolies. It makes your access on this social network more like e-mail lists— it is harder for another entity to come in between you and your audience and take access away.

But the mutual benefits for the organization and its audience go beyond all of this.

When people discuss among one another what the organization has done and published, a little bit of genuine community forms.

Starting a Mastodon server could be the start of your organization seeing itself as not only doing good works or publishing media, but building a better place for people to connect and create content online.

The safety and stability of hosting a home on this federated social network gives people a place to build community.

But organizations have been slow to adopt, even now with the Twitter meltdown. This opens up tho opportunity for extra attention and acquiring new followers.

Hosting the server could cost between $50 to $450 a month, but this is definitely an opportunity to provide a pure community benefit (it is an ad-free culture) and seek donations, grants, or memberships.

The true cost is in moderation time; if volunteers can start to fill that you are in good shape. A comprehensive writeup on everything to consider is here courtesy the cooperatively-managed Mastodon server that Agaric Technology Collective chose to join at social.coop's how to make the fediverse your own.

You would be about the first for not-for-profit or news organizations.

You would be:

  • giving people a social media home right when they need it
  • literally owning the platform much of your community is on

And it all works because of the federation aspect— your organization does not have to provide a Twitter, TikTok, or Facebook replacement yourselves, you instead join the leading contender for all that.

By being bold and early, you will also get media attention and perhaps donations and grants.

The real question is if it would divert scarce resources from your core work, or if the community-managing aspects of this could bring new volunteer (or better, paid) talent to handle this.

Even one person willing to take on the moderator role for a half-hour a day to start should be enough to remove any person who harasses people on other servers or otherwise posts racist, transphobic, or other hateful remarks.

Above all, your organization would be furthering your purpose, through means other than its core activities or publishing, to inform and educate and give people more capacity to build with you.

Not surprisingly, Drupal has already figured this out!