Newsfeeds

See how Path of Exile was built to be played forever at GDC 2019

Social/Online Games - Gamasutra - 1 February 2019 - 8:56am

Grinding Gear Games' Path of Exile is a free-to-play success story, and at the Game Developers Conference in San Francisco next month you'll get to see how the dev team keeps it going strong. ...

Categories: Game Theory & Design

Thumbor Effects Crop

New Drupal Modules - 1 February 2019 - 8:44am

This module makes it possible to create crops in combination with the Thumbor Effects module.

Categories: Drupal

Feeds: Twitter

New Drupal Modules - 1 February 2019 - 8:28am

A Twitter timeline fetcher for Feeds.

This module is under active development and will receive periodic updates. It's useable but having no stable release currently I cannot guarantee that the most recent release will work.

Categories: Drupal

Welcome to the Airy Peaks (01)

Gnome Stew - 1 February 2019 - 5:00am

Hey folks. This will be a series of articles that shows off the Airy Peaks, a fantasy setting. Over the course of several articles with the Airy Peaks tag, you’ll find a bunch of stuff you can use in your fantasy games, including but not limited to a town called Foot, maps of the areas of the peaks, NPCs, magic items, stories of the peaks, adventure seeds, rumors about Eyetog – the great red dragon that once ruled over this small mountain range, adventure hooks, and interesting things you can use for your games.

To begin let’s start with a story.

The Legend of Eyetog & The Airy Peaks

Eyetog the terrible is the most fearsome dragon that has ever existed. For thousands of years he’s been known as the ender of ages, the taker of treasures, the eater of heroes. It was pay tribute to the dragon or have your nation destroyed by fire. As of today no one has seen the dragon for 50 years.

Some thought the dragon might have died, others believed he just retreated to his lair in the small mountain range to the north known as The Airy Peaks. After 30 years, adventurer’s became curious and made their way to The Peaks to find out for themselves. Inside they found the mountain range had been hollowed out. There were miles of caverns and tunnels of smooth stone that glowed with energy. The stone looked as if it had been shaped and melted by dragon’s fire. There was also treasure in those caverns and it was guarded by all manner of monster and horror. It became a siren call to adventurers.

Soon after a small town called Foot was established and it became a haven and base for adventurers to make their forays into the mountains. Many died. Some became rich. Stories and legends were born. This is the Airy Peaks. What legend will you leave?

The Premise

The Airy Peaks is a massive dungeon complex. It was created to run Dungeon World, which is a game I very much adore. I’ve used it to run a number of one shots, Long Cons – convention games where two or more consecutive sessions tell a longer story with the same characters and players, and several campaigns. This means you can use it to run games in a variety of situations, but it’s dungeon crawling at its core. There’s a town. There’s a dungeon. You’re supposed to go into the dungeons, explore, find treasure, return to town, spend your coin, go into the dungeon, and now you see the cycle.

How to do this effectively

I’ve been fascinated with dungeon crawls my entire life and especially the mega-dungeon. My problem has always been how do you tell a compelling story around the idea of these dungeon crawls? My answer was the Peaks.

  • Step 1. Variety
    To start I wanted to make sure the dungeon was compelling and had a number of areas. When I started, the Airy Peaks had eighteen different cavern complexes for adventures to explore. These were not all highly detailed. A lot of them were just the name of the cavern complex, like The Dragon Fire Forges or The Mushroom Cavern. Some were drawn out and more detailed to begin with, like the Wild Caverns and the High Halls. In either case I had a lot of places the characters could explore and travel when we started.

  • Step 2. Evolving Ecology
    I also decided that each of these cavern complexes wouldn’t just be stagnant. They’d have evolving situations based on the things that happened around them or too them. So if adventurer’s went into a cavern and cleaned it out, the cavern would eventually be repopulated by different monsters. For example there’s the High Halls.

    The High Halls have a very tall ceiling and when my Airy Peaks Campaign started it was inhabited by a tribe of Hill Giants. Once those giants were dealt with, a tribe of Cyclops moved in and took the place over. The High Halls are adjacent to a huge cave area called The Wild Caverns. When the giants were there the characters could encounter giants in The Wild Caverns. When the Cyclops moved in they were up for random encounters in The Wild Caverns. This made the ecology of The Peaks an evolving thing.

  • Step 3. A Home Base that Matters
    The next step was to make the town of Foot a living, breathing place that had a purpose. It’s an adventurer’s town and is there to service adventurers. It’s sort of like a resort town and tourist trap for adventurers. It’s a place for adventurer’s to bring their gold to and spend it on carousing, getting into trouble, gear, the bath house, the pleasure boat, bribes, information, and whatever else an adventurer can think of.

    The place was also filled with a number of NPCs that had their own agendas and desires in the town. Some of them even belonged to the Cult of the White Fangs, which worshiped a spirit aspect of Eyetog. To go along with those NPCs who lived in Foot, I also had a bunch of adventurers who were also delving into the mountains. They would have their own stories of exploits in the Peaks and sometimes they wouldn’t come out. This helped to show that the Peaks weren’t a kind or forgiving place.

  • Step 4. The Dragon’s Plot
    Here’s the spoiler about the Peaks. Eyetog is trying to become a god — a god of death to be precise. The first thing he needed to do was discover the way to become a god of death. He already has when the campaign began and set up his situation for this plan to succeed. Here’s what else he’s already done or needs to do:

    • Consume a god of death
    • Collect enough energy to ascend
    • Fashion himself a body that can hold the energy of a god and infuse that energy into the body over time

Next time I’ll talk about how the dragon’s plot helped shape the Airy Peaks and gave me the flexibility of steps one and two. I hope you enjoyed this and if you have any questions I’ll do my best to answer them in the comments below.

Header art is by Drew Smith

Categories: Game Theory & Design

OPTASY: How to Decouple Drupal Commerce to Deliver Richer Shopping Cart Experiences: Useful Modules

Planet Drupal - 1 February 2019 - 4:16am
How to Decouple Drupal Commerce to Deliver Richer Shopping Cart Experiences: Useful Modules radu.simileanu Fri, 02/01/2019 - 12:16

Just imagine it: Drupal 8's robust features as a CMS, the flexible e-commerce functionality of the Drupal Commerce ecosystem and a JavaScript framework for the front-end! All in the same native mobile app! You can easily achieve this “combo” — a reliable content repository & a JS-based front-end providing a fantastic shopping cart experience — if you just... decouple Drupal Commerce.

For why should you trade Drupal's battle-tested content authoring and administration tools for a more interactive user experience? 

And why should you give up on your goal to deliver richer cart experiences just because Drupal 8 can't rival the JavaScript in terms of advanced native mobile app functionality?
 

Categories: Drupal

DrupalCon News: You should stay at a DrupalCon partner hotel. Here’s why.

Planet Drupal - 1 February 2019 - 4:12am

The hotels we chose each offer an ideal hub—connecting you to a rewarding DrupalCon community experience. 

Categories: Drupal

Drupal Association blog: Introducing Community Group Sections in the Community Portal

Planet Drupal - 1 February 2019 - 4:09am
/Community

As mentioned previously, we have been collaborating across the Drupal community on updating and, expanding Drupal.org/community and that work is ongoing. There are still wrinkles to resolve, such as how to make the menus on that page more obvious, but we are getting there:

Next step - community group sections

One of the things I was especially keen to do was to make areas for the groups of people that make our community work available under /community and give them the tools and space to tell the World about:

  1. Who they are
  2. What they do
  3. How they work
  4. What their latest updates are
  5. How you can get involved.

Well, the framework to do this looks good and the first couple of sections are now available. You can see the following community groups already:

  1. Event Organizers’ Group
  2. Core Mentoring Group
  3. Agency marketing Group (the Promote Drupal initiative)

Each section will have a “standard” home page content, detailing the info above, as many content pages as the group can muster and a blog that will go onto Drupal Planet.

Of course, a group will likely have content across many different parts of the Drupal.org website. I’m especially keen for all members of our community to be able to see what groups there are and how they work in one easy to consume place. Our project values challenge us all to clearly define how our community functions: "We foster a learning environment, prefer collaborative decision-making, encourage others to get involved and to help lead our community."

What about the community group you are a member of?

If you represent a community group and would like to join the growing list of those with sections under /community, please get in contact

I’m looking at globally-relevant groups right now - maybe in the future, we will look at what we can do to support local groups.

Imagine what could be possible when new members of our community come to /community and find right where they belong! I'm excited to see what's next.

Categories: Drupal

OpenSense Labs: Integrating Drupal and Salesforce? Surely a win-win for you.

Planet Drupal - 1 February 2019 - 3:54am
Integrating Drupal and Salesforce? Surely a win-win for you. Vasundhra Fri, 02/01/2019 - 17:24

The number eight in bible signifies resurrection and regeneration, a digit that implies “New beginnings” 

Just like the resurrection of Drupal which loudly announced its new inceptions as a content management system, and its ability to connect with Saas CRM like Salesforce. 

