Closed (fixed)
Project:
Notifications
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2008 at 22:18 UTC
Updated:
2 Sep 2009 at 11:13 UTC
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
Comment #1
jaydub commentedAt 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?
Comment #2
dfletcher commentedjaydub - 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
Comment #3
dfletcher commentedOk 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
Comment #4
jose reyero commentedStrange 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.
Comment #5
dfletcher commentedOk 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.
Comment #6
talino commentedI'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?