2

I'm very new to Craft.

In my tutorial of craftquest i am trying to open the preview of an entry but im receiving an error.

HTTP 404 – Not Found – yii\web\NotFoundHttpException
Template not found: website.ruud.local/website.ruud.local/section/entry

When remove the value website.ruud.local in my .env for PRIMARY_SITE_URL the error is fixed.

This doesn't look right. any idea why this happens?

Ruud van de Ven
  • 206
  • 2
  • 12

1 Answers1

1

In the error it shown that the “website.ruud.local” is doubled in your PRIMARY_SITE_URL in env file. So system can’t able to find the assigned template for the page to preview it. You can add the PRIMARY_SITE_URL like shown in the image below.

enter image description here

Also do not forgot to assign the template at the bottom of your section's form like shown in below screenshot.

enter image description here

Make sure the URI is correct. URI should be the part which you want in url after your PRIMARY_SITE_URL.

Example: http://localhost/craft-project/web/about-us using this url you can able to access your about.twig template for preview.

ZealousWeb
  • 1,647
  • 1
  • 10
  • 11