Sgoettschkes
Sgoettschkes

Reputation: 13214

symfony1.4 I18nHelper.php not found

I deployed my symfony 1.4 project from my local machine (Windows 7) to my test server (Linux Ubuntu Server). Whenever I open this project through my browser (IE, FF...) I get an Error 500 which is most certainly caused due to an error which I get from the log/frontend_staging:

"symfony [err] {InvalidArgumentException} Unable to load "I18nHelper.php" helper in: SF_ROOT_DIR/apps/frontend/lib/helper, SF_ROOT_DIR/lib/helper, SF_ROOT_DIR/lib/vendor/symfony/lib/helper."

The File I18NHelper.php is located in SF_ROOT_DIR/lib/vendor/symfony/lib/helper, so I don't see a problem there. I already played with the naming, though some people mentioned they had trouble with the uppercase N in the Helpers name on Unix systems, but this didn´t solve my problem at all.

Upvotes: 0

Views: 581

Answers (2)

Przemek
Przemek

Reputation: 6700

You have misspelled the helper's name The last "N" should be uppercase.

In templates it should look like:

<?php use_helper('I18N'); ?>

If you are modifying the settings.yml it should look like:

standard_helpers: [Partial, Cache, I18N]

You have to keep in mind that symfony YAML configuration files are cached as php files. If you don't clean your cache, your changes won't be applied (depending on the environment of course). Try using:

php symfony cc

from command line, it should fix it.

Upvotes: 1

Grad van Horck
Grad van Horck

Reputation: 4506

It's a very nasty little thing:

Use <?php use_helper('I18N'); ?> instead of <?php use_helper('I18n'); ?> (Mind the upper case of the last 'n').

Linux is case-sensitive, unlike Windows.

Upvotes: 4

Related Questions