hello,

I have installed category module + faq module but it doesn't work fine, it can't manage faq-category.
Could anyone help me, please?

|strexy

Comments

stella’s picture

Assigned: Unassigned » stella

Ok step by step below, first double check that both the 'faq' and 'taxonomy' modules are enabled.

  1. First you will need to configure a vocabulary on "Administer >> Content >> Categories >> Add Vocabulary". Call it FAQ for example. On the add vocab screen, please ensure you have checked the box for the FAQ node type.
  2. Then you will need to add some vocabulary terms (aka categories) to it. Go to "Administer >> Content >> Categories" and click on the "add terms" link beside your FAQ vocab. For each one it is necessary to enter a title, but the description is optional.
  3. Now we can start adding data! Go to "Create content >> FAQ" to create your FAQ node. Enter in the question and answer text and pick a category from the list.
  4. Once you have your FAQ nodes set up, you can configure the layout of the FAQ page at "Administer >> Content >> Frequently Asked Questions Settings".
  5. Choose the question and answer layout, e.g. "Questions inline".
  6. Enable categorization of the questions by checking the 'Categorize questions' and pick the category layout, e.g. "Categories inline".

That should be it. It's important to remember that if you have categories enabled and don't have a category/term associated with your FAQ nodes, they won't appear in the list.

Cheers,
Stella

strexy’s picture

hello,

I have made all your steps but, once checked 'Categorize questions', the questions in the FAQ page disappear. They appear only if I de-check the 'Categorize questions' option. I have installed category module in my website, it seems is not compatible with faq module..

|strexy

stella’s picture

I've upgraded my drupal installation and now it is happening for me. Will work on a fix now. Thanks!

stella’s picture

Ok, by upgrading drupal with the latest version from CVS, I was able to reproduce what you were seeing. I had to manually delete my existing FAQ vocab and terms from the db. The new steps are as follows:

  1. Enable the 'faq', 'category' and 'taxonomy' modules (category is a requirement of 'taxonomy')
  2. Set up a category container at: "Create content >> Container". I think a container is the equivalent of a vocabulary. Enter in a name for the container, e.g. FAQ and associate it with the FAQ node (that's in the "Container Information" fieldset).
  3. Then you have to add categories at: "Create content >> Category" and associate it with the FAQ container you just created.
  4. Then you'll need to re-edit your FAQ nodes and select the appropriate category from the list

Then hopefully it should work. If it doesn't, then I'm not sure what the problem is - try upgrading drupal perhaps.

Stella

strexy’s picture

where I can download the latest drupal version from CVS? What file?
And.. do I need to upgrade my db or any other db stuff?
I'm a little newbie:)

thanx

|strexy

stella’s picture

I usually get the new files by doing the 2 steps below. However, you will be downloading it from HEAD, so there may or may not be unstable code. I haven't noticed anything so far however.

cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal login
cvs -d:pserver:anonymous@cvs.drupal.org:/cvs/drupal export -r DRUPAL-5 -d output_dir drupal

There are database changes, so just follow the instructions at www.example.com/update.php

Before you upgrade I'd double check that you've done all the steps outlined in #1 because I do know that the questions and answers won't appear if you have no categories associated with the FAQ nodes or if those categories are not in the vocab which is associated with the FAQ nodes. Try running the following sql in your database to test where it might be failing:

To find the list of vocabularies associated with the FAQ node type:

SELECT v.vid, v.*, n.type FROM vocabulary v LEFT JOIN vocabulary_node_types n ON v.vid = n.vid WHERE n.type = 'FAQ' ORDER BY v.weight, v.name;

To get the list of categories/terms associated with vocabulary vid(s) you just found: (replace 123 with your vid returned with previous sql)

SELECT t.tid, t.*, parent FROM term_data t INNER JOIN  term_hierarchy h ON t.tid = h.tid WHERE t.vid = 123 ORDER BY weight, name;

To get the number of FAQ nodes associated with categories do:

SELECT t.tid, COUNT(n.nid) AS c FROM term_node t INNER JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'faq' GROUP BY t.tid;

Then ensure that the tids returned from the last sql query are in the list of those returned in the previous one.

Regards,
Stella

H3rnand3z’s picture

Take a look at http://drupal.org/node/87669#comment-225000 faq with category seem to work ok after I applied this patch had to delete and resubmit my sample faq's

strexy’s picture

ok,
I have replace this line
$node->taxonomy = $node->category;
with
$node->taxonomy = _taxonomy_categories_into_terms($node->category);
in taxonomy.module

and it seems work fine.

Thanks all:)

|strexy

stella’s picture

Status: Active » Closed (fixed)

Marking as closed.