Salesforce is like the heart for most of the business that has allowed them to handle there sales data at one stop and given highest priority in terms of customer’s growth. And now that it has a tighter integration than ever before, Drupal 8 can do it too 


So instead of wasting any more of your time and beating around the bush, let's explore the paths that lead down its integration and the key considerations that are involved in it. 

Benefits of Integrating Drupal and Salesforce

Managing Territories

When you have a team of salespeople small or big, how would you manage that which territories or which areas each of them is going after? 

Definitely with the help of Salesforce that would monitor and track almost anything that you can imagine of. Instead of managing those old school spreadsheets, a CRM like Salesforce can help you track and monitor all the tasks. It saves your time, resources that arrives while managing small and large scale teams. With the help of this CRM, you have the power to do many things such as:

  • Better management of lead processing and territories.
  • The leads can be assigned to the users according to according to the data that have business sense.
  • Instant email notifications can help in rep up the sales of the customers and prospects immediately.
  • It can help you attain better efficiency. 

Tracking competitors and managing opportunities 

In this competitive world, it is important to track and manage your competitors. You can do this thing with the help of Salesforce CRM. 

It diligently ensures that each and every opportunity is followed up on and not forgotten through the various in-built tools and responses faster to any client that enquires about your services or products which shows ultimately to your customers that you care about their business.

Forecasting

A good CRM system gives you the ability from a business point of view to track exactly what is happening but also accurately forecast the growth or decline of your business. For forecasting, salesforce can also provide you with:

  • Calculate the forecasting including all the information from the sales team.
  • Differentiate between booked and recurring venues 
  • Customize forecast based on the parameters that make sense to the business.

Managing Orders

The Salesforce CRM allows you to truly manage end to end customer relationships. You can see everything from the first time when you engage with a client to when they place an order and beyond. 

The best part about Salesforce CRM in terms of managing order is that it can easily turn an estimate into order and beyond with a single click of a button and customized or automated reports based on what you need to see

Architectural approaches

There are different architectural approaches to have you think about data flow that provides for different requirements and satisfy different needs. Architectures like:

Technology Description Strengths Weakness Real-Time Push Sends data immediately on the entity and creates,  updates and deletes Fast, limited, update lag, avoids UX, can avoid race conditions  Less durable and reliable  Cron Based Sync Identify records requiring sync on the cron Handles large volumes well, can be stopped and start as needed Slow, lags and risk the update conflicts Work Queue Single point of integration receives data and action Reliable, performant and has a shorter time lag Large changes create backlogs, the risk of update conflicts

Real-Time Push

With the real-time integration, the Drupal objects are exported to salesforce immediately. You get the feedbacks indicating whether the item failed to export and the data is available in Salesforce or not. This can be a great option if you need the data to be in the salesforce as close as possible.

Cron Based Sync

Earlier in Drupal 7 the asynchronous push left hiccups concerning error handling (which involved debugging and troubleshooting) optimization, API calls etc.

Now in Drupal 8 salesforce cron based push service has been introduced to construct database queues, normalizing queue items, optimizing queue operations and implementing error handling. 

The Cron based sync has helped Drupal’s core API schedule synchronization from salesforce to Drupal. 

Work Queues

With the queue-based batching system running in the background, it allows many objects to be sent to the salesforce as soon as possible. Instead of the objects being sent to the Salesforce at the same time. In this architecture, instead of the objects that are being sent to the salesforce as soon as it is created, edited, deleted it goes into the queue where it waits to be exported to other items. 

The queues items are then picked up on the configurable schedule and then exports to the Salesforce in batches. Batching the data helps in synchronization and helps to increase the performance by using fewer API calls.

Approaches suitable for integration

There are many ways to move your data from the website to another application. Drupal and Salesforce out of which is the easiest and allows integration in almost all projects. Here are some approaches which are suitable to integrate Drupal and Salesforce.

Simple web forms

Salesforce lets you create simple HTML web form (Web-to-lead or web-to-case)  that generates lead or case records in Salesforce when they are submitted. 

Anyone of the Salesforce administrator can create these forms and then paste them in Drupal for the users to complete it. 


While not all of the things are addressed in every circumstance, there are specific situations when this method is a good solution: 

  • A basic idea on the user data or inquiry information into Salesforce is needed.
  • There is no or little expertise in web development. 
  • Something quick and easy is needed. 

Third party form service 

There are an ample number of form services like Formstack, click and pledge and Wufoo that have the power to pass the data to Salesforce. In this, you can either embed the form in Drupal or let the user click through the platform.


