SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fatal error: Cannot redeclare class JAdminSubMenu in /home/fotzbfnc/public_html/admin

    Can you please assist, as I don't know how to fix it -
    <?php
    /**
    * @version $Id:mod_menu.php 2463 2006-02-18 06:05:38Z webImagery $
    * @package Joomla
    * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
    * @license GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */

    // no direct access
    defined('_JEXEC') or die('Restricted access');

    // Lets get some variables we will need to render the menu
    $lang =& JFactory::getLanguage();
    $doc =& JFactory::getDocument();
    $user =& JFactory::getUser();

    // If hidemainmenu is true, we don't want to render this module at all
    echo JAdminSubMenu::get();

    /**
    * Admin Submenu
    *
    * @package Joomla
    * @since 1.5
    */
    class JAdminSubMenu
    {
    function get()
    {
    global $mainframe;

    // Lets get some variables we are going to need
    $menu = JToolBar::getInstance('submenu');
    $list = $menu->_bar;
    if(!is_array($list) || !count($list))
    {
    $option = JRequest::getCmd('option');
    if($option == 'com_categories')
    {

  2. #2
    SitePoint Addict bronze trophy
    Join Date
    Apr 2013
    Location
    Ithaca
    Posts
    344
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    The error may have something to do with more than just this script file. Apparently there is either already another JAdminSubMenu class in your script, or that this very script file is loaded twice. Perhaps it is not bad to use include_once rather than include to check the second possibility.

  3. #3
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much for the reply - I have not done any PHP editing before - where do I put the include_once - ? Any help will really be appreciated.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •