We have been working on making the site multilingual, and we have been creating English pages, so we haven't been able to write any new articles. This time, because of this situation, we will take a short break and briefly summarise the current state of the site and the content we are working on.
Until now I have been writing articles on the environment for running Drupal and the concepts involved in creating Drupal pages, but recently I have been working on multilingual support and creating English pages, so I haven't been able to write any new articles. I originally wrote an article summarising the overview of creating pages in the content menu, so I would like to continue writing articles on views and taxonomy. This time, because of the situation, I will take a short break and briefly summarise the current situation of the site and the content I am working on.
- Updating DrupalCore and modules
- Creating English pages to make the site multilingual
- Once the English pages are complete, we will continue with the introduction of Drupal features, and explanations of taxonomy and views
I received an update notification, so I immediately updated from Drupal Core 10.3.6 to Drupal Core 10.3.7. The update is performed using Composer. Follow the Bitnami manual and perform the following steps
- Put the site in maintenance mode as you will be updating it
- Create backups of the .htaccess, settings.php and robots.txt files
- Change the working directory to the Drupal application
- Upgrade the application using Composer and drush
- Update the database and clear the cache
- Check that the application has been updated successfully
- Restore the backups of the files
- Put the site back in maintenance mode as the update is complete
- Creates backups of the .htaccess, settings.php and robots.txt files.
$ cp /opt/bitnami/drupal/.htaccess /home/bitnami/.htaccess.backup
$ cp /opt/bitnami/drupal/sites/default/settings.php /home/bitnami/settings.php.backup
$ cp /opt/bitnami/drupal/robots.txt /home/bitnami/robots.txt.backup
- Change the working directory to the Drupal application.
$ cd /opt/bitnami/drupal/
- Upgrade your application with Composer and drush by executing the following commands.
$ drush cache:rebuild
[success] Cache rebuild complete.
$ sudo composer update "drupal/core-*" --with-all-dependencies
- Up Date Start
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 26 updates, 0 removals
- Upgrading drupal/core (10.3.6 => 10.3.7)
- Upgrading drupal/core-composer-scaffold (10.3.5 => 10.3.7) - ~ Omitted
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found. - Up Date Complete
$
- Update DB and clear cache
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.
- Confirm that the application has been updated successfully.
$ drush core:status
Drupal version : 10.3.7
Site URI : http://default
DB driver : mysql
DB hostname : 127.0.0.1
~ Omitted
Drupal root : /opt/bitnami/drupal
Site path : sites/default
Files, Public : sites/default/files
Files, Temp : /tmp - Drupal version: 10.3.7 has been successfully updated.
$
- Restores backups of .htaccess and robots.txt files.
$ cp /home/bitnami/.htaccess.backup /opt/bitnami/drupal/.htaccess
$ cp /home/bitnami/robots.txt.backup /opt/bitnami/drupal/robots.txt
With this, Drupal Core has been updated from 10.3.6 to 10.3.7.
Since we started using Drupal on Lightsail, we have updated Drupal Core from 10.3.3 to 10.3.5 to 10.3.6 to 10.3.7.
I also received a notification that Meta tag 2.1.0 had been updated, so I will update this as well. It is also possible to update from the Admin console, but I will use Composer to update it because an error occurred and I was unable to update it.
- Up Date Start
$ sudo composer update drupal/metatag --with-all-dependencies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading drupal/metatag (2.0.2 => 2.1.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading drupal/metatag (2.1.0)
- Upgrading drupal/metatag (2.0.2 => 2.1.0): Extracting archive
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found. - Up Date Complete
$
Metatag has now been updated from 2.0.2 to 2.1.0.
I am creating an English version of a website that I created in Japanese, thinking that I would try using the multilingualisation function that comes standard with Drupal.
Drupal's multilingual function does not automatically translate Japanese pages, but rather Drupal translates specified menus and fixed fields into English. You need to prepare your own translations for the articles, so I use DeepL to translate them and create
them as separate English articles, specifying English as the language setting.
The most important point is that the language setting page adds a language directory after the domain in the URL.
On my site, it would be
Japanese https://inter-est01.com/ja/article01
English https://inter-est01.com/en/article01
All pages that specify English as the language will be grouped together under /en. This will result in the English version of the site, with the menu and sidebar specified for English, and contact form fields displayed in English, etc.
We are currently working on translating the articles we have written so far on Drupal and Lifestyle, and sorting the taxonomy into English. We will summarise the actual work in a separate article.
This is a work in progress, but you can view it by selecting English from the Language menu on the top menu.
This is the main Japanese site.
Japanese.
This is a Japanese page. Since Japanese is selected as the basic language for Drupal, this is usually displayed.
This is the English website are creating.
English.
This is an English page. English has been selected as the language in Drupal. The site has been made into an English site by translating the articles and selecting English for the language of the displayed menus, etc.
This article briefly introduces the basics of creating pages with Drupal and provides some practical examples, but I would also like to introduce the information organisation functions that are one of the advantages of Drupal. The most attractive and interesting functions of Drupal are the views and taxonomy that I will introduce in the future.
This is a function that allows you to create pages with multiple category elements using taxonomy, and then extract the category elements in a specified format and display them in a specified format in a specified location. This allows you to freely arrange articles and pages in multiple locations and change the display method according to the purpose, so that you can notify viewers of information.
The flexibility of organising information using a combination of taxonomy and views is like a puzzle, but once you get the hang of it, you can organise information efficiently and as you want. I haven't mastered it yet, but this very rational concept is interesting and is also the reason I use Drupal.
I'm thinking of creating an article to explain it as soon as I've finished creating the English pages.
Taxonomy-1
This article summarises taxonomy, which is one of the advantages of Drupal and forms the basis for organising a wide range of information.