This method is suitable when the following conditions are applied:

  • When there is a need to pass both user and transaction data into Salesforce. 
  • There is no need to move the information in both the directions. 
  • You may want users to log in to submit a form or return to the form and provide more information later. 
  • You want sophisticated solutions that don’t really need to be customized

Salesforce Suite

The Salesforce Suit is the collection of all the Drupal modules that allow synchronization of all the data and the information that is between Drupal and Salesforce in single or both directions. This suit also has the ability to provide a mapping tool that can be used to define the integration which is field-by-field and object-by-object.


Salesforce forms

The simplest way to hook Drupal up (or any other website) with Salesforce is by simply linking over to a form that is created by the Salesforce. Any data that the user is entering gets dumped directly to the salesforce and Drupal is not involved in it.

This type of method is good for a lead generation or simple application form. One of the biggest advantage in using salesforce forms is that it is not only cheap and easy to use, but there are zero setups that are done on Drupal side besides providing a link to the form.

Salesforce mapping 

There might be instances where you might have content that constitutes in both Drupal as well as Salesforce and is needed to stay in sync. Salesforce mapping does that task for everyone. 

Salesforce mapping keeps the version of the data at both ends, whatever happens to one happens to the other version too. 

Rules can also be made to add, delete, push or pull data.  

 

  Cost Direction   Complexity Simple Web Forms Free  One direction inbound to Salesforce DIY Third Party Form Service Low One direction  DIY or Developer Assistance Salesforce Suite Moderate To High  Bi-directional  Developer Assistance Salesforce Mapping High Double-entering the same content in two places Developer Assistance Salesforce Forms Low  Natural  DIY Integrating with different Directions   Integrating with One Direction Integrating with two directions Useful when When you have to pass user data, transaction data, and specific node types  When data is entered directly into Salesforce  To keep Integration Simple  Modern  Advantage This approach limits complexity and therefore liability and errors. Fewer duplicate records are created in Salesforce. User Experience No updates required to impact UX  Users need sophisticated interaction such as the ability to view offline data you have entered  Use Cases Donation forms, Event registration Donation forms, Event registration  Drupal modules are here to ease the integration with Salesforce 

The Drupal Salesforce Suite module is a testament to both the ingenuity and passion of the Drupal community and the flexibility of Drupal as an enterprise platform. As a contributed module, the Salesforce Suite for Drupal enables out of the box connection with Salesforce, no matter what your configuration is. It supports integration by simply synchronizing Drupal entities (eg users, nodes) with the Salesforce objects (organization, contacts)

The Drupal community, as a matter of fact, has been contributing a lot to this part. It has come together to sponsor the development of the suite of Salesforce integration modules that can deal with a variety of business needs. To rewrite the module, the community gathered time and the resources, taking full advantage of the advances that were made in the Drupal and Salesforce platforms. To put it all together it now has been rearranged into a modular architecture exposing core functionality via an API enabling other systems, E.g., Springboard, Jackson River’s fundraising platform 

Most importantly the Drupal suite module has authorized Auth 2.0 to its highest access control 

For the non-technical users, the Drupal entity and Salesforce object mapping system has provided them with the power to configure the data maps between any objects in any 2 systems. Not only this but the synchronization between any Drupal entity and Salesforce object, E.g., Drupal users, donation receipts has been made easy. It has presented its users with a lightweight wrapper around the SOAP API, which has more capabilities for some use cases, using the same OAuth authorization 

Examples of the Use case of Drupal and Salesforce Integration 

SpringBoard 

A packaged distribution of Drupal for non-profit organizations, Springboard, Jackson River’s innovative solution (for online fundraising and marketing), needed to accept online donations and wanted to use Drupal to power other user touch points such as petitions, email registration and more. Springboard presented a robust integration queue for bi-directional sync of data between Drupal and Salesforce.com CRM.

RedHen CRM 

RedHen CRM has been designed for the needs of membership organizations and associations, the RedHen framework is extensible and flexible and can be leveraged to produce a broad range of CRM solutions. For instance, RedHen could be used as a light-weight sales pipeline management tool for small businesses. RedHen CRM could also be leveraged as an integration point between Drupal and much larger, enterprise CRM solutions such as Salesforce. 

Case studies on Cornell University 

The university offers hundreds of opportunities to the students including the ones that are living aboard. But to take the advantages of the opportunities the student had to navigate a full maze of departments and websites. Thus, to solve this issue Cornell University Experience Initiative (CUEI) came up with a plan to bring out a “Netflix” like experience to the students that provide customizable user guide making it easy for the students and the opportunities. 

