Unlimited WordPress themes, graphics, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:33Length:3.7 hours
Drupal 8 1
  • Overview
  • Transcript

4.1 Basic Site Configuration and Troubleshooting

To this point, we've been focusing on some of the finer details of creating sites. Sometimes you have to take a step back to be able to see the forest through the trees. We need to be able to change simple things on the site like the header and sub-header. Not only that but we need to be able to find general issues with the site and find ways to fix them.

4.1 Basic Site Configuration and Troubleshooting

Another one of the more obvious pieces of our Drupal site to this point that we haven't really touched. That's been kind of in our face the entire time is this poor guy right here, Drupal. Now I'm not saying that Drupal in and of itself is a poor guy. But that's probably not going to be the name of your site. That's probably not what you're going to want in the header bar. And how do we play around with that and actually change that a little bit? Well it's actually quite simple, we're going to actually go to Configuration within our sites. So let's click this and a couple things are going to jump out at us. Obviously the first thing that's going to jump out here is this little error we have right here. Now this doesn't show up everywhere within the site but it does show up when you go into Configuration. And this is another thing that's gonna become very obvious to you very quickly. Is that a lot of times the configuration tool is linked to the Reports tool. Because it's gonna say there are one or more problems that were detected with your installation and to check the status report. So you're gonna find yourself going back and forth between Configuration and Reports quite a bit. So obviously once you're in Reports you can check the available updates. We already kind of talked about that in a previous lesson. But it will tell you to come down here to the status report. So I can go ahead and click on this. And if I scroll down a little bit I'm going to get to a point where there is an issue. And the issue here is with trusted host settings. Now it just says that this is not enabled and this is highly recommended. So meaning there's not an error with your site right now. But there is a recommendation that you're currently not taking advantage of. And I'm not going to fix this in my instance. But I'm going to show you how to kind of troubleshoot these things. And use Drupal and its documentation to show you how to take care of these issues should you choose to do so. So it says here that the trusted host patterns setting is not configured within settings.php. And it tells you that this can lead to a security vulnerability and it's highly recommended that you take care of this. Well, how do I take care of that? What exactly do I have to do? Well it just so happens that it's very helpful to say you should go and check out this link for more information. So let's go ahead and open this up in a new link or in a new tab. We'll hop over here and it will take me to exactly this issue within drupal.org. And it's going to show me what this issue is, when it was introduced, the scenarios in which I could run into problems with this. As well as how to handle it and how to fix this within my site. So the very bottom it's gonna show me that I need to go into my settings.php file. And I'm going to need to add in a configuration setting for trusted host patterns, and set it equal to an array. And it's going to show me a regular expression or how to put in a regular expression that's going to make this problem go away. So just something to keep in mind when you are looking through your configuration and maybe see an error there. And how to use the report section to learn more about that. So, back to the problem at hand. I want to be able to change the title that shows up within my header. So, to do that I'm gonna come over to Basic site settings. And I'm going to modify some of the site details that we find here. So this is where that text comes from, this site name is Drupal. And instead of that maybe I would call this My Cool Site Name and you can give it a slogan if you want. The Best Site Ever, like that. And then, we can give this an Email address. Which is going to show up in the From address. And any sort of automated emails that get sent out to people that are using your site. Either when they sign up or when they activate or things like that. So, once I've made those modifications, I can also come down here and I can specify the Default front page of my site. As well as any sort of custom error pages that I might have created. So if there's a 403 where it's an access denied, what page do I want to display? Or a 404 if they try to go to a URL that doesn't exist within my site, what do I want that page to look like? So let's go ahead and save our configuration. We'll go back to our site. And now you're going to see that I have My Cool Site Name, which is the site name. And then I have The Best Site Ever which is going to be that that sub name that shows up within the site as well. Now another interesting thing that you can do within Configuration is if we were to head over to Account Settings. And if we take a look at this this has a little bit to do with how different types of users are handled. But if you go down to the bottom. You can see information about registration and cancellation. And you can also see the emails that are sent out. So you can come in here and you can actually modify the emails that are being sent to. New users when they're awaiting approval on welcomes. To administrators when there is a user awaiting approval, a welcome email. Account activation, your account has been blocked. You can go in here and modify all of these things to your heart's content. And when all of this comes into play is when you start dealing with new registered users of your site. As well as new people that we add in to the site. And that's what we're going to talk about next.

Back to the top
Continue watching with Elements