Hi, feedapi beta 2 is looking good, but I am having an issue with bringing in feeds and having pathauto assign automatic paths. I bring my rss feed items in as nodes and use feedapi_ iinherit to attach taxonomy to the feed items. The feeds import as nodes and attach taxonomy correctly.

Here's the problem. I have a content type for rss feeds/items, and have simply set pathaut it to create the path for this content type as follows.

external_feeds/[catpath]/title

When nodes are refreshed(brought in) path auto automatically creates external_feeds/title, but does not recognize the category feedapi_inherit applies. What do you think is going on here... is pathauto running BEFORE the taxonomy has been applied to the node, ie before feed_api inherit runs?

thanks again tremendously... is there a place I can donate or send you paypal for your continuing work on this great project?

thanks

art

CommentFileSizeAuthor
#4 inherit.patch422 bytesaron novak

Comments

greggles’s picture

Which version of pathauto are you using?

You could try setting pathauto's weight to a relatively heavy value.

greggles’s picture

Title: feedapi not jiving with pathauto » pathauto doesn't get terms for feedapi generated nodes

also making title more descriptive.

aron novak’s picture

Assigned: Unassigned » aron novak

Well, I tried it out and it works for me out of the box.the
Please make sure that you installed feedapi_inherit correctly. The typical problem is that the feedapi_inherit weight (at the content-type setting page) is not bigger then the feedapi_node 's weight.

aron novak’s picture

Category: bug » task
Status: Active » Needs review
StatusFileSize
new422 bytes

If anyone suffers from the same problem, here is the patch against the feedapi_inherit.module CVS version 1.1.2.13 (DRUPAL-5)
Only apply the patch if you use pathauto!
I do not plan to commit the patch now. If significant amount of users tells here that they want to use feedapi together with pathauto (and with taxonomy included into the path), i'll reconsider.

aron novak’s picture

FeedAPI adds the taxonomy info at node_prepare stage. As I know there is no possibility to tell to the nodeapi the call order of the hook_nodeapi implementations. It can be a problem here. Can you check out the patch, that i created? I simply tell pathauto to update the created alias. I know that it makes the process slower, do you have any better recommendation? Thanks in advance!

greggles’s picture

I tried briefly to get feed_inherit to pull in terms but was unsuccessful so I'm unable to test the patch. From looking at it, though, I agree this solution is a bit rough. At the least I can move the code that happens on that operation into a function that you could call rather than invoking the hook_nodeapi.

Pathauto 5.x-2.x has a relatively heavy weight so I think ideally feedapi_inherit should be moved to a different operation so that then Pathauto can react to it the way it is generally designed to. I guess that may not be possible - I saw that it was changed from 'update' to 'prepare' in http://drupal.org/node/195816 but I don't understand why that was necessary.

There are other modules (autonodetitle, relatedlinks, probably some others) which need the taxonomy data to do their jobs and would not be able to do them if the data is inserted at the 'prepare' stage. So, calling those modules separately like this patch does doesn't seem like a good long term solution to me.

rconstantine’s picture

I have the same issue. So +1 to fix this. Also, one of my other issues in the queue may stem from using 'prepare' instead of 'insert' and 'update', so this may be affecting more than the interaction with other modules. As I state in the other post, I think that both taxonomy terms and og audience are not being set properly possibly due in part to this. I could be wrong.

summit’s picture

Hi,

Pathauto still not working for me. I inserted the patch so the code looks like:

/**
 * Implementation of hook_nodeapi().
 */
function feedapi_inherit_nodeapi(&$node, $op) {
  switch ($op) {
    case 'prepare':
      if ($node->feedapi_node->feed_nids) {
        foreach ($node->feedapi_node->feed_nids as $feed_nid) {
          $feed_node = node_load($feed_nid);
          if (feedapi_enabled($feed_node->type, 'feedapi_inherit')) {
              if (module_exists("pathauto")) {
                module_invoke('pathauto', 'nodeapi', $node, 'update', NULL, NULL);
              }
            _feedapi_inherit_do_inherit($node, $feed_node);
          }
        }
      }
      break;
  }
}

