node type aggregator-item or aggregator_item?
rseiser - July 1, 2007 - 23:24
| Project: | Feedparser |
| Version: | 5.x-1.x-dev |
| Component: | feedaggregator_node |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I noticed that there is a conflict in my installation between the two names. In the code it mostly uses "aggregator-item". But when I went to /admin/content/types/aggregator-item it shows me:
Type:
aggregator_item
The machine-readable name of this content type. This field cannot be modified for system-defined content types.The nodes ended up having no type. I am not sure if I caused something wrong during my installation but would like to know what the correct name is ("-" or "_"). I assume "aggregator-item" since "_" (underscore) is often used for separating parts in function names.
I will try for now to make it work with "aggregator-item". Just have to find why the above message told me to use "_", and if there is a place where "_" should be changed to "-" to correct it and have the nodes having a proper type.

#1
I could not make it work using "aggregator-item". So I started all over and considered changing some of the "aggregator-item" to "aggregator_item". One that did make things work was in feedaggregator_node.module:
$title = $item->get_title();
$node += array(
- 'type' => 'aggregator-item',
+ 'type' => 'aggregator_item',
'changed' => time(),
Now most things work. I am not sure if this change is appropriate, so the author should verify it.
#2
I had the same problems as rseiser, but I have a slightly different fix. I noticed that aggregator-item is used in all cases but one, so I made the following change instead:
Index: feedaggregator_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedparser/feedaggregator_node.module,v
retrieving revision 1.42.4.3
diff -u -r1.42.4.3 feedaggregator_node.module
--- feedaggregator_node.module 20 May 2007 23:27:42 -0000 1.42.4.3
+++ feedaggregator_node.module 6 Jul 2007 22:37:23 -0000
@@ -9,7 +9,7 @@
function feedaggregator_node_node_info() {
return array(
- 'aggregator_item' => array(
+ 'aggregator-item' => array(
'name' => t('aggregator item'),
'module' => 'feedaggregator_node',
'description' => t('A aggregator item is a post that was imported via RSS.'),
#3
I've been exchanging emails with rseiser about whether his patch or mine seems to be the more appropriate way to do things and in the process, discovered a few related issues. On a clean install of my patched module:
* /node/add/aggregator-item returns info shown on the parent page
* /admin/content/types/aggregator-item returns info shown on the parent page
I was able to get both these pages while I was testing, but I haven't been able to reproduce on a clean install. I am investigating.
#4
Hopefully this is all fixed in CVS. It was related to a patch from somebody else for the adding of the feedaggregator_node_node_info() function.
#5
I DL'd the CVS versions for the DRUPAL-5 branch and overwrote the 5.x-1.x-dev originals. I have confirmed that my modules directory now includes feedaggregator_node.module,v 1.42.4.6 2007/07/17 16:38:09 . Update.php ran successfully.
I still can't edit the content type page. I face the same problem as gwen:
#6