Closed (fixed)
Project:
Frequently Asked Questions
Version:
5.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Sep 2007 at 17:53 UTC
Updated:
2 Nov 2007 at 11:31 UTC
As I enter FAQs, they come up in the FAQ list newest first. Editing the order using Frequently Asked Questions Settings > Weight occasionally works but most often is ignored.
I'm using the opens/hides under category option (slick!).
Any ideas?
Comments
Comment #1
stella commentedThe only thing I can think of is that maybe you don't have javascript enabled... but if that was the case, you wouldn't be able to move the questions up or down, so it's prob not that. Are any javascript errors produced? What browser are you using? Does it happen in all browsers? You can check for javascript errors in Firefox's Error Console (under Tools menu).
When you say the order isn't applied, is it (a) the order isn't saved to the database or (b) the order is saved but doesn't change the faq page?
Cheers,
Stella
Comment #2
StephanieM commentedJavascript is enabled and the questions move on the update page. I save the changes, but the order on the FAQ page is unchanged. Where would I look to see if the database itself is being updated?
I'm using Safari. Viewing the FAQ pages in Mac Firefox does not correct the order. Updating the order in Firefox doesn't help either. Neither does emptying the browser cache.
There are no Javascript errors produced.
Sigh...
Comment #3
stella commentedThe easiest way of checking whether the database has changed or not is to change the order of the questions and save. Check if they were applied to the faq page (maybe clear cache to be sure), if not, return to the order config screen and see if your new order still appears on the config screen or whether the old order does. I need to know whether it is the save that's not working or the application of the saved order to the faq page that's not working.
Assuming you're using mysql, you can send me a dump of the faq_weights table before and after the order change - this table just contains the node id, category id and weight, no real sensitive info. You can do a dump like:
Obviously, replace "username", "password", "mydatabasename" and "my_faq_weights_dump_file" with appropriate values.
Are you using categories by the way?
Cheers,
Stella
Comment #4
StephanieM commentedHi Stella:
Sorry for the delay in responding. The weights are changing in the faq_weights table and the display appears to follow what's there; however there are a few cases where a node exists and is displayed but doesn't appear in the faq_weights table. Certain nodes appear twice (FAQ is on more than one list), which makes sense.
I'm using categories (the taxonomy module, not the Categories module which broke all kinds of stuff). I do have a couple of FAQ lists with the same name but different taxonomies (e.g. General and Wireless >General.
Cheers!
Comment #5
stella commentedSorry your last comment has confused me slightly, namely
The weights are changing in the faq_weights table and the display appears to follow what's there. I thought the problem was that the display on the faq page wasn't being updated. Can you clarify this for me?Regarding nodes that appear on the faq page but aren't in the faq_weights table, this is usually because the nodes were added after saving the order, and so no weight has been associated with them. In such cases, the node is treated as if it has a weight of 0, so it appears at the top of the list (maybe this is the problem?). If more than one node has the same weight, then they are order by the "sticky" flag and then their creation date descending.
Taxonomy module is what is supported for categorisation of faq nodes. Likewise, I had serious problems with the "Category" module. If a node is in more than one category, then it will appear on the "faq" page multiple times - once under each category it's in. The ordering of faq nodes, when using categories, is done on a per category basis. The faq category names don't matter as they are referenced using their term id (tid).
Cheers,
Stella
Comment #6
StephanieM commentedHi Stella:
I'll check into the unweighted nodes scenario. Some lists appear to work properly but others exhibit the non-reorderable bug.
Since I have only a few FAQs right now, I'm okay with emptying the faq_weights table and re-weighting everything. Will this break things?
Cheers!
Stephanie
Comment #7
stella commentedActually clearing out the faq_weights table is not a bad idea. I don't know how the data could get messed up in in, or even how messed up data would cause problems, but you should certainly try it. You won't loose any data other than the order of the nodes. I must admit I'm kinda out of ideas at this point, not what you want to hear I know!
Cheers,
Stella
Comment #8
StephanieM commentedHey Stella:
Good news (I think): I emptied the faq_weights table and rebuilt it for all my FAQ and it now appears to work as expected. Sigh. The problem may have been leftovers from when I was experimenting with the Categories module.
Just found another oddity which is probably unrelated: subcategories display incorrectly. I have a category structure (using Taxonomy, not Categories):
General
-Accounts
-Email
-Other resources
When I display all my FAQs (at faq/ with no number), I see
General
-Accounts
-Email
-Other resources
expanded as shown. I have the "Show sub-categories on FAQ category pages" option checked so that's okay; however when I click on General, expecting it to compact, I get instead:
General
-Accounts
-Email
-Other resources
-Accounts
-Email
-Other resources
At this point, clicking "General" removes the duplicate subheads. The same FAQs appear under both instances of the subheads (I use the expand answer in place format).
It would be nice if the "Show sub-categories on FAQ category pages" worked like an initial state.
Thanks for your help!
Comment #9
stella commentedHi Stephanie,
Does sound like it may have been a problem with the Category module alright. I remember having terrible problems when I tried using that. It broke all my image galleries and other stuff. It's supposed to be compatible with anything that uses taxonomy but I really don't think so. Let me know if the ordering breaks again - just re-open the issue. Will set it to fixed for now.
Regarding the other problem, can you open a separate issue? Perhaps also include the page source (or send it directly to me via my contact form) or send me a url if it's available publicly. Oh, and include all the faq settings you're using so I can try to reproduce here.
Cheers,
Stella
Comment #10
StephanieM commentedHi Stella:
Arrgh. The non-reordering FAQ issue has resurfaced (or perhaps was insufficiently tested.) Here's what's happening:
Go to http://www.ots.sfu.ca/ots/demo - no need to login.
Under "Getting help" click "General questions". you'll get a FAQ page with three categories. Note that the URL is .../faq/83.
Click "Accounts" and note the order of the questions that expand. ("I can't login" is supposed to be first, "Fair Use" is supposed to be last.) Also note that the URL for the "Accounts" FAQ is .../faq/84.
Now go to .../faq/84 to see the Accounts category FAQ by itself, without subcategories. The questions appear in the correct weighted order. (Also works if you right-click "Accounts" and open in a new window.)
The same applies for the other categories on the page.
It's as if the faqs aren't getting sorted as the page is compiled if there are subcategories involved.
Cheers!
Comment #11
stella commentedHmmm, interesting. I'm not sure if I tested subcat ordering on the main category page. It definitely sounds like a bug alright. I'll take a look and get back to you.
Cheers,
Stella
Comment #12
stella commentedHi,
I figured out the problem and have fixed the version in CVS. I can't easily create a patch for you because there have been a number of other changes since the last release. However, you can either take it from CVS or use the next dev version which should be available within next 12 hours. Don't worry, the CVS/dev versions are stable.
If you can confirm that this fixes the issue for you, I'll make an official release soon.
Cheers,
Stella
Comment #13
stella commentedReleased in faq 5.x-2.5.
Cheers,
Stella
Comment #14
StephanieM commentedSorry to get back to you so late. It's really mixed up now...
The ordering appears to work, but in the scenario I described earlier, the opens/hides answers under question option doesn't work. I can expand and collapse categories properly, but the questions are always expanded. Clicking on them opens a new page. I've tried the other options and they're a little odd too:
- answers further down the page doesn't display categories: the page is empty if there are only categories to be displayed on it, although it works fine for single-category pages
- questions inline works as I would expect and will display categories
- answer in new page seems to work properly
Sigh... I'm going to switch back to faq-5.x-2.4 for our main site for now, but can easily test stuff for you.
Comment #15
stella commentedHi Stephanie,
Resetting this issue to active. Can you tell what your other categories settings are? Can you ensure you updated the javascript and css files too - not just the faq.module file. The javascript and css have changed - you may need to flush your browser cache for these settings to take effect.
Cheers,
Stella
Comment #16
StephanieM commentedHey! Works like a charm! Clearing the cache appears to have finally done it, since I had simply unzipped and untarred the file to replace all the files in the faq module directory.
Thanks for your help!
Stephanie
Comment #17
stella commentedThat's great! Sorry to took so long to get it working correctly for you. Please let me know if you have any further problems.
Cheers,
Stella
Comment #18
nancydruHere's a little tip for you: Disabling and enabling modules clears the cache. Rather than just replacing the module, you're safer actually disabling and re-enabling it. (Besides, some modules do special things when enabled [hook_enable]).
Comment #19
(not verified) commented