WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

Create a bootstrap subtheme in Drupal 8

Submitted by barnettech on Wed, 07/03/2019 - 09:17

composer require drupal/bootstrap

copy the THEMENAME folder in the bootstrap starterkit folder to your themes/custom directory

Change all the filenames in the newly created directory

Create a yournewthemename.info.yml file (see the attached example file)

Make sure content in webtechkitchen.libraries.yml is named with the new themename

https://www.webwash.net/getting-started-bootstrap-drupal-8/

JSX with React within a Drupal application

Submitted by barnettech on Wed, 06/26/2019 - 14:39

"Tip: To be able to use JSX you would have to use Webpack first to compile your JavaScript file and then add it to Drupal. A good approach then would be to use the create-react-app repo to start and then just copy over the resulting js file created after transpilation and embed that. You would then not need to embed react.js separately because it is already bundled in transpilation. Setting this up, however, so that auto refresh would work and the file would be copied to Drupal, is a bit more complicated and therefore we are skipping it."

Rules for Config Management in Drupal 8 to avoid config quagmire, and developer consternation

Submitted by barnettech on Fri, 04/26/2019 - 11:02

Local development process:
Pull down latest code from the “development” branch into local with "git pull"
Run "drush updb" to update the database
Run “drush config-import” to import the database ("drush cim" is the shorthand command)
Make sure you select the 'sync' directory when asked
Make local changes
Run “drush config-export” (export to “sync” directory and remember that "drush cex" is the shorthand command)
Commit the config files in the “/config/sync” directory (ONLY COMMIT CHANGES YOU MAKE*)

The import failed due to the following reasons: These entities need to be deleted before importing.

Submitted by barnettech on Tue, 04/09/2019 - 10:04

The import failed due to the following reasons:
Entities exist of type Taxonomy term
and Vocabulary er">Complinet Titles. These entities need to be deleted befo
re importing.
Entities exist of type Taxonomy term
and Vocabulary er">Complinet Rules. These entities need to be deleted befor
e importing.