An organization known as Pantheon was chosen. They wanted to maintain there content with Drupal but also wanted to manage student application and data with Salesforce CRM. The whole team chose Message Agency as their partner to help conceptualize how Drupal and Salesforce would work. Message Agency is also an architecture of the Salesforce Suite, a set of Drupal modules that allows integration of these two powerful solutions.


There are interested students who come to the site to find things and explore. For that task, Drupal does a really good job, but when it comes to actions and customization Salesforce wins in it. This created a whole new paradigm of student’s communication and interaction. 

The technique of centralizing information also provided Cornell with opportunities where each department had their individual page or site with content strategies. But before the website went live the CSEI team tested the user experience with the most trusted stakeholders: Cornell Students

The feedback which they received was overwhelming. They granted with positive reviews telling that how great and well organized the website was. Not only this but Pantheon also evaluated the site’s performance under the traffic load by providing complexity and image-heavy design 

The Future 

The wide raps of what Salesforce and Drupal make possible has given us a vivid idea on how the sales can be increased and raised among the marketing organizations. If you take one view away from all of the above, it should be this: there's definitely an integration that will work for your organization's needs and budget, but it might not be as efficient as integrating Salesforce and Drupal.

If you are able to get a Drupal-Salesforce integration deployed to your operation and organization, there is no doubt on the fact that you will enjoy streamlined and optimized business processes in the short and long term, thus boosting sales and also making the entire process much more comfortable and effective. The flexibility and customizability of Salesforce could prove to be troublesome when it comes to the consistency of your back-end.

Conclusion 

Drupal installations are all unique because of the different modules and customizations that they use, so integration has to be set up in a different manner by an expert.

If you already have a Salesforce instance set up, we'll be happy to explore the appropriate integration options. If you're new to Salesforce, we can work with your Salesforce developers to make sure your data is structured in a way that minimizes the integration effort and costs. 

Ping us at  hello@opensenselabs.com now for the required services related to the whole topic.

blog banner blog image Drupal Drupal 8 CMS Salesforce Salesforce Suite Salesforce mapping Salesforce Forms CRM Blog Type Articles Is it a good read ? On
Categories: Drupal

Create fields in Drupal 8 Profile Entity Type and attach field instances to Drupal8

New Drupal Modules - 1 February 2019 - 3:44am

This module is a collection of useful Drush commands for cloning/creating/copying fields in the node entity type bundle and in the profile entity type bundle of Drupal 8 from other node entity type bundle.

This module provides 2 useful commands for Drupal 8 fields:--

1. This module is used for cloning/copying all the fields from one node type bundle to another node type bundle. So, it is used for attaching all the field instances from one bundle to another bundle.
2. This module is used for creating all the fields from a node type bundle to Profile Type bundle.

Categories: Drupal

Commerce Ajax cart message

New Drupal Modules - 1 February 2019 - 3:24am
Categories: Drupal

Form Fields Site Area

New Drupal Modules - 1 February 2019 - 2:55am

It is a view exposed fields area handler plugin. It can be used in the Views Header or in Footer. It contains the tokens of the exposed fields names of the view. These tokens got replaced with the searched values while searching the fields in the views form.

These tokens need to be added in the Display section of the plugin to get the results. Currently, the cases for text exposed fields, Taxonomy exposed fields, DateTime, boolean fields are being handled.

Categories: Drupal

Digital Echidna: Thoughts on all things digital: Digital Echidna Recognized as a Top Development Firm in Canada

Planet Drupal - 1 February 2019 - 1:02am
Since the beginning, our goal has been to balance technical expertise with creative flair when building and designing websites, applications, and digital platforms to deliver real solutions for clients. We continue to stand as leaders in our…
Categories: Drupal

What drives retention?: A look at the mechanics that keep players playing

Social/Online Games - Gamasutra - 1 February 2019 - 1:02am

Game designer Raph Koster defines the key measures behind successful player retention, and breaks down the pros and cons of several proven retention mechanics. ...

Categories: Game Theory & Design

View Area Handler Plugin for Exposed Form Fields

New Drupal Modules - 31 January 2019 - 11:35pm

It is a views exposed fields area handler plugin. It can be used in the Views Header or in Footer. It contains the tokens of the exposed fields names of the view. These tokens got replaced with the searched values while searching the fields in the views form .

These tokens needs to be added in the Display section of the plugin to get the results. Currently the cases for text exposed fields, Taxonomy exposed fields, datetime, boolean fields are being handled.

Categories: Drupal

Tandem's Drupal Blog: Lando + Contenta CMS + Nuxt Pt. 2

