Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Fatal error: Cannot redeclare class MediaModel

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

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
    Accepted 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.