Closed (fixed)
Project:
Contented7
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2006 at 18:18 UTC
Updated:
6 Jul 2006 at 04:30 UTC
Now that the pencil icon problem is solved... here is a new one, again in node.tpl.php, in the same line :)
<?php print $node_url ?>/edit
Create an alias for a node. Then, when you click on the pencil to edit it, you get "Page not found" because the theme looks for "alias/edit". I think the code should be:
<?php print $base_url . '/node/' . $node->nid ?>
Comments
Comment #1
cog.rusty commentedI meant
<?php print $base_url . '/node/' . $node->nid ?>/editComment #2
hswong3i commentedi know that but no idea before :'(
thanks for give me a hits ;-)
here is my current version:
<a href="<?php print base_path().'?q=node/'.$node->nid ?>/edit" title="<?php print t('Edit') ?>"><img src="<?php print base_path().$directory ?>/images/pencil.png" alt="<?php print t('Edit') ?>" /></a>i test it for both clear URLs or not
hope you can submit the report to K2 too ??
Comment #3
hswong3i commentedi think is already enough:
<a href="<?php print '?q=node/'.$node->nid ?>/edit" title="<?php print t('Edit') ?>"><img src="<?php print base_path().$directory ?>/images/pencil.png" alt="<?php print t('Edit') ?>" /></a>Comment #4
hswong3i commentedComment #5
cog.rusty commentedI found something
http://api.drupal.org/api/4.7/function/drupal_get_normal_path
I tested drupal_get_normal_path('testalias') and it printed 'node/11'
So, maybe the clean way is
<?php print drupal_get_normal_path($node_path) ?>/editComment #6
hswong3i commentedgood suggestion too
but Heine provide another solution by using l() in IRC
i have test it under different case and already fix by that version
i will learn about drupal_get_normal_path() later and see if have same effect
thank you for your help ;-)
Comment #7
(not verified) commented