I'm not sure if it's a bug or a configuration mistake.
I've installed de article module and I've created a vocabulary called "Temas de artículos". I've added two terms to the vocabulary: "Historias" and "Peripecias".
I've associated "Temas de artículos" with the article module (by choosing it in the "Article Vocabularies" setting).
Now I get a list of recent articles in "http://www.hewop.com/drupal/?q=article", but if I click on a category, I just get the message "There are currently no posts in this category." You can see it in "http://www.hewop.com/drupal/?q=article/historias"
Each time someone tries to get into a category, three new entries in the log notify me about the problem. I paste the errors here:
user error: You have an error in your SQL syntax near ') AND n.status = 1 AND '1' ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 15' at line 1 query: SELECT DISTINCT(n.nid), n.title, n.sticky, n.created FROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid IN () AND n.status = 1 AND '1' ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 15 in /var/www/drupal/includes/database.mysql.inc on line 125.
warning: Bad arguments to implode() in /var/www/drupal/modules/article.module on line 329.
warning: Wrong parameter count for array_merge() in /var/www/drupal/modules/article.module on line 329.
You can see the problem at www.hewop.com/drupal.
I know my English is not very well, I'm sorry for it. I hope you've understood me.
Thank you very much.
Antonio,
other@navegalia.com
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | article_module_patch_0.txt | 532 bytes | AgnesCB |
| #6 | article_module_patch.txt | 532 bytes | AgnesCB |
Comments
Comment #1
tomchance@www.remixreading.org commentedI've got a similar problem using version 4.6.0 of Drupal. My hierarchy is correctly shown in the main article index as follows:
- Documentation (1)
- Philosophy (4)
- Politics (12)
- Technology (47)
--- KDE (15)
(http://tom.acrewoods.net/writing)
If I go into any of the top-level categories, I get the article listings as expected. However, when I go into the 'Technology >> KDE' category, I get the message "There are currently no posts in this category.", which is quite obviously false.
No error messages show up in the logs. I've been poking around in the article.module code, but I'm currently stuck working through how it links into other areas of Drupal before I can begin to debug it.
Comment #2
buddaI also have the exact same bug in 4.6.2 Drupal with article.module :-(
Comment #3
budda...I noticed that this bug is not occuring on all terms in a vocabulary. Only some of them?!
After some debug code in the module I found the problem was due to my vocabulary terms. I'd somehow got the same term added twice in the vocab.
The article.module picks the first term based on the string. Where as when you are adding nodes, the term category menu must show the most recent term with the same name.
So basically I had two terms, each with their own term id number. Article module shows the old term id, hence no articles to list - yet its node count was based on the new/most recent term id!
Is this a module bug still?
Comment #4
JesusAddict3791 commentedI'm getting this same error. It seems to do it every time it's set to show a category that has subcategories, except for Forums. If it's only showing Forums, it doesn't give the error, but any other one that has subcategories produces the error.
Comment #5
hextraordinary commentedI looked into it and as budda said it's the term duplication in the vocabulary (in the term_data table). The problem is that I use the same vocabulary term for both stories and forum. For now, the only solution is to rename the terms so no one of them will have a duplicate name.
I would love to know of any other solution that will allow duplicate names.
Comment #6
AgnesCB commentedHere is a small patch against 4.6 that checks that the term belongs to a vocabulary that is covered by the Article module. This is a very partial fix but at least if the duplicate belongs to a category that is not supposed to be handled by the module the problem won't show up anymore.
It solves my problem, anyway...
Comment #7
AgnesCB commentedActually the base version I used is still tagged as HEAD, so I guess I could change the status of this issue to Patch. Is anybody maintaining this module right now?
Reattaching the same patch file to be picked up by patch queue, this is the first time I do this, hope I am not makin any blunders.
Comment #8
Zenko commentedwhere will I put this patch of code? instructions will be great!!
thanks.
Comment #9
AgnesCB commentedIt is a patch for article.module (from the 4.6 tarball or the HEAD in CVS).
General information on how to apply patches manually or using commonly available tools: http://drupal.org/node/34422.
Comment #10
msameer commentedClosing this. Please reopen iv still relevant.