I'm not entirely sure if this is due to something in my own setup, but the token [node-url] does not get replaced with the aliased path, it displays a node/[nid] path even though there's clearly an alias in the url_alias table.

What's especially odd about this is the spot in notifications_content.module where this token is supplied seems to use url(), which should do the replacement.

Comments

jaydub’s picture

At least for a new node, I think this is due to the fact that the notification and token [node-url] are being built before a node's alias has been built and stored. It could be a module weighting issue. perhaps if notifications was weighted lower than pathauto then the alias would already be available.

thoughts?

dfletcher’s picture

jaydub - could be ... my pathauto is weighted 1 and all my notifications modules 2 (except notifications_content which is 100), so yes they are weighted higher than pathauto. When I first installed notifications however, all its modules were weighted zero and the problem still existed.

Also, I see the same bad node/[nid] path on updates and comment notifications too. Additionally, it happens in digest mode as well.

Does the token replacement happen with the event occurs, or at send time?

Cheers,

--fletch

dfletcher’s picture

Ok in yesterdays digest about half the items had aliases. It seems to be "catching up". Are the messages really generated at event time?!

Cheers,

--fletch

jose reyero’s picture

Strange issue,

We are using url() function for that token so it should work fine. However I think that if you have 'inmediate sending' enabled a null alias may have already been stored in the page 'alias' cache, that is quite a low level Drupal function.

Answering your question the messages are generated at sending time.

dfletcher’s picture

Status: Active » Closed (fixed)

Ok this one was caused entirely by a hack in our system where we were trying to use Memcached to look up aliases. The order that things happen in Notifications caused an issue that we hadn't seen before. Somehow, our code was caching NULL for those aliases, so when it went back to look them up later no alias was found.

Closed.

talino’s picture

Version: 5.x-1.0-alpha1 » 6.x-2.1

I'm having the exact same issue, however no fiddling with module weights or turning on and off Immediate Sending could solve it for me. I still get the node/id link in the email instead of the pathauto alias.

Any ideas?