Planet Drupal - 31 January 2019 - 4:00pm
February 01, 2019 Configure Contenta CMS and Nuxt to communicate Why? In Lando + Contenta CMS + Nuxt Pt. 1 we configured the infrastructure for local development of a headless Drupal app with a Nuxt frontend. In this article we will wire up the communication between the myapi Contenta CMS backend and the mynuxt Nuxt frontend apps. Configure Cont...
Categories: Drupal

Capgemini Engineering: How to update data models in Drupal 8

Planet Drupal - 31 January 2019 - 4:00pm

In this article we will see how to update data models in Drupal 8, how to make the difference between model updating and content updating, how to create default content, and finally, the procedure to adopt for successful deployments to avoid surprises in a continuous integration/delivery Drupal cycle.

Before we start, I would encourage you to read the documentation of the hook hook_update_N() and to take into account all the possible impacts before writing an update.

Updating the database (executing hook updates and/or importing the configuration) is a very problematic task during a Drupal 8 deployment process, because the updating actions order of structure and data is not well defined in Drupal, and can pose several problems if not completely controlled.

It is important to differentiate between a contributed module to be published on drupal.org aimed at a wide audience, and a custom Drupal project (a set of Drupal contrib/custom modules) designed to provide a bespoke solution in response to a client’s needs. In a contributed module it is rare to have a real need to create instances of configuration/content entities, on the other hand deploying a custom Drupal project makes updating data models more complicated. In the following sections we will list all possible types of updates in Drupal 8.

The Field module allows us to add fields to bundles, we must make difference between the data structure that will be stored in the field (the static schema() method) and all the settings of the field and its storage that will be stored as a configuration. All the dependencies related to the configuration of the field are stored in the field_config configuration entity and all the dependencies related to the storage of the field are stored in the field_storage_config configuration entity. Base fields are stored by default in the entity’s base table.  

Configurable fields are the fields that can be added via the UI and attached to a bundle, which can be exported and deployed. Base fields are not managed by the field_storage_config configuration entities and field_config.

To update the entity definition or its components definitions (field defintions for example if the entity is fieldable) we can implement hook_update_N(). In this hook don’t use the APIs that require a full Drupal bootstrap (e.g. database with CRUD actions, services, …), to do this type of update safely we can use the methods proposed by the contract EntityDefinitionUpdateManagerInterface (e.g. updating the entity keys, updating a basic field definition common to all bundles, …)

To be able to update existing data entities or data fields in the case of a fieldable entity following a modification of a definition we can implement hook_post_update_NAME(). In this hook you can use all the APIs you need to update your entities.

To update the schema of a simple, complex configuration (a configuration entity) or a schema defined in a hook_schema() hook, we can implement hook_update_N().

In a custom Drupal project we are often led to create custom content types or bundles of custom entities (something we do not normally do in a contributed module, and we rarely do it in an installation profile), a site building action allows us to create this type of elements which will be exported afterwards in yml files and then deployed in production using Drupal configuration manager.

A bundle definition is a configuration entity that defines the global schema, we can implement hook_update_N() to update the model in this case as I mentioned earlier. Bundles are instances that persist as a Drupal configuration and follow the same schema. To update the bundles, updated configurations must be exported using the configuration manager to be able to import them into production later. Several problems can arise:

  • If we add a field to a bundle, and want to create content during the deployment for this field, using the current workflow (drush updatedb -> drush config-import) this action is not trivial, and the hook hook_post_update_NAME() can’t be used since it’s executed before the configuration import.
  • The same problem can arise if we want to update fields of bundles that have existing data, the hook hook_post_update_NAME() which is designed to update the existing contents or entities will run before the configuration is imported. What is the solution for this problem? (We will look at a solution for this problem later in this article.)
Now the question is: How to import default content in a custom Drupal project?

Importing default content for a site is an action which is not well documented in Drupal, in a profile installation often this import is done in the hook_install() hook because always the data content have not a complex structure with levels of nested references, in some cases we can use the default content module. Overall in a module we can’t create content in a hook_install() hook, simply because when installing a module the integrity of the configuration is still not imported.

In a recent project i used the drush php-script command to execute import scripts after the (drush updatedb -> drush config-import) but this command is not always available during deployment process. The first idea that comes to mind is to subscribe to the event that is triggered after the import of the configurations to be able to create the contents that will be available for the site editors, but the use of an event is not a nice developer experience hence the introduction of a new hook hook_post_config_import_NAME() that will run once after the database updates and configuration import. Another hook hook_pre_config_import_NAME() has also been introduced to fix performance issues.

A workflow that works for me

