Can´t see the web site when i am logged in

Hi, If i´am logged into the cms, the website don´t work and fires the following message:

Error Number:

SELECT location, location FROM (`fuel_pages`) ORDER BY `location` asc

Filename: /home/enacom2015/public_html/fuel/modules/fuel/core/MY_Model.php

Line Number: 1136

I have a portion of code in a "sidebar" block:

$CI =& get_instance();
$CI->load->model('Gallery_model');
$side_gallery = $CI->Gallery_model->GetGalleries();
$side_result = $CI->Gallery_model->GetGalleryPics($side_gallery[0]->ID, true,true);

If i remove this code, the website is ready again. Which is the issue with this ?
*** this error is only if iam logged in ***

Thanks in advance,

Comments

  • edited May 2015
    That query that it displays in the error is a valid query for FUEL (you can copy it and paste it into your MySQL manager and execute it it without errors). Is there something in the Gallery_model where it's referencing a different database or using a different connection?

    What is the SQL that is displayed if you use the debug_query() method after you call GetGalleries and GetGalleryPics:
    $side_gallery = $CI->Gallery_model->GetGalleries(); $CI->Gallery_model->debug_query(); $side_result = $CI->Gallery_model->GetGalleryPics($side_gallery[0]->ID, true,true); $CI->Gallery_model->debug_query();
  • edited 12:28PM
    I have " fatal error: Call to undefined method Gallery_model::debug_query() "
  • edited 12:28PM
    Hey! i´ve found the bug. Each Model´s function have a load() and close() method that is clashing with the Fuel model. When i did Remove this, the problem was fixed.

    I´ll report this issue to the Author of this great Module.

    Regards and thanks for your time!
Sign In or Register to comment.