Feedwordpress Issues with Wordpress 2.1 (fix!)
Development, English January 30th, 2007Today it came to my attention that the feedwordpress plugin we use to aggregate Zhenechs Feed was broken. Apparently since the upgrade to Wordpress 2.11. So I went to ask google about it and found a lot of people who have the same problem. The Thread at wordpress.org was closed a bit too early in my opinion. A bit later I found a guy who even sent an email to Rad Geek, the developer.
It was when I read his blog post, that I realized that I have to fix it by myself *sigh*
Ok, here we go.
In the latest feedwordpress package (0.98) there was a rss-functions.php in the OPTIONALS. Quick diffing shows: 0.8wp is still higher than 0.5 which is provided in wp-includes/rss.php (since a few versions, 2.0 i guess). So I copy it and overwrite the rss.php. Now to the code.
Reading about the fix in the thread, I take a look at the require_once calls in feedwordpress.php.
require_once (ABSPATH . WPINC . '/rss.php');
Yep, we just checked that.
require_once (ABSPATH . WPINC . '/registration-functions.php');
Change to:
require_once (ABSPATH . WPINC . '/registration.php');
Ok, sweet, but I still get this freakin MySQL syntax error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ORDER BY cat_id’ at line 1]
SELECT cat_id, cat_name, auto_toggle FROM ORDER BY cat_id
Back to the code:
$results = $wpdb->get_results(”SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id”);
$wpdb->linkcategories is empty. Not good.
Thanks to quickonlinetips.com - which, no offense, sounds more like a trojan spider page than the neat helper that it has gracefully been to me when I was desperate - I quickly found out that “Developers using the former linkcategories table should be aware that link categories are now part of categories.”
Umm, okay. So I replace every ->linkcategories with categories. I have to take out auto_toggle because it doesn’t exist anymore. I have no time to look into it further, whether it’s an option or not so I just leave it behind for now.
$results = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->categories ORDER BY cat_id");
I also commented the following lines out:
# if ('Y' == $row->auto_toggle)
# echo ‘ (auto toggle)’;
Now clap your hands: back to the dashboard, reconfiguring the feeds and, as far as i can tell, it’s working :)
The Options - Syndication page is still a bit screwed, but that could be an issue with spotmilk admin theme.
Complete Code: feedwordpress0.98-wp2.1fix.phps
Edit (08.02.2007):
I’m currently working on a fix for those of you who still encounter sql error. Please contact me to provide some debug informations:via IRC:
Server: teranetworks.de
you’ll automatically join #wootI’ve also set up a temporary email adress: feedwordpress@trashmail.net
Write an email and I’ll get back at you with my real email adress or via a messenger.
Edit2 (11.02.2007):
If you’re working with a clean wordpress 2.1 installation you have to comment a few more lines out (show_images=’N', show_description=’N', show_rating=’N', show_updated=’N', sort_order=’name’), that’s why some of you had this sql errors:INSERT INTO wp_categories SET cat_id = 0, cat_name=’Contributors’, show_images=’N', show_description=’N', show_rating=’N', show_updated=’N', sort_order=’name’
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
I updated the feedwordpress.phps, so grab it and try it out. It worked on a clean test install for me. Thanks to ryan from koesuma.com for pointing this out!
26 Responses to “Feedwordpress Issues with Wordpress 2.1 (fix!)”
Trackbacks
- geekosphere.org ~ geeks? » links for 2007-02-05
- SqlServerForum.org » Blog Archive » Feedwordpress Issues with Wordpress 2.1 (fix!)