To achieve a successful Drupal deployment in continuous integration/delivery cycles using Drush, the most generic workflow that I’ve found at the moment while waiting for a deployment API in core is as follows :

  1. drush updatedb
    • hook_update_N() : To update the definition of an entity and its components
    • hook_post_update_N() : To update entities when you made an entity definition modification (entity keys, base fields, …)
  2. hook_pre_config_import_NAME() : CRUD operations (e.g. creating terms that will be taken as default values when importing configuration in the next step)
  3. drush config-import : Importing the configuration (e.g. new bundle field, creation of a new bundle, image styles, image crops, …)
  4. hook_post_config_import_NAME(): CRUD operations (e.g. creating contents, updating existing contents, …)

This approach works well for us, and I hope it will be useful for you. If you’ve got any suggestions for improvements, please let me know via the comments.

How to update data models in Drupal 8 was originally published by Capgemini at Capgemini Engineering on February 01, 2019.

Categories: Drupal

An object at rest

Adventures in Interactive FIction - 17 May 2008 - 2:03pm

So obviously, the pendulum of progress stopped swinging on my game.  As much as I tried to prevent it, pressing obligations just wouldn’t take a back seat (nor would the burglars who, a few weeks ago, stole 90% of my wardrobe and who last week stole my monitor).  So after a string of hectic weekends and even crazier weeks, this weekend has been pretty wide open for doing whatever I want to do.  And not a moment too soon!

So after doing all the other things I try to do with my weekends, I finally loaded up the ol’ Inform 7 IDE and started working on my game.  To get me back in the swing of things, so to speak, I started reading through what I’d already written.  It was an interesting experience.

Strangely, what impressed me most was stuff I had done that I have since forgotten I learned how to do.  Silly little things, like actions I defined that actually worked, that had I tried to write them today, probably would have had me stumped for a while.  Go me!  Except, erm, I seem to have forgotten more than I’ve retained.

I also realized the importance of commenting my own code.  For instance, there’s this snippet:

A thing can be attached or unattached. A thing is usually unattached. A thing that is a part of something is attached.

The problem is, I have no idea why I put it in there – it doesn’t seem relevant to anything already in the game, so I can only imagine that I had some stroke of genius that told me I was going to need it “shortly” (I probably figured I’d be writing the code the next night).  So now, there’s that lonely little line, just waiting for its purpose.  I’m sure I’ll come across it some day; for now, I’ve stuck in a comment to remind myself to stick in a comment when I do remember.

It reminds me of all the writing I did when I was younger.  I was just bursting with creativity when I was a kid, constantly writing the first few pages of what I was sure was going to be a killer story.  And then I’d misplace the notebook or get sidetracked by something else, or do any of the million other things that my easily distracted self tends to do.  Some time later, I’d come across the notebook, read the stuff I’d written and think, “Wow, this is great stuff!  Now… where was I going with it?”  And I’d never remember, or I’d remember and re-forget.  Either way, in my mother’s attic there are piles and piles of notebooks with half-formed thoughts that teem with potential never to be fulfilled.

This situation – that of wanting to resume progress but fumbling to pick up the threads of where I left off –  has me scouring my memory for a term I read in Jack London’s Call of the Wild.  There was a part in the book where Buck’s owner (it’s late, his name has escaped me) has been challenged to some sort of competition to see if Buck can get the sled moving from a dead stop.  I seem to remember that the runners were frozen to the ground.  I thought the term was “fast break” or “break fast” or something to that effect, but diligent (does 45 seconds count as diligent?) searching has not confirmed this or provided me with the right term.  Anyway, that’s how it feels tonight – I feel as if I’m trying to heave a frozen sled free from its moorings.

The upside is, I am still pleased with what I have so far.  That’s good because it means I’m very likely to continue, rather than scrap it altogether and pretend that I’ll come up with a new idea tomorrow.  In the meantime, I’ll be looking for some SnoMelt and a trusty St. Bernard to get things moving again.

Categories:

Time enough (to write) at last…

Adventures in Interactive FIction - 14 April 2008 - 3:24pm

So I didn’t get as much coding done over the weekend as I had hoped, mainly because the telephone company *finally* installed my DSL line, which meant I was up til 5:30 Saturday am catching up on the new episodes of Lost.  That, in turn, meant that most of the weekend was spent wishing I hadn’t stayed up until such an ungodly hour, and concentration just wasn’t in the cards.

However, I did get some stuff done, which is good.  Even the tiniest bit of progress counts as momentum, which is crucial for me.  If the pendulum stops swinging, it will be very hard for me to get it moving again.

So the other day, as I was going over the blog (which really is as much a tool for me as it is a way for me to share my thoughts with others), I realized I had overlooked a very basic thing when coding the whole “automatically return the frog to the fuschia” bit…

