We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Template URL not found, what am I doing wrong?

How Do I?

andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Firstly, I’m an absolute newcomer to EE. We’ve just taken an existing customer’s v3 site, and upgraded it to v7. It mostly works, but one odd thing is that there are some link icons on the page, which should navigate to other templates within the site. For example

<site domain>/reports

I see that there is a ‘reports’ template group with an index page, but that URL returns ‘not found’

If I could get some quick answers on what could be causing this, I would appreciate it. We’re under a bit of pressure to get this working quickly.

       
dougblackjr's avatar
dougblackjr
23 posts
3 months ago
dougblackjr's avatar dougblackjr

Do you have an index.html inside of your reports.group folder? And can you share your folder structure inside of your templates?

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Sure. The folder structure is

/var/www/html/wtcore/user/templates/default_site/reports.group

There is an index.html within this folder

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Interesting that if I create a brand new template group, called ‘test’, I get the same problem.

       
dougblackjr's avatar
dougblackjr
23 posts
3 months ago
dougblackjr's avatar dougblackjr

Do you have a different template path set up? It almost sounds like it’s not reading the templates.

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Do you know how the template path is configured. I haven’t changed anything in the config, as this site was simply checked out from a git repo. I may have the directory structure wrong.

       
dougblackjr's avatar
dougblackjr
23 posts
3 months ago
dougblackjr's avatar dougblackjr

If wtcore is your system folder, and default_site is your site name, then you should be good in that regard.

Anything set in Enable template routes? https://docs.expressionengine.com/latest/general/system-configuration-overrides.html#enable_template_routes

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

No there’s nothing in template routes

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

I don’t really understand how the icon url link of <site domain>/reports would ever return the page though, because it doesn’t exist. Confused.

       
jelle's avatar
jelle
54 posts
3 months ago
jelle's avatar jelle

Can it be the htaccess?

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Yes I’ve been looking at .htaccess files, and that was my next question. So at the moment we have this under the httpdocs directory:

RewriteRule ^(.*)$ http://<domain name>/$1 [R,L]

Should the rewrite rule contain the full path to the location of my templates?

       
Tom Jaeger's avatar
Tom Jaeger
316 posts
3 months ago
Tom Jaeger's avatar Tom Jaeger

Hi Andrewf,

I’m wondering if this is an index.php issue.. and your web request isn’t getting routed correctly… If you add index.php into the url RIGHT after your domain and before the first segment does it then load the page as intended?

If so you likely need to add an htaccess rewrite for index.php

Thanks,

-Tom Jaeger

       
andrewf's avatar
andrewf
8 posts
3 months ago
andrewf's avatar andrewf

Yes, thanks, it’s all about the .htaccess rewrite rules. We figured out the regex magic to make it work.

👍 1
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.