Hi,
First of all, thanks for this great module.
I think there is a bug in the following case (I will try to be as clear as possible).
Here is my configuration :
Drupal 6.10 - Apache 2.2.11 on Windows or Apache 2.2.6 on Linux (the issue is the same on both) - PHP/5.2.9 - MySQL
- Input format : "Full HTML" is the only input format, and 3 filters are checked : HTML corrector (core drupal filter), Internal path filter, URL filter (core drupal filter)
- Convert internal paths to : "Absolute URL (including http://www.example.com)" (but the issue is the same with "Absolute path (relative to document root)"
- "Enable automatic url processing for attributes" is checked
- Order of the filters :
1. Internal path filter > weight : -10
2. URL filter > weight : -9
3. Html corrector > weight : -8
- FCKEditor is used but I don't think it is concerned by this issue (please see below)
- the url of my Drupal site is : http://localhost/Drupal
1. I create a new node with 3 url in the content :
- a link to an internal node
- a link to a file
- an insertion of an image
For the first two url, I choose the protocol of the FCKEditor dialog box, so the HTML source code is generated properly :
link to an internal node
link to a file
![]()
2. I save the node. Everything is ok : the links to the internal node and the file work correctly and the image is displayed.
The url on the link to the internal node is : http://localhost/Drupal/?q=node/44
Now let's go to the Mysql database. Here is the content of the body column of the node_revisions table for my node :
link to an internal node
link to a file
![]()
3. Now I edit my node. Here is the HTML source code :
link to an internal node
link to a file
![]()
4. I save my node again (without any modification).
The link to the internal node doesn't work anymore.
(the links to the file and the image are ok)
In the HTML Source code of the displayed page, I can see link to an internal node and my browser of course doesn't know the internal: protocol.
Now let's go to the Mysql database again. Here is the content of the body column of the node_revisions table for my node :
link to an internal node
link to a file
![]()
If you compare the two contents, you can see that "internal:node/44" has been replaced by "internal:?q=node/44" which is the cause of the broken link.
I've tried with my Windows Apache version with clean url activated and everything is ok.
So this bug only occures when clean url are not activated.
I hope this issue will help you in your development.
Best regards,
Laurent
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 644862-pathfilter-clean-urls-disabled.patch | 3.81 KB | mrfelton |
Comments
Comment #1
lo37 commentedSorry, I 'm posting this issue again in the comment because the rendering of my first post is not correct. Could you please delete my first post ? Thanks in advance
Hi,
First of all, thanks for this great module.
I think there is a bug in the following case (I will try to be as clear as possible).
Here is my configuration :
Drupal 6.10 - Apache 2.2.11 on Windows or Apache 2.2.6 on Linux (the issue is the same on both) - PHP/5.2.9 - MySQL
- Input format : "Full HTML" is the only input format, and 3 filters are checked : HTML corrector (core drupal filter), Internal path filter, URL filter (core drupal filter)
- Convert internal paths to : "Absolute URL (including http://www.example.com)" (but the issue is the same with "Absolute path (relative to document root)"
- "Enable automatic url processing for attributes" is checked
- Order of the filters :
1. Internal path filter > weight : -10
2. URL filter > weight : -9
3. Html corrector > weight : -8
- FCKEditor is used but I don't think it is concerned by this issue (please see below)
- the url of my Drupal site is :
http://localhost/Drupal1. I create a new node with 3 url in the content :
- a link to an internal node
- a link to a file
- an insertion of an image
For the first two url, I choose the
<other>protocol of the FCKEditor dialog box, so the HTML source code is generated properly :2. I save the node. Everything is ok : the links to the internal node and the file work correctly and the image is displayed.
The url on the link to the internal node is :
http://localhost/Drupal/?q=node/44Now let's go to the Mysql database. Here is the content of the body column of the node_revisions table for my node :
3. Now I edit my node. Here is the HTML source code :
4. I save my node again (without any modification).
The link to the internal node doesn't work anymore.
(the links to the file and the image are ok)
In the HTML Source code of the displayed page, I can see
<a href="internal:?q=node/44">link to an internal node</a>and my browser of course doesn't know the internal: protocol.Now let's go to the Mysql database again. Here is the content of the body column of the node_revisions table for my node :
If you compare the two contents, you can see that "internal:node/44" has been replaced by "internal:?q=node/44" which is the cause of the broken link.
I've tried with my Windows Apache version with clean url activated and everything is ok.
So this bug only occures when clean url are not activated.
I hope this issue will help you in your development.
Best regards,
Laurent
Comment #2
mrfelton commentedHi lo37,
Thank you for your incredibly detailed and thorough bug report - these are a rare, but enjoyable occurrence!
I can confirm that the bug you have reported is indeed a bug and I know that the cause of the problem is in the code and not with your configuration. Please bare with me while I try to get this fixed. I had neglected to think about users without clean urls enabled as in all my Drupalling, I have never actually used or seen a setup that doesn't use clean URLs!
Expect to have a fix shortly.
Comment #3
mrfelton commentedPlease could you try with this patch and let me know how you get on. Thanks
Comment #4
lo37 commentedHi mrfelton,
Thank you for the patch and for your quick answer.
By the way, I am a developer too, that's why I try to be as clear as possible when I have to describe a bug ;)
It seems that there is an issue with this patch.
Here is the output of the command line (as you can see, my drupal site is actually named DeltaKnowledgeTest) :
Maybe it's due to a wrong revision of the pathfilter.module file within the 6.x-2.0-beta3 module.
I am not familiar with the patch command line and files but the the revision id of my original pathfilter.module file is :
// $Id: pathfilter.module,v 1.7.2.1 2009/10/17 10:01:13 mrfelton Exp $And I can see in your 644862-pathfilter-clean-urls-disabled.patch file :
Hope it helps.
Thanks again,
Laurent
Comment #5
mrfelton commentedThis should be fixed in CVS now.