As the code stood, if the player managed to carry the frog to another room before searching it, the frog would get magically returned to the fuschia.  This was fairly simple to resolve, in the end – I just coded it so that the game moves (and reports) the frog back to fuschia before leaving the room.  I also decided to add in a different way of getting the key out of the frog – in essence, rewarding different approaches to the same problem with success.

Which brings me to the main thrust of today’s post.  I have such exacting standards for the games I play.  I love thorough implementation.  My favorite games are those that build me a cool gameworld and let me tinker and explore, poking at the shadows and pulling on the edges to see how well it holds up.  A sign of a good game is one that I will reopen not to actually play through again, but to just wander around the world, taking in my surroundings.  I’ve long lamented the fact that relatively few games make this a rewarding experience – even in the best games, even slight digging tends to turn up empty, unimplemented spots.

What I am coming to appreciate is just how much work is involved in the kind of implementation I look for.  Every time I pass through a room’s description, or add in scenery objects, I realize just how easy it is to find things to drill down into.  Where there’s a hanging plant, there’s a pot, dirt, leaves, stems, wires to hang from, hooks to hang on, etc.  Obviously, unless I had all the time in the world, I couldn’t implement each of these separately, so I take what I believe to be the accepted approach and have all of the refer to the same thing.  Which, in my opinion, is fine.  I don’t mind if a game has the same responses for the stems as it does for the plant as a whole, as long as it has some sort of relevant response.  Even so, this takes a lot of work.  It might be the obsessive part of me, but I can’t help but think “What else would a person think of when looking at a hanging plant?”

Or, as I’ve come to think of it:  WWBTD?

What Would Beta Testers Do?

I’ve taken to looking at a “fully” implemented room and wondering what a player might reasonably (and in some cases unreasonably) be expected to do.  This is a bit of a challenging process for me – I already know how my mind works, so trying to step outside of my viewpoint and see it from a blind eye is hard.   I should stop for a second to note that I fully intend to have my game beta tested once it reaches that point, but the fewer obvious things there are for testers to trip over, the more time and energy they’ll have for really digging in and trying to expose the weaknesses I can’t think of.

I’ve found one resource that is both entertaining and highly informative to me:  ClubFloyd transcripts.  ClubFloyd, for the uninitiated (a group among which I count myself, of course) is a sort of cooperative gaming experience — if anyone who knows better reads this and cares to correct what may well be a horrible description, by all means!– where people get together on the IFMud and play through an IF title.  The transcripts are both amusing and revealing.  I recently read the Lost Pig transcript and it was quite interesting.  The things people will attempt to do are both astonishing and eye-opening.  In the case of Lost Pig (which, fortunately, I had already played before reading the transcript), what was even more amazing was the depth of the game itself.  I mean, people were doing some crazy ass stuff – eating the pole, lighting pants on fire, and so on.  And it *worked*.  Not only did it work, it was reversible.  You obviously need the pole, so there’s a way to get it back if, in a fit of orc-like passion, you decide to shove it in down Grunk’s throat.

Anyway, my point is, the transcripts gave me a unique perspective on the things people will try, whether in an effort to actually play the game, to amuse themselves, or to amuse others.  Definitely good stuff to keep in mind when trying to decide, say, the different ways people will try to interact with my little porcelain frog.

Other Stuff I Accomplished

So I coded in an alternate way to deal with the frog that didn’t conflict with the “standard” approach.  I also implemented a few more scenery objects.  Over the course of the next few days, I’m going to try to at least finish the descriptions of the remaining rooms so that I can wander around a bit and start really getting to the meat of it all.  I also want to work on revising the intro text a bit.  In an effort to avoid the infodumps that I so passionately hate, I think I went a little too far and came away with something a bit too terse and uninformative.  But that’s the really fun part of all of this – writing and re-writing, polishing the prose and making it all come together.

Whattaya know.  Midnight again.  I think I’m picking up on a trend here.

Categories:

Day Nothing – *shakes fist at real life*

Adventures in Interactive FIction - 8 April 2008 - 12:13pm

Grrr… I’ve been so bogged down in work and client emergencies that progress on the game is at a temporary (no, really!  Only temporary) standstill.  I’ve managed to flesh out a few more room and scenery descriptions, but have not accomplished anything noteworthy in a few days.  Hopefully after this week most of the fires on the work front will be extinguished, and I’ll have time to dive into the game this weekend.

(She says to no one, since there’s been one hit on this blog since… it started.)

Categories:

Pages

Subscribe to As If Productions aggregator