Thread: Faq Ad On

Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Posts
    6
    Plugin Contributions
    0

    application error Faq Ad On

    I have just installed the FAQ Module from the downloads and I am having a small problem. From the admin area everythings seem to be working ok, however when I try to go to the catalog to see if it is loading the page and working properly from the customers view I get this message:

    Fatal error: Class 'faq_category_tree' not found in /home/sctb08/public_html/zend/includes/modules/sideboxes/faq_categories.php on line 22

    Can somone tell me what the problem is?

    Last edited by Kim; 17 Mar 2007 at 09:37 PM. Reason: spelling correction

  2. #2
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Faq Ad On

    Error message is pretty self-explanatory: it couldn't find the class file where it was expecting it. Make sure you uploaded all the files and put them in the proper places as well.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  3. #3
    Join Date
    Mar 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Faq Ad On

    I'm sorry but it is not self explanitory to me, the file is where it belongs, it says there is an error on line 22. Here is the file, what is not right in the file.

    //
    class faq_category_tree {
    function zen_faq_category_tree($faq_type = "all") {
    global $db, $fcPath, $fcPath_array;
    if ($faq_type != 'all') {
    $sql = "select type_master_type from " . TABLE_FAQ_TYPES . "
    where type_master_type = '" . $faq_type . "'";
    $master_type_result = $db->Execute($sql);
    $master_type = $master_type_result->fields['type_master_type'];
    }
    $this->tree = array();
    if ($faq_type == 'all') {
    $faq_categories_query = "select c.faq_categories_id, cd.faq_categories_name, c.parent_id
    from " . TABLE_FAQ_CATEGORIES . " c, " . TABLE_FAQ_CATEGORIES_DESCRIPTION . " cd
    where c.parent_id = '0'
    and c.faq_categories_id = cd.faq_categories_id
    and cd.language_id='" . (int)$_SESSION['languages_id'] . "'
    and c.faq_categories_status= '1'
    order by sort_order, cd.faq_categories_name";
    } else {
    $faq_categories_query = "select ptc.faq_category_id as faq_categories_id, cd.faq_categories_name, c.parent_id
    from " . TABLE_FAQ_CATEGORIES . " c, " . TABLE_FAQ_CATEGORIES_DESCRIPTION . " cd, " . TABLE_FAQ_TYPES_TO_FAQ_CATEGORY . " ptc
    where c.parent_id = '0'
    and ptc.faq_category_id = cd.faq_categories_id
    and ptc.faq_type_id = '" . $master_type . "'
    and c.faq_categories_id = ptc.faq_category_id
    and cd.language_id='" . (int)$_SESSION['languages_id'] ."'
    and c.faq_categories_status= '1'
    order by sort_order, cd.faq_categories_name";
    }
    $faq_categories = $db->Execute($faq_categories_query, '', true, 150);
    while (!$faq_categories->EOF) {
    $this->tree[$faq_categories->fields['faq_categories_id']] = array('name' => $faq_categories->fields['faq_categories_name'],
    'parent' => $faq_categories->fields['parent_id'],
    'level' => 0,
    'path' => $faq_categories->fields['faq_categories_id'],
    'next_id' => false);
    if (isset($faq_parent_id)) {
    $this->tree[$faq_parent_id]['next_id'] = $faq_categories->fields['faq_categories_id'];
    }
    $faq_parent_id = $faq_categories->fields['faq_categories_id'];
    if (!isset($first_element)) {
    $first_element = $faq_categories->fields['faq_categories_id'];
    }
    $faq_categories->MoveNext();
    }
    if (zen_not_null($fcPath)) {
    $new_path = '';
    reset($fcPath_array);
    while (list($key, $value) = each($fcPath_array)) {
    unset($faq_parent_id);
    unset($first_id);
    if ($faq_type == 'all') {
    $faq_categories_query = "select c.faq_categories_id, cd.faq_categories_name, c.parent_id
    from " . TABLE_FAQ_CATEGORIES . " c, " . TABLE_FAQ_CATEGORIES_DESCRIPTION . " cd
    where c.parent_id = '" . (int)$value . "'
    and c.faq_categories_id = cd.faq_categories_id
    and cd.language_id='" . (int)$_SESSION['languages_id'] . "'
    and c.faq_categories_status= '1'
    order by sort_order, cd.faq_categories_name";
    } else {
    $faq_categories_query = "select ptc.faq_category_id as faq_categories_id, cd.faq_categories_name, c.parent_id
    from " . TABLE_FAQ_CATEGORIES . " c, " . TABLE_FAQ_CATEGORIES_DESCRIPTION . " cd, " . TABLE_FAQ_TYPES_TO_FAQ_CATEGORY . " ptc
    where c.parent_id = '" . (int)$value . "'
    and ptc.faq_category_id = cd.faq_categories_id
    and ptc.faq_type_id = '" . $master_type . "'
    and c.faq_categories_id = ptc.faq_category_id
    and cd.language_id='" . (int)$_SESSION['languages_id'] ."'
    and c.faq_categories_status= '1'
    order by sort_order, cd.faq_categories_name";
    }
    $rows = $db->Execute($faq_categories_query);
    if ($rows->RecordCount()>0) {
    $new_path .= $value;
    while (!$rows->EOF) {
    $this->tree[$rows->fields['faq_categories_id']] = array('name' => $rows->fields['faq_categories_name'],
    'parent' => $rows->fields['parent_id'],
    'level' => $key+1,
    'path' => $new_path . '_' . $rows->fields['faq_categories_id'],
    'next_id' => false);
    if (isset($faq_parent_id)) {
    $this->tree[$faq_parent_id]['next_id'] = $rows->fields['faq_categories_id'];
    }
    $faq_parent_id = $rows->fields['faq_categories_id'];
    if (!isset($first_id)) {
    $first_id = $rows->fields['faq_categories_id'];
    }
    $last_id = $rows->fields['faq_categories_id'];
    $rows->MoveNext();
    }
    $this->tree[$last_id]['next_id'] = $this->tree[$value]['next_id'];
    $this->tree[$value]['next_id'] = $first_id;
    $new_path .= '_';
    } else {
    break;
    }
    }
    }
    $row = 0;
    return $this->zen_show_faq_category($first_element, $row);
    }
    function zen_show_faq_category($counter,$ii) {
    global $fcPath_array;
    $this->faq_categories_string = "";
    for ($i=0; $i<$this->tree[$counter]['level']; $i++) {
    if ($this->tree[$counter]['parent'] != 0) {
    $this->faq_categories_string .= FAQ_CATEGORIES_SUBFAQ_CATEGORIES_INDENT;
    }
    }
    if ($this->tree[$counter]['parent'] == 0) {
    $fcPath_new = 'fcPath=' . $counter;
    $this->box_faq_categories_array[$ii]['top'] = 'true';
    } else {
    $this->box_faq_categories_array[$ii]['top'] = 'false';
    $fcPath_new = 'fcPath=' . $this->tree[$counter]['path'];
    $this->faq_categories_string .= FAQ_CATEGORIES_SEPARATOR_SUBS;
    }
    $this->box_faq_categories_array[$ii]['path'] = $fcPath_new;
    if (isset($fcPath_array) && in_array($counter, $fcPath_array)) {
    $this->box_faq_categories_array[$ii]['current'] = true;
    }
    // display faq_category name
    $this->box_faq_categories_array[$ii]['name'] = $this->faq_categories_string . $this->tree[$counter]['name'];
    if (zen_has_faq_category_subfaq_categories($counter)) {
    $this->box_faq_categories_array[$ii]['has_sub_cat'] = true;
    }
    if (SHOW_COUNTS == 'true') {
    $faqs_in_faq_category = zen_count_faqs_in_faq_category($counter);
    if ($faqs_in_faq_category > 0) {
    $this->box_faq_categories_array[$ii]['count'] = $faqs_in_faq_category;
    }
    }
    if ($this->tree[$counter]['next_id'] != false) {
    $ii++;
    $this->zen_show_faq_category($this->tree[$counter]['next_id'], $ii);
    }
    return $this->box_faq_categories_array;
    }
    }
    ?>

  4. #4
    Join Date
    Dec 2004
    Location
    New York, USA
    Posts
    1,198
    Plugin Contributions
    0

    Default Re: Faq Ad On

    The error is not in the file you are posting. It is coming from line 22 of /home/sctb08/public_html/zend/includes/modules/sideboxes/faq_categories.php

    If you open that file, you'll see that on line #22 it calls for the Class 'faq_category_tree'. (../includes/classes/faq_category_tree.php)

    Check to make sure that 'faq_category_tree.php' is properly located in your includes/classes directory.

    There are a lot of files with the FAQ add-on, and they each need to be carefully placed in the appropriate (respective) directories.

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Faq Ad On

    And don't just LOOK to see if the file is in the appropriate directory... it could BE THERE, but is corrupted in some way.

    Sometimes, during ftp, files get corrupted. If the file IS where it is supposed to be, over-write it with a fresh upload of the original file.
    20 years a Zencart User

 

 

Similar Threads

  1. FAQ Code
    By TurtleDove in forum General Questions
    Replies: 3
    Last Post: 8 Aug 2007, 09:10 AM
  2. FAQ Manager ?
    By winky3d in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 26 Jul 2007, 02:33 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR