Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » There are two files containing the "i18n" class

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

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

Page: 1
Go to End
Author Topic: 659 Views
  • Lime Blast
    Avatar
    Community Member
    22 Posts

    There are two files containing the "i18n" class Link to this post

    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.

  • Nobrainer Web
    Avatar
    Community Member
    134 Posts

    Re: There are two files containing the "i18n" class Link to this post

    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.

  • neverthemachineforever
    Avatar
    Community Member
    3 Posts

    Re: There are two files containing the "i18n" class Link to this post

    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.

  • neverthemachineforever
    Avatar
    Community Member
    3 Posts

    Re: There are two files containing the "i18n" class Link to this post

    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

  • Lime Blast
    Avatar
    Community Member
    22 Posts

    Re: There are two files containing the "i18n" class Link to this post

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

  • kinglozzer
    Avatar
    Community Member
    138 Posts

    Re: There are two files containing the "i18n" class Link to this post

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

  • MartinPhone
    Avatar
    Community Member
    51 Posts

    Re: There are two files containing the "i18n" class Link to this post

    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.

    659 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.