Tag: D8

Drupal 8: trusted_host_patterns error in settings.php

In my Drupal 8 install I was getting an error about not setting the trusted_host_patterns variable not being enabled, in settings.php. This setting is not under D8 admin control. You need to directly edit the settings.php file. Ok, not difficult.

Unfortunately I was getting a permissions error every time i tried to edit the file. I tried changing the permissions but to no avail. It seems like permissions for the folder above was set too low, so I had to change that first, before I was able to save my changes to settings.php. So I then log in to D8 to see if the change cleared the error. At this point it looks like D8, or my host, reset the folder and settings.php permissions to default. For me, permissions need to be reset every time I need to do a change.

Drupal 8 New Content Type and Views

I have been doing Drupal sites since 2009. For specific sites, Drupal is really great. Obviously for other types of sites WordPress is really good. As an example I am writing this post in WordPress and not Drupal.

I created a new content type, Consumer Products, in D8, in order to track their sale price and location. This is so that I can more easily remember when, where and how much we bought a sale item. Retail has regular sale cycles, so if you can catch the product at right time in the cycle, it will be cheaper.

Drupal 8: Add Captcha to Post Comments

It sounds like a very common thing to me. You post some content, you want others to comment, comments invite bots, you want a Captcha question. In D8 by default this is turned off. Unfortunately in Drupal 8 it is also not easy to find this setting.

Here is the solution, from mmerrill219:

To add Captcha to Drupal 8 Comments one must:
– Goto “admin/config/people/captcha/captcha-points”
– Click ” + Add Captcha Point” button at top of page
– Use “comment_comment_form” as Form ID