Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
You should grab 2.1.9, released 18 March. It's what all the cool kids are doing.

Fatal error: Cannot redeclare class MediaModel

edited February 2012 in Vanilla 2.0 Help
This discussion is related to the File Upload Detect addon.

Hello, thank you for creating this plugin!

Well the problem is that i get the following error when i try to enable it:

Fatal error: Cannot redeclare class MediaModel in /xxxx/xxxx/xxxx/xxxx/plugins/FileUploadDetect/class.mediamodel.php on line 252

Best Answer


  • x00x00 MVP
    Answer ✓

    Do you have existing fileupload plugins in the plugins directory? Did you follow the instructions.

    grep is your friend.

  • ups sorry, I thought that I needed to move all my attachments plugins but the fileupload one because it is based on it.

    Thanks :).

  • fh111fh111 Vanilla Padawan ✭✭
    edited February 2012

    i get a similar error, i deleted the other FileUpload folder from my plugin directory, but still this happens when i click on any discussion

    Fatal error: require() [function.require]: Failed opening required '/xxx/xxx/plugins/FileUpload/images/oxygen-style-fileicons.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /plugins/FileUploadDetect/class.mediamodel.php on line 29

  • Please rename the folder to FileUpload moving other version of FileUpload into another folder after disabling them

    if it is named FileUploadDetect, it won't be able to find the resource.

    grep is your friend.

  • fh111fh111 Vanilla Padawan ✭✭
    edited February 2012

    i don't know how i did not read that in the description before asking. sorry :-/

    it seems to work, but for some reason the fancybox plugin does not work anymore, when using fileuploaddetect. there were no problems with the 'other' fileUpload plugin.

  • x00x00 MVP
    edited February 2012

    fancy box is just a bunch of javascript, I would check for javascript errors.

    grep is your friend.

Sign In or Register to comment.