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

cog.rusty’s picture

I meant

<?php print $base_url . '/node/' . $node->nid ?>/edit

hswong3i’s picture

i 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 ??

hswong3i’s picture

i 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>

hswong3i’s picture

Status: Active » Fixed
cog.rusty’s picture

I 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) ?>/edit

hswong3i’s picture

good 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 ;-)

Anonymous’s picture

Status: Fixed » Closed (fixed)