Feed Element Mapper in Drupal 6
SeanBannister - March 28, 2008 - 04:46
| Project: | Feed Element Mapper |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I'd really like to see this module for Drupal 6 now that FeedAPI has been ported. I'm busy porting other modules at the moment so I haven't had a chance to look.

#1
If you could get on this, it would be huge. I don't have much time for doing upgrading work these days and haven't upgraded any other module so far - I guess you'd be a lot faster than I.
#2
I'll see what I can do, been really busy though
#3
Subscribe
#4
Subscribing also.
#5
I've taken an initial stab at this. Ran down the changes from the coder module and fixed everything that it brought up. However, I'm sure that it doesn't fix everything including things like intergration with CCK. I enabled it and it seemed to install properly but there are quite a few errors that it threw once it was enabled.
I also know that there are problems with the hook_menu() function but I haven't had time to debug them more.
So here is the patch if someone else wants to look at it and take a stab at moving it along.
#6
thanks for posting. testers feel encouraged!
#7
Subscribing
Looking to upgrade a local Cancer charity site with numerous catagorised feeds from Drupal 5 to Drupal 6. FeedAPI sound like a good longterm replacement for FeedParser but not suitable without this module available 8¬(
So all the best to anyone working on this.
#8
Subscribing (sorry)
#9
first off, thank you for putting this out there for us. second, i see the mapper as the more powerful of the two, mapper and feedapi. it would be a great help to have a drupal 6 version available. please ...
... with suger on top!
#10
I worked a bit on this patch last week I couldn't finish though and now I'm getting caught up here in other work - posting my intermediate results.
Outstanding:
- finish menu API conversion
- taxonomy mapper not showing up because taxonomy on node not in $node->taxonomy anymore
- test other mappers
#11
subscribing
#12
subscribing
#13
Subscribing
#14
Patched module doesn't work... what to do?
#15
#14: it doesn't, missing items as in #10 remain :) I don't have the time to work on this atm, but the outstanding tasks are no rocket science. Would appreciate it if somebody could step up.
#16
Might take this on. Downloading now.
#17
Ok, I'm getting a little antsy to use this in D6, so I'm motivated to help. greg.harvey, please let me know how far you get and if you want help.
#18
Actually, company said I couldn't spend time on this (fair enough - I'm a contractor and it's their money I'm spending). =(
FYI, we opted for a different approach. Using the Services module in combination with the Views module. Services exposes a 'views.getView' method which allows you to retrieve the results of a node view, AS NODES! Since my whole model was needing to transfer nodes across the 'net from one Drupal instance to another, intact and identical, this works much better for me.
I set up a the Services module and a view on my "distribution" site listing all nodes created or updated in the last 24 hours, by type (using an argument) and then on my "recipient" site I write a small module which runs with cron and calls the 'views.getView' method on the "distribution" site's web service, which responds with a list of all the new and changed content. Each node is in the correct format in a nested array. For each node in the returned array, convert it to a proper node object, node_save($node), job done! =)
Obviously there are some other little niggles to circumvent, but it works well. When I'm done I'll write a HOWTO.
Ps - don't get me wrong, Feed Element Mapper is still a great module and a port of this is to Drupal 6 still a valuable contribution to the community. It just so happens there is a better solution for my specific problem, but I can think of many instances where I would still use this module. =)
#19
Subscribe
#20
Subscribe
#21
subscribe
#22
We're going to need this for a client this week so we'll try to finish patching it...
#23
Great! Hope this gets updated.
#24
subscribe
#25
subscribe
#26
sub
#27
subscribing
#28
Subscribing
#29
subscribing
#30
Subscribing
#31
hi,
I've been trying to help in the port and spent a lot of time understanding functionality of module and the workflow. I strongly think the problem is in these lines. I mean major problem.
Line 542, feedapi_mapper.module
$form_state = array('storage' => NULL, 'submitted' => FALSE);
$form_state['values']['name'] = $name;
$form = drupal_retrieve_form($form_id,$form_state,$node);
drupal_process_form($form_id, $form, $form_state);
// return drupal_render_form($args[0], $form);
return $form;
As the above code does not return as full populated $form object. I have been trying with emvideo and text widget on a new cck type and $form[#node] does not have those fields, which in turn is used by _feedapi_mapper_get_field_names() function to get the field names and run it through feedapi_mapper hook.
Basically at end of it in feedapi_mapper_emvideo.inc $field is empty and hence no list or mapper is returned.
$field = content_fields($field_name);Finally, I am not sure why drupal_retrieve_form() does not return the baked $form object, this function should coordinate with cck to get the $form object right? $form_state variable looks fine to me as I checked some drupal_* functions and thats how they prepare it.
Any thoughts? More on this later.
#32
Thanks Dipen for the input & feedback.
It gives a chance for others like myself to help without starting from scratch (if ever by some miracle I get some time and also solve my current CVS problem).
#33
Subscribing
#34
subscribing
#35
subscribing
#36
subscribing
#37
#31 this is the part that's not ported yet. FEMP tries to figure out what "fields" are available on the target feed item node type by building its form.
The structure of the node form has changed and probably this approach needs to be rethought...
I'm on vacation this week, won't come around to look into this.
#38
subscribing... I'm not a coder but I can help with the test.
#39
subscribing
#40
I'm going to attempt to make this work, has anyone made any more progress other than whats posted on this page?
#41
I got it working (sort of) this is my first patch ever and I'm not sure i generated it correctly, but here it is
its a patch for the d5 version to 6, building off the patch submitted above.
go easy on me :)
#42
loze: great work! This works quite good. I've tried it with some CCK text fields as well as a taxonomy field, and it seems to work.
I've just cleaned the patch up a bit, runned it through Coder to fix som minor issues.
#43
Is it possible to create a new Feed Element Mapper 6.x branch with this code? It would be better to work with a separated branch.
#44
#43: I just committed. Please open new issues for bugs etc. coming up with Drupal 6 version.
#45
#46
Looks like it works for embedded video. Converted over this mapper.
#47
#46 - please post as a patch against 6.x in a new issue. This issue is closed.
#48
Marking as closed - could someone post a link to the new issue for subscribers to follow? =)
#49
#48: http://drupal.org/project/issues/feedapi_mapper ;) Please post new issues for bugs/requests with 6.x version. There where no new issues posted so far.