Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When clicking on the edit icon (pencil) of a node, the page not found indication is given.
(editing via the tab does work)
url when using the icon
http://www.xxxxxxxxxx.be/drupal-6.2/node/1/edit
url when using edit-tab
http://www.xxxxxxxxxx.be/drupal-6.2/?q=node/1/edit
It looks like the ?q= is missing.
Comments
Comment #1
stattler CreditAttribution: stattler commentedYour site itself shows page load error in FF. The mentioned errors are not occurring with me at www.stattalk.org
Comment #2
trombone CreditAttribution: trombone commented1. The xxxxxxxxxx is just an example, not the real site-name.
2. You are using clean-url's on your site. Maybe then the problem does not appear ???
Comment #3
stattler CreditAttribution: stattler commentedops! I thought that is the real site.
Ya, I am using clean URL but I've tested disabling clear URL and I found no problem. I can edit by clicking on the pencil button with clear URL disabled.
Comment #4
hswong3i CreditAttribution: hswong3i commentedSeems the problem is due to the following PHP:
As you can see that the link is printed as
<?php print check_url(base_path()) ?>node....
directly, it will always missing the?q=
prefix.I give a quick review about how admin/settings/site-information handle this change, and they did it as:
I will clone this handling within latest -dev packages. Anyway, good catch ;-)
P.S. as a quick solution, check if your Apache's mod_rewrite is active and functioning from admin/settings/clean-urls. The pencil link will always function if your site is ABLE to work with mod_rewrite (so the case of my site, and also that of stattalk's)
Comment #5
hswong3i CreditAttribution: hswong3i commentedAlready fix within latest CVS HEAD. D5 version is tested as safe so no change is required. Other 3 related themes (Contented7, Internet Services and Interactive Media) are updated, too
Comment #6
thePanz CreditAttribution: thePanz commentedI'd like to use a clean solution, using Drupal function to get original links:
this code, with some CSS edits added to ".meta .editlink" selector
text-indent: 99px;
overflow: hidden;
you get a clean, semantic and validated node editing link
Regards
Comment #7
thePanz CreditAttribution: thePanz commentedComment #8
hswong3i CreditAttribution: hswong3i commented@thePanz: I don't remember the reason of changing from
l()
tourl()
so clearly; but according to my memory, it is all due to the change of Drupal core coding style.As I keep on hacking Drupal core with Oracle few months ago, I keep trace on EVERY core CVS commit. I found that Drupal core is change from using
l()
tourl()
in D6, heavily. According to my understanding, it is all due to performance concern:l()
is a wrapper function ofurl()
, and so extra checking will be preform. If we are able to predict the final result ofl()
, e.g.node/$nid/edit
is always exists, just useurl()
directly may able to provide some performance boost up.The change of pencil link implementation since Contented7 6.x-2.0-RC1 (the CHANGELOG.txt and the node.tpl.php CVS diff): even not exactly using
url()
at that moment, the above idea should also apply to this change (well... and finally it is buggy, therefore we have this bug report issue...).Your suggested implementation is similar as that of D5 node.tpl.php, with a some transformation. BTW, based on the above reason, I am not going to re-roll the old style, if the new implementation is functioning.
Moreover, it is not too meaningful for printing out real text as "Edit" but finally hidden it with CSS, if a link with space only is also valid. The main point of this pencil link bottom is trying to provide a fancy and handy hack for site administrator, but not means its implementation need to be very fancy :-)
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.