Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

There are two files containing the "i18n" class


Go to End


7 Posts   2870 Views

Avatar
Lime Blast

Community Member, 22 Posts

30 May 2013 at 7:12am

I'm not too sure how I managed to do this, but on my newly installed copy of silverstripe (installed via Composer), which worked initially, stopped working after I changed some theme files.

I'm getting Server Error 500 when trying to access the admin area, and upon checking my logs, the error its showing me is:

[Wed May 29 20:09:44 2013] [error] [client 192.168.1.108] PHP Fatal error:  Uncaught exception 'Exception' with message 'There are two files containing the "i18n" class: "/srv/www/new.sworcs.ac.uk/public_html/framework/i18n/i18n.php" and "/srv/www/new.sworcs.ac.uk/public_html/framework/i18n/i18n/i18n.php"' in /srv/www/new.sworcs.ac.uk/public_html/framework/core/manifest/ClassManifest.php:361\nStack trace:\n#0 [internal function]: SS_ClassManifest->handleFile('i18n.php', '/srv/www/new.sw...', 3)\n#1 /srv/www/new.sworcs.ac.uk/public_html/framework/filesystem/FileFinder.php(158): call_user_func(Array, 'i18n.php', '/srv/www/new.sw...', 3)\n#2 /srv/www/new.sworcs.ac.uk/public_html/framework/core/manifest/ClassManifest.php(284): SS_FileFinder->find('/srv/www/new.sw...')\n#3 /srv/www/new.sworcs.ac.uk/public_html/framework/core/manifest/ClassManifest.php(133): SS_ClassManifest->regenerate(true)\n#4 /srv/www/new.sworcs.ac.uk/public_html/framework/core/Core.php(276): SS_ClassManifest->__construct('/srv/www/new.sw...', false, false)\n#5 /srv/www/new.sworcs.ac.uk/public_html/framework/main.php(62): req in /srv/www/new.sworcs.ac.uk/public_html/framework/core/manifest/ClassManifest.php on line 361

Can anyone help? Thank you.

Avatar
Nobrainer Web

Community Member, 138 Posts

30 May 2013 at 8:37am

Hi,

It looks as if you have an extra i18 folder for some reason.
You can try to just delete the folder and files in /srv/www/new.sworcs.ac.uk/public_html/framework/i18n/i18n/

But perhaps there is even more duplicates - don't know how you managed to get them though :-)

(The error just says that there are 2 php files with the same php class inside. In this case the i18 class.

Avatar
neverthemachineforever

Community Member, 3 Posts

6 June 2013 at 8:10pm

I also received this error, and after removing i18n/i18n I received similar messages about other modules.
Realizing that every subdirectory of framework/ had been duplicated, I ran a (messy and mildly dangerous):
<code>
for i in `find ./ -maxdepth 1 -mindepth 1 -type d -exec basename '{}' \;`; do rm -r $i/$i; done
</code>
from within the framework folder to delete all duplicates.

Now I'm getting a
Fatal error: Based on their before & after rules two fragments both need to be before/after each other in /var/www/gethomesafe-website/framework/core/manifest/ConfigManifest.php on line 319
With only one forum post here: http://www.silverstripe.org/upgrading-silverstripe/show/20869

Similar to OP, I installed via composer, and deployed with git. framework/ is git tracked by default, and the duplicates appeared after a composer update. Perhaps I should .gitignore framework/?

This to me seems a fairly common deployment use case, so I'd be interested to hear if anyone has a cure.

Avatar
neverthemachineforever

Community Member, 3 Posts

9 June 2013 at 10:36pm

Edited: 09/06/2013 10:37pm

Just in case anyone else has this problem, my second issue (coming from ConfigManifest.php), was resolved by also deleting the duplicated folders within the /cms folder. I have the same issue every time I deploy my application to a new location and run a composer update ;(
Naturally follow this up with a request to /dev/build

Avatar
Lime Blast

Community Member, 22 Posts

25 June 2013 at 10:41pm

Does anyone have a suitable fix for this? Is this the fault of Silverstripe or of Composer?

Avatar
kinglozzer

Community Member, 187 Posts

26 June 2013 at 1:17am

It's an issue with composer I believe, the only fix is to delete cms/ and framework/ and then run composer update

Avatar
MartinPhone

Community Member, 57 Posts

3 March 2014 at 12:57pm

FWIW I have just downloaded and unpacked SS3.1.2 manually from the website and there are two folders there containing the i18n classes.

Having a bit of trouble making that build work at all if I'm honest.