HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

2021.009 PHP Fatal error: Cannot declare class MediaModel

I cannot get the upgrade going from 2.1 at http://pochapocha.com/babilu2

A2hosting.com got this:

We found that is generating this error when the page is accessed:

~

[05-Mar-2022 02:39:56 UTC] PHP Fatal error: Cannot declare class MediaModel, because the name is already in use in . . . /babilu2/plugins/FileUpload/class.mediamodel.php on line 0

It looks like the MediaModel plugin is conflicting with something else in the site, or it has a bug. We recommend reaching out to the developer of that plugin and seeing if they can suggest anything to help.

~

A file with the same name is in /applications/dashboard/

Comments

  • KasparKaspar Moderator

    Disable FileUpload


    https://success.vanillaforums.com/kb/articles/57-uploading-files


    "This functionality is built into our editors"

    R_J
  • rus bowdenrus bowden Lowell MA

    Thanks, Kaspar. How do I do that from cPanel?

  • R_JR_J Ex-Fanboy Munich Admin

    It's a Vanilla plugin and you need to disable it from the Vanilla dashboard. If you cannot access your page because of that error, you need to edit the file /conf/config.php and search for the lines where the plugins are listed. Just delete the line where that plugin is listed.

  • rus bowdenrus bowden Lowell MA

    Thanks. I've done that. And now when going to the site, I get


    "Something has gone wrong.

    We've run into a problem and are unable to handle this request right now.

    Please check back in a little while."

  • R_JR_J Ex-Fanboy Munich Admin

    At least you do not need your hoster for that ;-)

    This is the "friendly" error message. Add this line to the config to see the actual error message: $Configuration['Debug'] = true;

  • rus bowdenrus bowden Lowell MA
    edited March 7

    Thanks, R_J.


    It's been decades since I was a Burroughs basic assembler, machine language, and COBOL programmer, even since I studied like Fortran and Pascal in college, but never applied them. Historically (not prehistorically ;-), I was there when Burroughs went from the B500 series to the B1700 multiprocessing tanks. And it has been years since I have had to address any such cPanel issues, and none like this. So discovery is happening as I clear cobwebs in the damp dark basement. Thanks for holding the flashlight.


    Here's what I got: https://pochapocha.com/babilu2/


    Fatal Error in VRadio_Plugin.Base_Render_Before();
    Class 'VRadioModule' not found
    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/plugins/VRadio/default.php
    42:     );
    43:  if (!InArrayI($Controller, $ShowOnController)) return;
    44: 
    45: $Sender->AddCssFile('vradio.css', 'plugins/VRadio');
    46: $VRadioModule = new VRadioModule($Sender);
    47:    $Sender->AddModule($VRadioModule);
    48:  }
    49: 
    50: 
    Backtrace:
    /home/wzzdbhie/public_html/babilu2/plugins/VRadio/default.phpVRadio_Plugin->Base_Render_Before();
    [/home/wzzdbhie/public_html/babilu2/library/Garden/EventManager.php:282] PHP::call_user_func_array();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:812] Garden\EventManager->fire();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:775] Gdn_PluginManager->callEventHandler();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:205] Gdn_PluginManager->callEventHandlers();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:744] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:327] CategoriesController->discussions();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] CategoriesController->index();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    Need Help?
    If you are a user of this website, you can report this message to a website administrator.
    
    If you are an administrator of this website, you can get help at the Vanilla Community Forums.
    
  • R_JR_J Ex-Fanboy Munich Admin

    The plugin VRadio is causing troubles. Deactivate it by deleting the corresponding line from the config

  • rus bowdenrus bowden Lowell MA
    edited March 7

    Thanks again, R_J,

    That resolves the vRadio, and yields this:

    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php
    757:       TagModel::instance()->joinTags($sender->Data['Announcements']);
    758:     }
    759: 
    760:     if (null !== $sender->data('Discussions', null)) {
    761:       TagModel::instance()->joinTags($sender->Data['Discussions']);
    762:     }
    763: 
    764:     $sender->addJsFile('tagging.js', 'vanilla');
    765:     $sender->addJsFile('jquery.tokeninput.js');
    Backtrace:
    /home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.phpVanillaHooks->base_render_before();
    [/home/wzzdbhie/public_html/babilu2/library/Garden/EventManager.php:282] PHP::call_user_func_array();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:812] Garden\EventManager->fire();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:775] Gdn_PluginManager->callEventHandler();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:205] Gdn_PluginManager->callEventHandlers();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:744] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:327] CategoriesController->discussions();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] CategoriesController->index();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    
  • R_JR_J Ex-Fanboy Munich Admin

    Not sure what that means. I would suggest to disable all plugins and try running /utility/update (i.e. go to your-forum.com/utility/update).

    Try that and if it is successful, re-enable all desired plugins one by one from the dashboard. Important would be to enable them one by one and to take a look at your forum after each plugin that you have enabled in order to check if the plugin has broken the forum or if it is working as expected.

    rus bowden
  • LincLinc Detroit Admin
    edited March 7

    The first line of that error is cut off, that's why it can't be identified. But it looks like the Tagging plugin is conflicting with something.

    If the first line of the error really isn't on the page, try View Source to see if it can be found there. Or your error log.

  • rus bowdenrus bowden Lowell MA

    Thanks, Linc.

    The full message shows up at the forum site here: https://pochapocha.com/babilu2/ as Debug is still true, I'll be looking at this shortly and will begin by addressing the Tagging plug in, then doing what R_J suggests.

    Rus

  • rus bowdenrus bowden Lowell MA
    edited March 15

    Taking out all plug ins yields this:


    Fatal Error in PHP.gdn_ErrorHandler();
    Unknown column 't.FullName' in 'field list'
    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/library/database/class.database.php
    499: 
    500:           // If we get here then the pdo statement prepared properly.
    501:           break;
    502:         } catch (Gdn_UserException $uex) {
    503:           trigger_error($uex->getMessage(), E_USER_ERROR);
    504:         } catch (Exception $ex) {
    505:           list($state, $code, $message) = $pDO->errorInfo();
    506: 
    507:           // If the error code is consistent with a disconnect, attempt to retry
    Backtrace:
    /home/wzzdbhie/public_html/babilu2/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.database.php:503] PHP::trigger_error();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.sqldriver.php:1831] Gdn_Database->query();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.sqldriver.php:675] Gdn_SQLDriver->query();
    [/home/wzzdbhie/public_html/babilu2/applications/dashboard/models/class.tagmodel.php:330] Gdn_SQLDriver->get();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php:761] TagModel->joinTags();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php:761] VanillaHooks->base_render_before();
    [/home/wzzdbhie/public_html/babilu2/library/Garden/EventManager.php:282] PHP::call_user_func_array();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:812] Garden\EventManager->fire();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:775] Gdn_PluginManager->callEventHandler();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:205] Gdn_PluginManager->callEventHandlers();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:744] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:327] CategoriesController->discussions();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] CategoriesController->index();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    Variables in local scope:
    [sql] 'select td.DiscussionID as `DiscussionID`, t.TagID as `TagID`, t.Name as `Name`, t.FullName as `FullName`
    from `GDN_TagDiscussion` `td`
    join `GDN_Tag` `t` on t.TagID = td.TagID
    where `td`.`DiscussionID` in (\'2485\', \'2458\', \'2461\', \'2\', \'2521\', \'2509\', \'3\', \'2520\', \'2519\', \'2516\', \'2493\', \'2506\', \'2500\', \'2495\', \'2491\', \'1576\', \'1525\', \'1194\', \'1731\', \'1209\', \'2033\', \'1280\', \'1568\', \'737\', \'293\', \'1438\', \'286\', \'2122\', \'2049\', \'1526\', \'1454\', \'1422\')'
    [inputParameters] array (
    )
    [options] array (
     'Type' => 'select',
     'Slave' => NULL,
     'ReturnType' => 'DataSet',
    )
    [returnType] 'DataSet'
    [timerName] 'dbRead'
    [tries] 2
    [pDO] array (
    )
    [try] 0
    [pDOStatement] false
    [state] '42S22'
    [code] 1054
    [message] 'Unknown column \'t.FullName\' in \'field list\''
    [uex] array (
    )
    
  • rus bowdenrus bowden Lowell MA
    edited March 15

    Putting them back yields this, where the page stands:

    Fatal Error in VanillaHooks.base_render_before();
    Call to undefined method TagModel::instance()
    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php
    757:       TagModel::instance()->joinTags($sender->Data['Announcements']);
    758:     }
    759: 
    760:     if (null !== $sender->data('Discussions', null)) {
    761:       TagModel::instance()->joinTags($sender->Data['Discussions']);
    762:     }
    763: 
    764:     $sender->addJsFile('tagging.js', 'vanilla');
    765:     $sender->addJsFile('jquery.tokeninput.js');
    Backtrace:
    /home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.phpVanillaHooks->base_render_before();
    [/home/wzzdbhie/public_html/babilu2/library/Garden/EventManager.php:282] PHP::call_user_func_array();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:812] Garden\EventManager->fire();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:775] Gdn_PluginManager->callEventHandler();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:205] Gdn_PluginManager->callEventHandlers();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:744] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:327] CategoriesController->discussions();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] CategoriesController->index();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    Need Help?
    If you are a user of this website, you can report this message to a website administrator.
    
    If you are an administrator of this website, you can get help at the Vanilla Community Forums.
    
    Additional information for support personnel:
    Application: Vanilla
    Application Version: 2021.009
    PHP Version: 7.4.28
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
    Request Uri: /babilu2/
    Controller: VanillaHooks
    Method: base_render_before
    


  • R_JR_J Ex-Fanboy Munich Admin
  • rus bowdenrus bowden Lowell MA
    edited March 15

    So done.

    Here's what the config file looks like around there:

    // EnabledPlugins
    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    // Garden
    


    And here's what going to https://pochapocha.com/babilu2/ yields with $Configuration['Debug'] = true;:


    Fatal Error in PHP.gdn_ErrorHandler();
    Unknown column 't.FullName' in 'field list'
    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/library/database/class.database.php
    499: 
    500:           // If we get here then the pdo statement prepared properly.
    501:           break;
    502:         } catch (Gdn_UserException $uex) {
    503:           trigger_error($uex->getMessage(), E_USER_ERROR);
    504:         } catch (Exception $ex) {
    505:           list($state, $code, $message) = $pDO->errorInfo();
    506: 
    507:           // If the error code is consistent with a disconnect, attempt to retry
    Backtrace:
    /home/wzzdbhie/public_html/babilu2/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.database.php:503] PHP::trigger_error();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.sqldriver.php:1831] Gdn_Database->query();
    [/home/wzzdbhie/public_html/babilu2/library/database/class.sqldriver.php:675] Gdn_SQLDriver->query();
    [/home/wzzdbhie/public_html/babilu2/applications/dashboard/models/class.tagmodel.php:330] Gdn_SQLDriver->get();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php:761] TagModel->joinTags();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/settings/class.hooks.php:761] VanillaHooks->base_render_before();
    [/home/wzzdbhie/public_html/babilu2/library/Garden/EventManager.php:282] PHP::call_user_func_array();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:812] Garden\EventManager->fire();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluginmanager.php:775] Gdn_PluginManager->callEventHandler();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:205] Gdn_PluginManager->callEventHandlers();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:744] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/applications/vanilla/controllers/class.categoriescontroller.php:327] CategoriesController->discussions();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] CategoriesController->index();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    Variables in local scope:
    [sql] 'select td.DiscussionID as `DiscussionID`, t.TagID as `TagID`, t.Name as `Name`, t.FullName as `FullName`
    from `GDN_TagDiscussion` `td`
    join `GDN_Tag` `t` on t.TagID = td.TagID
    where `td`.`DiscussionID` in (\'2485\', \'2458\', \'2461\', \'2\', \'2521\', \'2509\', \'3\', \'2520\', \'2519\', \'2516\', \'2493\', \'2506\', \'2500\', \'2495\', \'2491\', \'1576\', \'1525\', \'1194\', \'1731\', \'1209\', \'2033\', \'1280\', \'1568\', \'737\', \'293\', \'1438\', \'286\', \'2122\', \'2049\', \'1526\', \'1454\', \'1422\')'
    [inputParameters] array (
    )
    [options] array (
     'Type' => 'select',
     'Slave' => NULL,
     'ReturnType' => 'DataSet',
    )
    [returnType] 'DataSet'
    [timerName] 'dbRead'
    [tries] 2
    [pDO] array (
    )
    [try] 0
    [pDOStatement] false
    [state] '42S22'
    [code] 1054
    [message] 'Unknown column \'t.FullName\' in \'field list\''
    [uex] array (
    )
    Need Help?
    If you are a user of this website, you can report this message to a website administrator.
    
    If you are an administrator of this website, you can get help at the Vanilla Community Forums.
    
    Additional information for support personnel:
    Application: Vanilla
    Application Version: 2021.009
    PHP Version: 7.4.28
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
    Request Uri: /babilu2/
    Controller: PHP
    Method: gdn_ErrorHandler
    
  • rus bowdenrus bowden Lowell MA
    edited March 15

    Don't know if this helps, but going to https://pochapocha.com/babilu2/admin.php, versus index.php, yields this (and I don't know how to get a code block):

    Fatal Error in PHP.include();
    Class 'Smarty' not found
    The error occurred on or near: /home/wzzdbhie/public_html/babilu2/library/Vanilla/SmartyBC.php
    15: * Smarty Backward Compatibility Wrapper Class
    16: *
    17: * @package Smarty
    18: */
    19: class SmartyBC extends Smarty
    20: {
    21:   /**
    22:   * Smarty 2 BC
    23:   *
    Backtrace:
    [/home/wzzdbhie/public_html/babilu2/vendor/composer/ClassLoader.php:444] PHP::include();
    [/home/wzzdbhie/public_html/babilu2/vendor/composer/ClassLoader.php:322] PHP::Composer\Autoload\includeFile();
    [/home/wzzdbhie/public_html/babilu2/vendor/composer/ClassLoader.php:322] Composer\Autoload\ClassLoader->loadClass();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.smarty.php:156] PHP::spl_autoload_call();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.smarty.php:125] Gdn_Smarty->smarty();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.controller.php:2230] Gdn_Smarty->render();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.controller.php:1593] Gdn_Controller->renderMaster();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
    [/home/wzzdbhie/public_html/babilu2/applications/dashboard/controllers/class.homecontroller.php:98] Gdn_Pluggable->__call();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:933] HomeController->fileNotFound();
    [/home/wzzdbhie/public_html/babilu2/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/wzzdbhie/public_html/babilu2/index.php:29] Gdn_Dispatcher->dispatch();
    Need Help?
    If you are a user of this website, you can report this message to a website administrator.
    
    If you are an administrator of this website, you can get help at the Vanilla Community Forums.
    
    Additional information for support personnel:
    Application: Vanilla
    Application Version: 2021.009
    PHP Version: 7.4.28
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
    Request Uri: /babilu2/admin.php
    Controller: PHP
    


  • R_JR_J Ex-Fanboy Munich Admin

    Mark the text that should be formatted as code and click with your mouse on the character that appears on the left side of the text input field. Sorry, I don't find that symbol here on my keyboard and I cannot make a screenshot. But you will figure it out once you know what to look for.


    There is no admin.php file, or at least: there should not be such a file.

    I haven't replied to your last post because you where repeating that FullName error and I have given the solution for this error in the comment I've linked. Not saying anything was stubborn and impolite, sorry for that!

    Please go through the comment where I tried to explain how you can solve that FullName column problem. Please ask if anything is still unclear.

  • rus bowdenrus bowden Lowell MA

    Thanks, R_J,

    Got that code block going just in time to edit the above comments. Much better.

    I misread your above comment to mean that you were saying the link you provided was where you had already said to disable plug ins, that you were reiterating.

    I've got to host a poetry challenge soon, and then go for a doctor-ordered walk. Maybe if not too spent, I will look further into the link you provided tonight. On first read-through, a lot of the conversation has to do with getting signed in, whereas I have nothing to sign into. But I will look further probably Thursday. Wednesdays are bell to bell.

    Thanks again.

    Rus

Sign In or Register to comment.