The weight of my properties in my feedapi_contenttype is:

Feedapi_node Weight 1
Feedapi_inherit Weight 5

And module weigt:
Pathauto Weight 10

Please assist!
thanks in advance,
greetings,
Martijn

summit’s picture

Version: 5.x-1.0-beta2 » 5.x-1.1

Also not working on version1.1
greetings,
Martijn

netentropy’s picture

Is there a fix in the works? I am writing an ebook on making a BANS store using Ebay RSS feeds and really need this to work.

greggles’s picture

If you really need something to work I suggest 1) fixing it yourself if you can 2) when there is code that might fix it already written that you help testing the current proposed code 3) providing a bounty and paying someone else to fix it.

Saying you "really need this to work" is unlikely to get someone to assist you (at least in my experience...).

summit’s picture

Hi,

Aron, +1 for fixing this!
I am not getting this to work. Can somebody who has this working please tell his module weights on all used modules, and better please state the exact procedure how to get this working.
Everything is working, but not the pathauto. The feed-items keep there node/[number] behaviour instead of showing the title.
Thanks a lot in advance!
This is the only thing for me not been able to roll out this great module on a live site.

Greetings,
Martijn

sunset_bill’s picture

Not sure what constitutes a significant number of users, but being able to use pathauto to assign content and category types to user-defined paths instead of generic and not-too-useful paths like 'node', 'content' or 'feed-item' seems like a highly desirable functionality in any case.

I see where I could probably edit the hard-coded 'feed-item' lines in feedapi_node_views, but replacing one hard-coded value with another isn't really best programming practice.

So, please count me in as one of those who would really like to be able to use feedapi and pathauto together without having to take time away from the work I'm really trying to do in order to hack something together.

regards,
SB

summit’s picture

Hi, Any progress in this field please? Still not working for me..
Thanks in advance for replying!

greetings,
Martijn

timmillwood’s picture

I am having this problem on http://blog.to.it

Trying to get pathauto to generate "[author-name-raw]/[title-raw]" but it only generates "[title-raw]" when FeedAPI creates a node.

summit’s picture

Component: Code » Code feedapi (core module)

Hi,

Still this problem on taxonomy terms which are inserted through feedapi_mapper taxonomy on D5 and D6.

Greetings,
Martijn

maciej.zgadzaj’s picture

Hi,

Got the same problem. For nodes created by FeedAPI tokens [author-name-raw] and [author-name] did not work, even when FeedAPI inherit weight was the biggest.

The patch provided above did not work for me either.

The problem was that $node object passed to _feedapi_inherit_do_inherit() method did not contain neither uid nor name variables.

However $feed_node did contain them.

So the simplest solution that did work for me was this line:

$node->name = $feed_node->name;

added in the feedapi_inherit_nodeapi() function, so it looked like this:

function feedapi_inherit_nodeapi(&$node, $op) {
  if (!isset($node->feedapi_node)) {
    return;
  }

  switch ($op) {
    case 'prepare':
      if ($node->feedapi_node->feed_nids) {
        foreach ($node->feedapi_node->feed_nids as $feed_nid) {
          $feed_node = node_load($feed_nid);
          $node->name = $feed_node->name;
          if (feedapi_enabled_type($feed_node->type, 'feedapi_inherit')) {
            _feedapi_inherit_do_inherit($node, $feed_node);
          }
        }
      }
      break;
  }
}

And voila!

All [author-name-raw] aliases finally work as they should...

Anonymous’s picture

Version: 5.x-1.1 » 6.x-1.9-beta2

I'm going to try out #17 too. Im in 6.x beta now, and this issue still exists. pathauto token [vocab-raw] intended for feed-items, is taken from the feed... so I get URL aliases on feed items, with the parent feed's vocabulary as alias...

rootwork’s picture

Category: task » bug

I want to confirm that this is occurring with feedapi 6.x-1.9b2 and pathauto 6.x-2.x-dev. It seems to affect both [author-name] and the taxonomy tokens (and their "raw" equivalents).

This behavior isn't critical to me, but I wanted to report that the bug is still occurring.