Skip to main content

Docker - Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:

Build the PHP base image with apache-buster using the Dockerfile.base

Since JN blocks some libraries update and pull, follow the following steps to build the base image locally.

Run the following command to build the base PHP image:
Make sure you are in the project root directory before running the command and its a fresh window after changing the proxy

CLI using drush to drop tables in your db and reload

This is a relatively quick process, beginning with dropping the database tables

lando drush sql-drop -y

Import a MySQL database

lando db-import {filename}

such as 

lando db-import riverdev.2022-10-03-1664769553.sql.gz

Rebuild cache

lando drush cr

Finally, export your config

Selecting a search methodology

Currently, we are upgrading a site from Drupal 7 to Drupal 9.  During this upgrade, we have the opportunity to the site's search functionality and select a tool that is most suited to the website's requirements.

Running Drupal 9 locally with lando using remote files and db

Import a database

lando db-import doj.sql

Enter the MySQL database

lando mysql -h database

This action will change the prompt as you are now in mysql.  The prompt will start with

mysql>

Now change to the database that you want to use

use doj;

If you want to know what databases exist, then run

A couple of approaches to build a homepage or landing page through Drupal

2 or 3 approaches to build a homepage or landing page through Drupal

Please include any limitations & considerations of each approach

Building a homepage a few options to consider and should against a business case:

 

1. Article

An article – create a new node (assuming a least one content type exists), then using Basic Site Settings (admin > config > system), scroll down to Front Page and enter the node.nid value or alias.

A brief explanation how Drupal cache works... Include the different modules provided by Drupal to manage cache

Drupal cache is one of the major subsystems that deliver Drupal's flexibility for devs.  In a nutshell, Drupal cache is about speeding up the time to render a page to a user.  Vanish or similar pending server-side set-up makes caching more efficient.

Drupal modules - to name a few Internal Dynamic Page Cache, Internal Page Cache, System

How to get the base URL of a Drupal 9 site

My goal was to get the base URL and compare it with the URL of the link.  Was it an internal or external link?  You can get the hostname, "{your_domain}", directly from the getHost() request:

$host = \Drupal::request()->getHost();

However, if you need the schema as well, such as https://{your_domain}

$host = \Drupal::request()->getSchemeAndHttpHost();

 

Subscribe to 9.x