-
-
- 6 Posts
Send PM
Hi everyone,
I’ve just installed MODX and very new to it. I followed the setup as per the instructions and managed to reach the «Congratulations!» page. However, when I click the «Go To Manager» button, I get the following error:
Fatal error: Uncaught —> Smarty: Unable to load template file ‘header.tpl’ <— thrown in /Applications/XAMPP/xamppfiles/htdocs/modx/core/model/smarty/sysplugins/smarty_internal_template.php on line 219
Since I am not 100% familiar with the structure or layout of the CMS, is there something I may have missed?
Thanks in advance
Michael -
-
-
- 24,544 Posts
Send PM
The first thing to do is to see if that file is there.
You could also try re-running setup.
Also, it’s possible that file/folder permissions or ownership issues prevented the file from being written.
-
-
-
- 6 Posts
Send PM
Quote from: BobRay at Nov 21, 2016, 09:32 PM
The first thing to do is to see if that file is there.
You could also try re-running setup.
Also, it’s possible that file/folder permissions or ownership issues prevented the file from being written.
The file is definitely there, what permissions should be on the file? The installation is on my local host, if that makes a difference?
-
-
discuss.answer
-
- 6 Posts
Send PM
I ended up downloading the zip file from the website instead of installing via command line, and that seemed to do the trick.
-
-
-
- 24,544 Posts
Send PM
I’m glad you got it sorted.
-
-
-
- 206 Posts
Send PM
Quote from: memerson at Nov 22, 2016, 11:37 AM
I ended up downloading the zip file from the website instead of installing via command line, and that seemed to do the trick.
Dear memerson,
Are you still around because I have the same problem? Could you let me know how you solve step by step your issue?I ma abit anxious, because I already have a web application with MOdx and I do not want to loose resource, setting, etc. I unzip my MODx zip on local and I upload my file to the web server and then I run the installation from /setup/.
As I already have a database, I do not know I can reinstall my MODx and preserving the resources etc..
But if I could solve my issue by a simpler way, it would be great!!Thank
-
-
-
- 6 Posts
Send PM
Quote from: pierrot1010 at Oct 17, 2018, 05:13 PM
Quote from: memerson at Nov 22, 2016, 11:37 AM
I ended up downloading the zip file from the website instead of installing via command line, and that seemed to do the trick.
Dear memerson,
Are you still around because I have the same problem? Could you let me know how you solve step by step your issue?I ma abit anxious, because I already have a web application with MOdx and I do not want to loose resource, setting, etc. I unzip my MODx zip on local and I upload my file to the web server and then I run the installation from /setup/.
As I already have a database, I do not know I can reinstall my MODx and preserving the resources etc..
But if I could solve my issue by a simpler way, it would be great!!Thank
Hi, sorry — this was posted years ago! I don’t use ModX anymore, I prefer using frameworks such as Laravel and Symfony now to do my projects. I’d recommend opening a new post so it’s fresh for others to reply to.
-
За последние 24 часа нас посетили 11474 программиста и 1168 роботов. Сейчас ищут 302 программиста …
-
AlexsaiL
Активный пользователь- С нами с:
- 23 дек 2016
- Сообщения:
- 327
- Симпатии:
- 23
подскажите пожалуйста, почему в шаблонизаторе Smarty файл c расширением tpl не подключается внутри файла tpl?
Вылетает ошибка:
Fatal error: Uncaught —> Smarty: Unable to load template ‘file:header.tpl’ in ‘template/index.tpl’ <— thrown in C:OpenServerdomainsnew.Smartylibssyspluginssmarty_internal_template.php on line 163
Хотя оба файла находятся в одной папке, но стоит только вытащить файл в корень, он его сразу видит и подключает.
в index.tpl не могу подключить {include file=’header.tpl’}p.s. не нашел на форуме подходящего раздела по Smarty, решил написать в текущий.
-
Может путь не полный?
{include file=’template/header.tpl’}
-
AlexsaiL
Активный пользователь- С нами с:
- 23 дек 2016
- Сообщения:
- 327
- Симпатии:
- 23
пробовал разные пути прописывать, что то не хочет
-
- С нами с:
- 29 июн 2021
- Сообщения:
- 4
- Симпатии:
- 1
Здравствуйте, у меня была точно такая же ошибка, и я решил её так:
-
{include file=»templates/header.tpl»}
I have a smarty-test02 project, in the php/test.php file:
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/smartyHeader.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/test/test01.php');
$msg = 'hello world, this is my first Smarty!';
$title = 'Smarty Title';
$smarty->assign('title', $title);
$smarty->assign('message', $msg);
$movies_arr = array('A'=>'a film', 'B' => 'b file', 'C' => 'c film');
$smarty->assign('movie_arr', $movies_arr);
$smarty->assign('v', ['a', 'b', 'c']);
$extraTemplateVariables = array();
$extraTemplateVariables['test_list'] = ['a', 'b', 'c', 'd'];
$extraTemplateVariables['selected_product'] = '';
$smarty->assign('extraTemplateVariables', $extraTemplateVariables);
$smarty->display('test.tpl');
and its template is templates/test.tpl :
<html>
<head>
<title>{$title}</title>
</head>
<body>
{*{$title}*}
</body>
{literal}
<script lang="javascript">
function fun(){
alert('asd');// there I want to alert the $title)
}
fun();
</script>
{/literal}
</html>
but when I access the test.php by http://localhost:63342/smarty-test02/php/test.php I get bellow error:
Fatal error: Uncaught —> Smarty: Unable to load template ‘file:test.tpl’ <— thrown in /Users/sof/Desktop/TestPHP/smarty-test02/libs/sysplugins/smarty_internal_template.php on line 187
EDIT-1
In my smartyHeaders.php:
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->caching = true;
$smarty->cache_lifetime = 120;
$smarty->template_dir = './templates';
$smarty->compile_dir = './templates_c';
EDIT-2
The directory structure:
$ tree .
.
├── addon
│ └── test01_addon.php
├── cache
│ └── a521c2377356a0c5c1792bcb5adcde857b3c48e3.test.tpl.php
├── composer.phar
├── libs
│ ├── Autoloader.php
│ ├── Smarty.class.php
│ ├── SmartyBC.class.php
│ ├── bootstrap.php
│ ├── debug.tpl
│ ├── libs - Verknu�210pfung.lnk
│ ├── plugins
│ │ ├── block.textformat.php
...
│ ├── smarty_variable.php
│ ├── smartycompilerexception.php
│ └── smartyexception.php
├── php
│ └── test.php
├── smartyHeader.php
├── templates
│ ├── child.tpl
│ ├── parent.tpl
│ ├── php
│ │ └── test.tpl
│ ├── test01.tpl
│ └── test02.tpl
├── templates_c
│ ├── 3963a63f17ac1e915beafe6a28decb3ece4b8a7a_0.file.test01.tpl.cache.php
└── test
└── test01.php
| View previous topic :: View next topic | |||||||
| Author | Message | ||||||
|---|---|---|---|---|---|---|---|
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| mohrt Administrator Joined: 16 Apr 2003 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| mohrt Administrator Joined: 16 Apr 2003 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| mohrt Administrator Joined: 16 Apr 2003 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| U.Tews Administrator Joined: 22 Nov 2006 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
| U.Tews Administrator Joined: 22 Nov 2006 |
|
||||||
| Back to top |
|
||||||
| ihabzy Smarty Rookie Joined: 27 Jul 2012 |
|
||||||
| Back to top |
|
||||||
|
|
You cannot post new topics in this forum |
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
sakshi083 opened this issue
Jun 29, 2016
· 17 comments
Closed
MODX missing lexicon values
#13058
sakshi083 opened this issue
Jun 29, 2016
· 17 comments
Comments
I am new to MODX. I have installed MODX Revolution 2.2.0-pl2 (traditional) on a windows shared server.
PHP version 5.6.
After installation lexicon values are missing. No entries found under system->lexicon management.
This results in improper website back-end and front-end. I also googled the issue but I found nothing helpful.Need help.
MODX 2.2.0-pl2? That’s pretty old, any reason you didn’t install the latest stable version?
I am moving a site from another server. And, the existing site is in MODX 2.2.0-pl2. Don’t want to mess up with newer version.
I suppose it is a PHP version issue. What version do you have on the old host, what version on your local host?
On old host version is PHP 5.3 and on new host (Provided by network solutions) its 5.6.
Everything was working good on old server. On local server froent end works but back end has a very different UI. No lexicon values being fetched. Can you tell me where we code to include lexicon files?
Could you downgrade your windows shared server to PHP 5.3 to test, if it works with that version?
If not: Maybe something is misconfigured in MODX. If the backend is showing issues, deactivate compress_js/compress_css with in modx_system_settings table and clear the cache folder after this.
No, I cannot downgrade PHP Version becuse it is windows server.
And, I already deactivated compress_js/compress_css with in modx_system_settings table.
Also, cleared cache folder. but nothing works.
Is it a live site? Otherwise you should try an update to 2.5 (maybe with a few version stops between: 2.2 -> 2.3 -> 2.4 -> 2.5).
I have created a local copy with PHP 5.2.9 and everything is working fine there.
I cannot downgrade PHP version from 5.6 to 5.3 on new hosting as it is a shared server. Please help.
My guess is that if you can’t downgrade PHP, you’ll need to upgrade MODX. While I can’t guarantee it solves this issue, it will resolve tons of bugs that have been fixed since 2.2, including several security related ones.
You could upgrade the local copy to 2.5 and upload this to a different host (i.e. a subdomain) on the shared server …
I upgraded local copy to 2.5 also upgraded PHP version on local to 5.6.21. Everything works fine on local.
So, I upgraded MODX to version 2.5 on Server. Now when I run setup I get this error:
Fatal error: Uncaught —> Smarty: Unable to load template file ‘header.tpl’ <— thrown in wwwcoremodelsmartysyspluginssmarty_internal_template.php on line 219
Unable to run setup.Please help.
Does this happen when you try to run the setup? Missing files might suggest something has gone wrong while uploading/moving the files. I can not reproduce this at this end. Also, it might be smart to open individual issues dealing with different things.
@sakshi083 Did you manage to upgrade your old site?
I think this issue can be closed.
Agreed. Please move this conversation to Slack or the forums if you are seeking further support.

