Hello all,

I am new here, so first of all it's nice to meet you all.

I have been working on my website for the past 2 days as Joomla has let me down for the last time! Anyway, I have managed to install Drupal after a few trial and error runs. So the history:

I installed it through my hosting control panel at first, but that version (whilst it worked perfectly!) came up instantly with out of date warnings. (It was 7.x something).

I downloaded and (Finally) installed the lastest version on the website 8.3.7.

I ran in to this error:

Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.

When I tried to make my first article. I get the same problem when I try to access "account" as well. I've been googling for the past 2 hours and found a few solutions. I went in to "reports" and saw that the trusted redirect section was giving me an error, so I followed a video tutorial I found, that told me to insert some code in to settings.php in the Sites folder.

$settings['trusted_host_patterns'] = array( '^mydomain\.co\.uk$', '^.+\.mydomain\.co\.uk$',
);

Forgive me if the code is ugly, I haven't done HTML or PHP since I was 18, I'm 32 now and I'm not skilled in it at all. Where it says mydomain, I have put in my correct domain as well, just incase.

Now, when I go in to reports - there is no error! But when I try to create an article, access my account etc, it still gives me the original error.

Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.

At the moment, I'm totally new to Drupal, so please explain things to me like I'm an idiot and know nothing! Haha! :)

Thank you very much in advance guys,

Regards,
Smeep

EDIT:

Whilst playing around with it waiting for a response, I can create content! I just have to go back manually each time to my home page (wingchunwalsall.co.uk)

EDIT 2: I forgot to mention, I am running this via a webhosting service, not hosting it myself. (123-reg)

Comments

Smeep’s picture

Please accept my apologies for the bump, but it's been days now and I've made no progress. Just trying to save what little of my hair is left!

EDIT:

I have tried removing and reinstalling Drupal completely. I have reinstalled it, using a brand new database - and getting exactly the same problem. From my rigorous clicking around, I think it's because when, for example I go to click on "My Account" (one of the pages that gives the error) it's trying to go to wingchunwalsall.co.uk/user.

Which not only doesn't exist, but I guess is being classed as a redirect?

EDIT: That being said, going to wingchunwalsall.co.uk/admin/reports etc etc, all work! What the heck am I doing wrong?!

EDIT 2:

The "report" shows this:

Trusted Host Settings
Enabled
The trusted_host_patterns setting is set to allow ^wingchunwalsall\.co\.uk$, ^www\.wingchunwalsall\.co\.uk$

I've tried removing various operators as well, so that it reads correctly in the reports screen, but as you would imagine that didn't work. Is the PHP file not being read/parsed correctly?

EDIT again:

Current settings

[code]
$settings['trusted_host_patterns'] = array(
'^wingchunwalsall\.co\.uk$',
'^.+\.wingchunwalsall\.co\.uk$',
'^localhost$',
'^localhost\.*',
'\.local$',
);
[/code]