Error in the Dashboard - Admin interface

edited June 2013 in Modules
Hello,

Currently I have a project developed in CI. Weeks later I discovered Fuel CMS and I decided to use its Blog module since I found it really easy to set up. Everything is working fine except for two errors I haven't been able to fix yet. The errors appear when I access the admin interface, specifically when I click the Dashboard. The following is what I get in Firebug:

GET http://localhost/newsite/fuel/dashboard/ajax 404 Not Found 63ms jquery.js?c= (line 16)
GET http://localhost/newsite/backup/dashboard 404 Not Found 47ms jquery.js?c= (line 16)
"NetworkError: 404 Not Found - http://localhost/newsite/backup/dashboard" dashboard
"NetworkError: 404 Not Found - http://localhost/newsite/fuel/dashboard/ajax" ajax

Considering I'd already developed the entire project in CI and I just wanted to incorporate my Blog afterwards, the way I merged my project with Fuel CMS was by simply having Fuel CMS in my root directory, then basically what I change is the location of the application folder in my index.php depending on the entered URL, i.e. a URL containing the word "blog" will use the Fuel's application folder.

That being said, I have two questions:
1. Has anybody run into the errors above? It is worth pointing out that normally my FUEL CMS projects work completely fine, the issue occurred when I merged my CI project with Fuel, I just can't figure out what's wrong. I guess it's something in my bootstrap? Also, the blog does work, the only issue is the errors above which in reality, do not affect my project.

2. All I really need from Fuel CMS is the blog, if fixing the errors is too complicated then I'd rather go on with my project and not worry about it. If this is the case my question is, is there any way I can just remove the entire SITE section (Site/Dashboard/Pages/Blocks, etc) from my admin interface?

Thank you for your help.

Comments

  • edited 7:07AM
    Are you using 0.93 (master branch) or the 1.0 beta?

    That error is most likely coming from the AJAX requests in the DashboardController.js file. Is it perhaps something to do with switch logic in the index.php bootstrap that it simply isn't seeing that file because it doesn't have "blog" in it?

    With regards to changing the left navigation, there is a 'nav' configuration parameter you can overwrite in your MY_fuel.php file to specify the navigation to be displayed. The default value is the following:
    // site... Dashboard will always be there $config['nav']['site'] = array( 'dashboard' => lang('module_dashboard'), 'pages' => lang('module_pages'), 'blocks' => lang('module_blocks'), 'navigation' => lang('module_navigation'), 'tags' => lang('module_tags'), 'categories' => lang('module_categories'), 'assets' => lang('module_assets'), 'sitevariables' => lang('module_sitevariables') ); // my modules... if set to empty array, then it will automatically include all in MY_fuel_modules.php $config['nav']['modules'] = array(); // tools $config['nav']['tools'] = array(); // manage $config['nav']['manage'] = array( 'users' => lang('module_users'), 'permissions' => lang('module_permissions'), 'manage/cache' => lang('module_manage_cache'), 'logs' => lang('module_manage_activity'), 'settings' => lang('module_manage_settings'), );
  • edited 7:07AM
    Admin, thanks for your reply.

    I'm using master branch, the one downloadable here https://github.com/daylightstudio/FUEL-CMS

    I think it'll help if I just show you my index.php? I'm not pasting the entire file but just the part I changed. It basically sets a different path for the application and system folders if the url contains the word "blog" or "admin". At the top I wrote a brief description of the block.

    Please let me know if you would change anything. Thank you.

    /* *--------------------------------------------------------------- * IF STATEMENT THAT SWITCHES DEPENDING ON INPUT *--------------------------------------------------------------- * * Depending on the entered URL, the IF statement switches * the location of the 'application' and the 'system' directories. * This is needed in order to use the blog on the website which was added * after the development of the project. * */ $var = explode("/",$_SERVER['REQUEST_URI']); if(in_array('blog', $var) || in_array('admin', $var)) { /* *--------------------------------------------------------------- * FUEL INSTALL DIRECTORY *--------------------------------------------------------------- * * You can load different configurations depending on your * current environment. Setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * NOTE: If you change these, also change the error_reporting() code below * */ define('INSTALL_ROOT', str_replace('\\', '/', realpath(dirname(__FILE__))).'/fuel/'); /* *--------------------------------------------------------------- * FUEL CLI (Command Line Interface) *--------------------------------------------------------------- * * You may need to alter these if you are using the CLI. These $_SERVER variables * are used for calculating the $config['base_url'] which is used in the site_url() function. * So if your output requires the correct site_url() path, you will need to change these. */ if (defined('STDIN')) { $_SERVER['SERVER_NAME'] = 'localhost'; $_SERVER['SERVER_PORT'] = 80; } /* *--------------------------------------------------------------- * SYSTEM FOLDER NAME *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. * Include the path if the folder is not in the same directory * as this file. * */ $system_path = INSTALL_ROOT.'codeigniter'; /* *--------------------------------------------------------------- * APPLICATION FOLDER NAME *--------------------------------------------------------------- * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! * */ $application_folder = INSTALL_ROOT.'application'; } else { $system_path = 'system'; $application_folder = 'application'; }
  • edited 7:07AM
    Perhaps try adding the following in the if conditional:
    if(in_array('blog', $var) || in_array('admin', $var) || in_array('fuel', $var))
  • edited 7:07AM
    Admin, your suggestion didn't solve the issue but it DID help :)

    I was a bit skeptical about adding in_array('fuel', $var) because I thought you were referring to the way you normally access the admin console, e.g. www.mydomain.com/fuel, but in my case I had made a change in MY_fuel.php

    $config['fuel_path'] = fuel/ to $config['fuel_path'] = admin/

    So I didn't think the word 'fuel' would ever show up in my url. Now looking at the error I was getting earlier (how could I not notice that before) I see the problem was not only 'fuel' but in 'backup' not being in my IF condition:

    if(in_array('blog', $var) || in_array('admin', $var) || in_array('fuel', $var) || in_array('backup', $var)) { ... } else { ... }

    Thanks for your help :)
  • edited 7:07AM
    glad it helped
Sign In or Register to comment.