Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:12:13+00:00 2026-06-03T20:12:13+00:00

I was working on a website yesterday and all was well. I was porting

  • 0

I was working on a website yesterday and all was well. I was porting it to use Smarty. I had one last page to change which didn’t require any testing since the Smarty template file didn’t really do much. I saved my work, closed everything out, and left. Earlier today, I checked the site and found that it has gone haywire. It is displaying an incorrect template for all but one page. I never changed anything with my server setup so that can’t be the problem. Pages that had previously worked flawlessly no longer work. I’ve quintuple-checked my work and can’t see what’s going wrong. In order to not post every single thing I have, I will share any code of mine that you would like to take a look at. Just leave a comment, and I will make an edit. Any ideas what could be going wrong? I am using Smarty 3.1.8 and PHP 5.3.3.

Live site

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:12:14+00:00Added an answer on June 3, 2026 at 8:12 pm

    The mix-up is occurring because (almost) all of the templates are named the same thing. As per this thread, I found that when Smarty compiles the templates, it only considers the file name, not the full path to that file. Therefor, you must specify a compile ID, which for this purpose is best to be the parent directory of the currently executing script. If you use just the __FILE__ constant, you may end up with multiple compilations of the same template if you use multiple scripts in the same directory to display the same template. So I use dirname(__FILE__) for my compile ID which should work for everybody.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a website using CodeIgniter Framework 2.1.0 that was originally working well. Yesterday,
I have a working website, where I use this expression everywhere. price.ToString(C) It currently
I have working website in PHP with a MySQL backend which has several tables
I'm working with a website and everything looks good except the one issue with
I Implemented the comments framework yesterday and it's all working great. However I have
I am working on my personal website and am learning javascript (started yesterday) -
I run a high volume website and since yesterday it's not working. My server
Copied a working website from one server to another, now I'm getting this error
I am working on website in which i want to copy the file from
I have a working website on a pre-production server, all functions are responding correctly.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.