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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Upgrading from 3.1.5 to 3.1.6 throws uncaught exception.


Go to End


7 Posts   1957 Views

Avatar
MarioSommereder

Community Member, 107 Posts

14 October 2014 at 7:17am

Hi there,

tried to update from 3.1.5 to 3.1.6 and did get the following error when doing a /dev/build:

Fatal error: Uncaught exception 'Exception' with message 'There are two files containing the "SiteTreeExtension" class: "/Users/.../cms/code/model/SiteTreeExtension.php" and "/Users/.../mysite/code/extensions/SiteTreeExtension.php"' in .../framework/core/manifest/ClassManifest.php:396 Stack trace: #0 [internal function]: SS_ClassManifest->handleFile('SiteTreeExtensi...', '/Users/...', 3) #1 .../framework/filesystem/FileFinder.php(158): call_user_func(Array, 'SiteTreeExtensi...', '/Users/...', 3) #2 /Users/.../framework/core/manifest/ClassManifest.php(311): SS_FileFinder->find('/Users/...') #3 /Users/.../framework/core/manifest/ClassManifest.php(135): SS_ClassManifest->regenerate(true) #4 /Users/.../framework/core/Core.php(102): SS_ClassManifest->__construct( in /Users/.../framework/core/manifest/ClassManifest.php on line 396

Anyone any idea? Thanks in advance!

- Mario

Avatar
ss23

Community Member, 9 Posts

15 October 2014 at 9:03pm

Have you tried deleting the temporary folder? On most Linux servers it'll be just `rm -rf /tmp/silverstripe*` or something.

A flush should fix this too, though I've had issues getting the flush to actually run when you're in this state.

Avatar
kinglozzer

Community Member, 187 Posts

16 October 2014 at 2:28am

The problem is that you’ve got a file which contains a class named “SiteTreeExtension” when there’s already a class with this name in the core code. You’ll need to rename the extension in mysite/code/extensions to something else.

Avatar
MarioSommereder

Community Member, 107 Posts

16 October 2014 at 2:29am

Ok, sounds plausible, but it did work before.

Avatar
kinglozzer

Community Member, 187 Posts

17 October 2014 at 12:43am

There was a bug which meant that duplicate classes weren’t being detected - it’d simply “override” one of them and it wouldn’t be loaded. That was resolved for 3.1.6, so that’s why it didn’t happen before :)

Avatar
MarioSommereder

Community Member, 107 Posts

17 October 2014 at 6:40pm

All right, @kinglozzer. I can definitely live with errors caused by improvements.

Thanks.

Avatar
mikeyc7m

Community Member, 19 Posts

18 November 2014 at 2:03pm

You call that a bug, I call it a feature. Removing it causes bugs.