The included feed.inc has a little error.
When no feeds are availble the variable $feeds will be NULL, thus leading to the error:
* warning: implode(): Bad arguments. in /var/www/tatnet07/html/drupal/sites/all/modules/mysite/plugins/types/feed.inc on line 443.
* user warning: 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 1 query: SELECT cid, title, description FROM drupalaggregator_category WHERE cid IN () in /var/www/tatnet07/html/drupal/includes/database.mysql.inc on line 172.
By adding:
if($feeds) {
just right before $implode = ".........
and add:
}
right before: if( empty(.......
I think the bug is fixed .... or am I doing it wrong?
Comments
Comment #1
agentrickardThis is an error you might see during configuration of the module, and it is based on a design choice.
See http://drupal.org/node/119580 (or section 1.8 of the README) for the logic behind this design choice.
The assumption, if you allow users to add feeds, is that you want to store them in a category separate from the administrator-defined feeds. Some people don't use Aggregator categories, however, which is why you get this error.
This section of code, however, assumes that you have configured aggregator's feeds to put user-submitted feeds into a 'default category.'
You define that category at: admin/settings/mysite/type/feed.
The fix is either to set up a default category for user feeds, or to change the function, starting at line 439:
Note: Please do not mark issues as fixed when you first enter them. Issues are only fixed when code is approved and/or committed.
Comment #2
agentrickardRelated note.
If you look at the function mysite_type_feed_active() [lines 40-80 of feed.inc], you should not be allowed to activate this plugin until you have configured the default categories.
So my question is: why didn't that stop you from activating the plugin? Did you set the "allow users to add new feeds" setting on the Feed admin page?
I think the error is in this function, which is designed to prevent you from encountering mis-configuration errors. I think it should be:
Comment #3
agentrickardBased on last note, re-assigning status.
Comment #4
agentrickardThis is a good catch. It is still required that you establish a default category for user feeds. (See README section 1.8). However, I fixed the errors that we caused by mis-configuration.
Committed to HEAD.
Thanks.
Comment #5
mounte commentedSorry for the inconvinience (spelling?) regarding the use of the tracking system.
I am new to all this, anyways, thanks for the explanation of the situation.
Comment #6
agentrickardFixed in 5.x.2.1.
Thanks!