Closed (fixed)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2009 at 08:20 UTC
Updated:
5 Feb 2010 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
fizk commentedThis didn't work either:
'activity-node-link' => l($object->title, url("node/{$object->nid}", array('absolute' => TRUE))),Comment #2
Scott Reynolds commentedWhy are you changing that? l() uses the url() function already. http://api.drupal.org/api/function/l/6
What is 'improper' about the existing code?
Comment #3
fizk commentedNormally, url('node/123') might return "/content/some-title", but, so far, never returns "node/123".
For some reason, url("node/123") is returning "node/123". I want it to return "/content/some-title" as it usually does.
Comment #4
Scott Reynolds commentedHa your right. i just never noticed because of Global Redirect. Might have to do with system.weight here. Pathauto (or Path) hook_nodapi() firing AFTER Trigger's
Comment #5
Scott Reynolds commentedmarking as active
Comment #6
fizk commentedHere's my list generated by a node insert
Comment #7
fizk commentedI think you're right. The list show that all the relevant functions are called before pathauto_token_values:
...
module_invoke_all::comment_token_values
module_invoke_all::node_token_values
module_invoke_all::taxonomy_token_values
module_invoke_all::user_token_values
module_invoke_all::activity_token_values
...
...
module_invoke_all::pathauto_token_values
So how do we make sure that pathauto_token_values are called first? Should pathauto somehow set it's weight higher or should activity set its weight lower?
It'd be nice if there was a way to say "my token_values depend on another token_values being setup first".
Comment #8
fizk commentedAlrighty, I used the util module to change the weights and it's calling pathauto before activity now, but it didn't help :|
Comment #9
fizk commentedHere's the list of node_invoke_nodeapi. pathauto_nodeapi is called just before activity_nodeapi.
Comment #10
Scott Reynolds commentedIts not activity_nodeapi thats the problem. Its trigger_nodeapi.
But having said that I tried adjusting the weights and it didn't work. There is something else.
all your files are empty.
Comment #11
fizk commentedI don't know if this is related, but [activity-node-creator-link] returns "Anonymous", even though [author-name] returns the correct username.
Comment #12
Scott Reynolds commentedso #11 isn't related (we talked on irc)
http://drupal.org/cvs?commit=317638
Comment #13
fizk commenteddoesn't seem to fix it for me :( I wanted to try CVS head, but it says "This version is incompatible with the 6.15 version of Drupal core." on the modules page.
Comment #14
Scott Reynolds commentedits not CVS HEAD but the DRUPAL-6--2 branch.
Comment #15
Scott Reynolds commentedok So this morning I just tested it using the path module (i.e. not path auto). And it worked, but to confirm try turning off automatic alias at the node form and specifying some path.
http://skitch.com/supermanscott/nttpq/create-story-scotts-contrib
Confirm that when you do that it works. Just to make sure Im not crazy.
Comment #16
fizk commentedSo what I did was
1. create a node with automatic alias on
2. edit the node to turn automatic alias off and specify a path
3. see if activity links to the path alias
activity didn't show the path alias, still showed node/xxx
Comment #17
fizk commentedComment #18
Scott Reynolds commentedok i got it to work by running this
edit: with the latest code from CVS
Comment #19
fizk commentednot working yet, what's your activity weight?
Comment #20
Scott Reynolds commentedok committed to CVS, D.o is having some trouble right now so can grab the commit link
http://drupalcode.org/viewvc/drupal/contributions/modules/activity/activ...
Comment #21
Scott Reynolds commentedIt will be rolled into the next .dev. You can check out of CVS using DRUPAL--6-2 tag (see: http://drupal.org/node/177860/cvs-instructions/DRUPAL-6--2)
Comment #22
fizk commentedEncrypted system.sql dump
openssl aes-256-cbc -in system.sql.txt -out system.sql -d -a
password sent to you on IRC.
Comment #23
fizk commentedComment #24
Scott Reynolds commentedOk so I knew on at the beginning of this epic issue, that it had to with some modules static cache. The first thought it had to do with path modules static cache (hence drupal_clear_path_cache()). But it wasn't as any time a new path alias is added, that cache is cleared.
It ended up being token's cache. So token module statically caches its data, and because of pathauto uses token, and so token's static cache was built up by pathauto creating the alias.
So the trick was to flush tokens cache before rendering messages. Try this patch against the latest DRUPAL--6-2.
patch -i activity_656020.patch -p0
Comment #25
fizk commentedWORKS!!!!!!!!!!!!!
BOOYAAAA :P
I'll give you the honour of closing this ticket once and for all.
Comment #26
sadist commentedi'm still having the same problem eventho i'd patched or replaced it with the latest dev version.
i added an alias for so that anything www.drupal.site/node/* will go to www.drupal.site/go/*.
but at the same time, with pathauto.module, i set the path for video nodes to be video/[nid]
problem i'm having is that, activity.module will print it as "http://www.drupal.site/go/[nid]" to all activities.
here's my issue actually: http://drupal.org/node/691694
Comment #27
Scott Reynolds commentedhttp://drupal.org/cvs?commit=317846
Goto: admin/reports/status and you should see a message from Activity telling you to click a link. If that link gives you a page not found, clear caches and click that link again. That should fix it.
Essentially, trigger has to be called after pathauto so it can use the pathauto's path to the node.
/me wishes he could just delete issues and pretend like they didn't happen.
Comment #28
sadist commentedhehe.. sorry for the trouble.. but this module rocks so much man! it's like the heartbeat for any social-networking site.
and my problem is solved now! with the latest dev version.. i really appreciate your hard work for this module.