The theme is confused by node aliases
cog.rusty - May 27, 2006 - 03:58
| Project: | K2 |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I already filed an issue to core, about a problem with the $directory cariable which misbehaves and loses the image when viewing an aliased node.
There is a second bug which I believe should be fixed k2. The code which produces the "node/edit" link breaks when the node is aliased.
For "node/3" which is aliased as "news/announcent-2006-5-25", the theme produces "news/announcent-2006-5-25/edit", which of course does not work. A possible fix is to replace "$node_url" with "$base_path . '/node/' . $node->nid".

#1
And the $directory variable in node.tpl.php needs a front slash to work properly when viewing an aliased node, if they do not include the front slash in core.
#2
Is this being left up to the global url / node / node->nid ? I'm about to put this hack into place but would like to know if there is a better answer yet?
#3
This and some similar issues have been addressed in the contented7 theme (which is based on K2).
http://drupal.org/project/issues/contented7, "closed" issues.
If I recall correctly the maintainer discussed it in drupal's IRC channel and came up with some solutions.