January 30th, 2007 at 21:37
yay, burn my feed again. no more fuckin uncategorized posts.
thanks jesse.
January 31st, 2007 at 0:10
Well .. now that’s cool. I hope it’s working fine for you! Because I think I will be trying this out tonight! :) Thanks!
February 3rd, 2007 at 5:41
Hi. .. just noticed you also came by my Wordpress support and wanted to give an update. The way I was doing it has been working great ..although you see the error message inside the plugin/manage area it functions correctly. But, I also tested your complete code on one of the 9 and it’s functioning correctly too! My Syndication screen seemed fine. I’m afraid now, to convert all to the other version, as both are working and (knock on wood) why change it if it aint broken, right? :) Take care.
February 7th, 2007 at 18:00
Howdy,
What the heck do I do with this file? The original plugin is only about 200K with the plugin at 111k. I appreciate all the work yo did but I have no idea how to use it. Please help.
February 7th, 2007 at 19:09
Alright, so I’m not SUPPOSED to use the file! :-) I went through the fixes like you laid out and am still getting these errors:
WordPress database error: [Unknown column 'show_images' in 'field list']
INSERT INTO wp_categories SET cat_id = 0, cat_name=’Contributors’, show_images=’N', show_description=’N', show_rating=’N', show_updated=’N', sort_order=’name’
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
Do you still have these as well or is there a fix that I’m missing?
February 8th, 2007 at 2:12
Hi Gerald.
Are you sure you did the changes to feedwordpress 0.98? Because, no, it shows me no error at all.
I can’t figure out what causes the problem you have right there. Perhaps try to disable and re-enable the plugin through wp-admin.
If that doesn’t help please upload the whole feedwordpress.php source to a pastebin like phpfi.com and post it here and I’ll look into it.
February 8th, 2007 at 12:01
As davezac pointed out on the wordpress.org thread (http://wordpress.org/support/topic/102947) it’s important that you use the rss-functions.php included in the feedwordpress package.
Please follow my post completely and check if feedwordpress.php refers to the right rss-functions.php (or rss.php).
February 8th, 2007 at 12:38
Howdy,
Thanks for the response. I’ll look into it some more.
February 8th, 2007 at 15:13
I believe I followed the fix correctly and I get the same second error as Gerald when I visit most of the sections/pages that have to do with feedwordpress. I renamed the rss-functions.php in the feedwordpress package to rss.php and replaced the rss.php on my server. I also made sure feedwordpress.php refers to rss.php as posted in the fix above and followed the rest of the instructions.
Any ideas?
——-
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
February 8th, 2007 at 23:39
Damn, looks like there are also a few more guys who have problems getting it to work. I’m looking into it right now. Would like to have some of you on our irc network to get it working. A contact via ICQ or skype would be possible, too.
IRC-Server: teranetworks.de
you’ll automatically join #woot
I’ve also set up a temporary email adress: feedwordpress@trashmail.net
Write an email and I’ll get back at you with my real emai -adress or via a messenger.
February 11th, 2007 at 4:46
I have tried this isntallation on several blogs, and I seem to get different error’s each time. On one, i got everything working correctly except post’s from syndicated links never showed up. After that I started over, and the best I could do was get a screen that said “Cheatin, uh?” everytime I did anything related to feedwordpress. I just tried AGAIN tonight on another blog, and I am getting a new error (i have however seen this one before on one of my previous 8 installation attempts.)
I get this error:
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\domain.com\httpdocs\wp-admin\admin-header.php:16) in C:\Inetpub\vhosts\domain.com\httpdocs\wp-includes\functions.php on line 1219
Wordpress then says “Are you sure you want to do this? Y/N” and when I select yes, my changes/new feeds don’t stick.
HELP!
February 11th, 2007 at 8:24
I get this error
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
February 12th, 2007 at 15:16
since 2nd edit, still getting same error:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
February 12th, 2007 at 15:55
ok, working with ping ennabled but i cant see the list of sindicated feeds. And can’t update with this error “Error: I don’t syndicate tag:radgeek.com/projects/feedwordpress/7b…”
February 14th, 2007 at 20:56
I’m trying to install this on a clean install of 2.1. It all went well until I added a feed, which just gives me a message of “Cheatin’ uh?”
Not sure what might be causing that problem.
February 15th, 2007 at 14:27
In the Syndicated Sites page it’s no longer listing the syndicated URLs.
February 15th, 2007 at 16:20
Ok, I THINK I figured out why it’s blank. In line 539, it says:
$links = get_linkobjects(FeedWordPress::link_category_id());. get_linkobjects() uses the link_category column in the links table. I checked that table and the link_category values (’1′) of the syndicated links don’t match that of their category (’3′). Since the function get_linkobjects() wants link_category equal to $category, it won’t return anything. I changed my preferred link category to id = 1 and it worked. The weird thing is, my blog links are still cat id = 3 because I haven’t changed them.I don’t know how they became unequal, maybe because WP 2.1 neglected it altogether and thought it wouldn’t matter anymore. Sheesh. I hope this is right.
February 16th, 2007 at 8:11
I’m using the completely redone feedworpress.php and when I go to add syndicated links I get the following:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY link_name' at line 1]
SELECT * FROM wp_links WHERE link_visible = ‘Y’ AND link_category = ORDER BY link_name
March 19th, 2007 at 4:54
I am getting this error. Using Wordpress 2.1.2 Feedwordpress 0.981
when adding a feed.
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2]
INSERT INTO wp_link2cat (link_id, category_id) VALUES (15, )
March 19th, 2007 at 5:11
using the code provide here I get a message: Cheatin Uh?
May 17th, 2007 at 21:48
For anyone that has the “near ‘ORDER BY link_name’ at line 1″ error, I was able to solve it by changing the settings under Options, Syndication:
Syndicate links in category: {your_category}
Place all syndicated posts under: same as above
Unfamiliar categories: don’t create new categories
I don’t know which of the three solved it, but with these settings it works for me.
August 31st, 2007 at 16:20
anyone have it working on 2.2?
Everything is fine for me except that it creates posts with no links on them. Just the title and descript but no link.
I didn’t use the rss files included with the Package would this make a difference?
I enabled the changed the PERMALINK setting in OPtions –> syndication
to point to ‘this website” instead of ‘original website’ which Is wrong.. so i tried to change it back and the setting seems to have been locked in.. even when I uninstall and re-install the plugin.. does it store the setting in a file somewhere. how do I reset all the setting to defaults?
September 6th, 2007 at 11:09
hi, i have done with these steps, but i still got “no feed found”
September 6th, 2007 at 11:14
Hey you guys, I’m sorry. I can’t support this plugin at the moment because I don’t use it anymore. There were too many issues and we went another direction with the blog. Try aut-o-matic oder wp-autoblog, maybe they can do what you need.
Also, check the author’s webpage (http://projects.radgeek.com/feedwordpress) for updates, he did some patches a few months ago.
Sorry again and good luck.