WordPress.org

Ready to get started?Download WordPress

Forums

Articles plugin - failure to display categories/articles (29 posts)

  1. khaosx
    Member
    Posted 6 years ago #

    I've run into a problem using the "articles" plugin from Alex King, and I'm hoping someone can help me out. This is on WP 2.3 with the latest version of the plugin. I have done an upgrade on my WP install, as well as a complete wipe and reinstall to troubleshoot this issue.

    As long as I leave all my categories alone, and never delete or modify them, the plugin works as expected. As soon as I delete a category, I get some major weirdness:

    1. Categories fail to display. For example, I have a category named "My Lists", with one post in it containing the article property. That category never shows up on my articles listing. I can tag articles with multiple categories (My Lists and uncategorized) and the article will show up under any added categories EXCEPT "My Lists" on the articles page. This is not limited to a single category.

    2. Articles show up under the wrong category. I have seen articles that are not a member of a specific category show up under that category.

    Any ideas, or any additional information I can provide?

  2. jhsesq
    Member
    Posted 6 years ago #

    I have exactly the same problem. The plugin was working beautifully before I upgraded to 2.3.

    I have tags and categories.

    When I publish the page where I want the articles to be listed, some show up and some don't. The ones that are there are listed under the wrong heading.

    Alex said the plugin was ready for 2.3. It obviously isn't. I tried uninstalling and reinstalling it after adding tags to every post . . . no difference.

    I'm baffled and any assistance would be appreciated because I really like this plugin and the list it generates.

    Thanks.

  3. Alex King
    Member
    Posted 6 years ago #

    Funny, the person who started this thread contacted me again and said that he no longer has any problems...

    I can't reproduce this issue and I've never seen it, so I don't know what to tell you.

  4. khaosx
    Member
    Posted 6 years ago #

    I was actually going to close this issue tonight. I can't tell you what fixed the issue, but I can tell you what I did that caused it to no longer happen.

    Initially, I deleted all of my categories, wiped my database and restored everything from a WP XML dump. This did not have any effect. As soon as I deleted a new category, it refused to show up in the article list.

    After an inadvertent deletion of my backup file and a second wipe of the database, I found a copy of a SQL dump generated by the WP Automatic Upgrade plugin (which I have not reinstalled), and restored it via my SQL admin tool. I then went through the upgrade process again, and reloaded all my plugins. The problem has not cropped up since.

    Essentially, I:

    1. Wiped the database
    2. deleted my entire web root
    3. Installed 2.2 series
    4. Restored from a SQL dump, NOT a WP backup
    5. Resinstalled all plugins
    6. Configured site back to normal.

    It's a royal PITA, but at least the problem hasn't shown up again. I've tested every scenario that I could think of to make it break, and it just doesn't.

    3

  5. GregF
    Member
    Posted 6 years ago #

    I have the same issues on a completely new, clean install of 2.3. A new database was created for it and Articles is the only plugin. Alex, I will contact you privately, so that you can see an example of the problem.

  6. andycowl
    Member
    Posted 6 years ago #

    I am running WP 2.3, no tags just categories. I had a stray link category that meant my term ID's didn't exactly match the taxonomy ID's.

    After a little digging, I think the join to find the categories may be incorrect. Here is a patch that fixed it for me.

    Don't bother telling me this isn't pure mySQL syntax. I work for Oracle and that's the way I write my SQL joins :-)

    Hope this helps.

    $ diff articles.php.orig articles.php
    99,104c99,102
    < FROM $wpdb->term_relationships
    < LEFT JOIN $wpdb->terms
    < ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->terms.term_id
    < LEFT JOIN $wpdb->term_taxonomy
    < ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id
    < WHERE $wpdb->term_relationships.object_id IN (".implode(',', $post_ids).")
    ---
    > FROM $wpdb->term_relationships, $wpdb->terms, $wpdb->term_taxonomy
    > WHERE $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
    > AND $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id
    > AND $wpdb->term_relationships.object_id IN (".implode(',', $post_ids).")

  7. GregF
    Member
    Posted 6 years ago #

    Unfortunately, applying this SQL change made no difference for me. I still have posts appearing in the wrong categories and posts added to a new category not appearing at all.

    I am also getting an error when switching between one column and two column display, on the Options|Articles page. When I click the Update Articles Setting button, it returns the error "Cannot load articles.php". However, the column format of the articles page does change.

    This plugin does exactly what I need (and I have not found any others that do), so I really hope that these issues can be resolved.

  8. jhsesq
    Member
    Posted 6 years ago #

    I would love it if someone would explain the problem to me in ENGLISH. I have no idea what any of those explanations mean.

  9. andycowl
    Member
    Posted 6 years ago #

    I tagged a blog post as an article by adding the custom field 'article'. The original blog post was posted in the categories 'UK' (ID=32) and 'Humour' (ID=43).

    The Articles page was displayed and included the blog post. However, the categories associated with the blog post were incorrectly displayed on the articles pages as 'Gadget' (ID=31) and 'Podcast' (ID=42) in my case.

  10. chipseo
    Member
    Posted 6 years ago #

    I am having the same problem... this is on a totally clean install of the new WP version.

    When I add a post to my articles page it is adding a heading from random (it seems) from my cat list. Since this was a clean install I am using the tags more than the cats but it still shows up wrong?

    I would love to use this plugin, it looks great, but I can't with headings that look this bad :)

  11. khaosx
    Member
    Posted 6 years ago #

    Well, it happened again - the list broke. I edited a post which was showing up as an article, added a category, assigned the post to the new category, and removed the post from the previously assigned category.

    The new category will not show up in the articles list. If I assign the article its original category, it will show up on the articles page as before, but only in the 1st category. Nothing assigned to the new category will show up on the articles page.

  12. ringostar
    Member
    Posted 6 years ago #

    the article plugin was working until WP 2.3

    both methods of inserting articles aren't working
    the token or the php code, no articles are showing up

  13. ringostar
    Member
    Posted 6 years ago #

    something i've been finding out, the plugin works on one wp 2.3 install but not another, i think it has to do with old plugins leaving their junk in the database, am cleaning it out but have yet to figure out what the heck is preventing the plugin from working

  14. bholman
    Member
    Posted 6 years ago #

    I had this problem -- posts showing up in the wrong categories. Andycowl's fix worked for me!

  15. Stephen Cronin
    Member
    Posted 6 years ago #

    Andy Cowl's suggested fix has worked for me as well.

  16. dark13star
    Member
    Posted 6 years ago #

    I was just having all kinds of strange issues with certain categories working and others wouldn't show on my article page. Andycowls fix worked here too.

  17. bilderboy
    Member
    Posted 6 years ago #

    If you want to show all articles in your article index remove
    "AND $wpdb->postmeta.meta_key = 'article' AND $wpdb->postmeta.meta_value = '1'" from line 80

  18. Elmar2
    Member
    Posted 6 years ago #

    Yep, Andy(cowl). Thank you, ist works just fine.

    I think, the idea for the plugin is perfect. Until I found ist, i didn´t know, how badly i needed it and i´m grateful for Alex to provide the plugin. But now, this post is two month old an i´m not the only one encountering this problem.

    Isn´t it overdue to release a new version for this plugin? Probably many are testing this plugin, have the same problems as we have, and do not find the way to Andy`s solution. A pity.

  19. Elmar2
    Member
    Posted 6 years ago #

    and it´s a pity too, that my comment on Alex´ blog, where i tried to show him this problem and this thread, was sent to hell. Nevermind, the plugin works for me now... *shrug*

  20. copperblade
    Member
    Posted 6 years ago #

    Thanks andycowl, it worked. In case anyone's interested, I have edited the plugin to simply display all posts, but not pages (without needing article=1). Just replace the query in aka_get_articles to:

    $posts_data = $wpdb->get_results("
    SELECT $wpdb->posts.*
    FROM $wpdb->posts
    WHERE $wpdb->posts.post_status = 'publish'
    AND $wpdb->posts.post_date_gmt < '$now'
    AND $wpdb->posts.post_type = 'post'
    GROUP BY $wpdb->posts.ID
    ORDER BY $wpdb->posts.post_date_gmt DESC
    ");

    As you might assume you can change 'post' to 'page' if you want to display only pages and not posts!

  21. aesthetist
    Member
    Posted 6 years ago #

    is there a way to just list posts within a specific category?

    i want to show all posts under the 'recipe' category

    so it would look like so:

    -----------------------------

    Breads
    - Simple Bread

    Desserts
    - Many Hands Make Gingerbread
    - Chocolate Bark
    - Homemade Applesauce

    Soups
    - Matzoh Ball Soup
    - Butternut Squash - My Favorite Soup

    -----------------------------

    you get the idea

    thanks!

  22. Robberto
    Member
    Posted 6 years ago #

    I'd love this plugin if it would work. Want to try Andy's solution. But where exactly do I put the code he proposed?

    Thanks!

  23. sjashe
    Member
    Posted 6 years ago #

    I've had the same problem since 2.3 upgrade (tags are probly the problem).

    The SQL for the categories is very hard to read, only because I can't find a good description of the tag "term" tables.

    Alex, if you look at the articles tab on http://www.dracutforum.net, then look at the individual articles, you'll see an example of how posts and pages are appearing under wrong categories.

  24. sjashe
    Member
    Posted 6 years ago #

    andy cowls fix worked for me here too.

  25. justkaty
    Member
    Posted 6 years ago #

    I am having the same issue. It is listed on my articles page posts under the incorrect categories. I am unsure of how to apply Andy Cowls fix. Any help is greatly appreciated!

  26. emhouston
    Member
    Posted 6 years ago #

    Thanks Andy Cowl, this fix worked for me as well (Running on Wp 2.3.3}. To apply the fix, just replace the code in the top part of the fix with the code in the bottom. Corrected everything.

  27. thehealthyskeptic
    Member
    Posted 6 years ago #

    THANK YOU! I spent hours trying to figure out what I was doing wrong, and I just discovered this thread. Andy's solutions worked perfectly.

  28. Michael K.
    Member
    Posted 6 years ago #

    Okay, I tried Andy Cowl's fix and it worked. Sort of. Now I'm getting both categories and tags displayed. I just want it to be category and the articles, no tags at all.

    Any help? Maybe because I'm trying to apply this to WP 2.5.

  29. caprica
    Member
    Posted 5 years ago #

    I am having the same problem as well as mmkurko, I am getting items for both categories and tags under wordpress 2.6.1.

    is there any way of changing the sql code to just use categories and not tags?

Topic Closed

This topic has been closed to new replies.

About this Topic