Drupal 7 - Firefox 15.0.1 - Strange Behavior
Hi All I have a line of code as below. $data[$index]['Resume'] = '<a href="\ncjobs.com\sites\default\files\resumes\\' . $record->uid . '\\' . $record->filename .'" ' . 'target="_blank">' . $record->filename . '</a>'; I am trying to show a link in one table cell. In IE8, this is working fine, I am able to download the file. In Firefox 15.0.1, this is not working, gets error "he requested URL / ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/\ncjobs.com\sites\default\files\resumes\4\Chinmay_Panimod.doc was not found on this server." I am wondering from where it is prepending "/ ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/" (this is nothing but the current URL, I wanted to access "\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani mod.doc" URL. If you have faced this issue, kindly let me know whats the work around. Thanks kamal NECS, Bangalore
Why \\ instead of /? You should always use / for a URI field. Have you used the firefox debug tools? Earnie On Fri, Sep 28, 2012 at 4:47 AM, Kamal Palei <palei.kamal@gmail.com> wrote:
Hi All I have a line of code as below.
$data[$index]['Resume'] = '<a href="\ncjobs.com\sites\default\files\resumes\\' . $record->uid . '\\' . $record->filename .'" ' . 'target="_blank">' . $record->filename . '</a>';
I am trying to show a link in one table cell.
In IE8, this is working fine, I am able to download the file.
In Firefox 15.0.1, this is not working, gets error "he requested URL /ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani mod.doc was not found on this server."
I am wondering from where it is prepending "/ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/" (this is nothing but the current URL, I wanted to access "\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani mod.doc" URL.
If you have faced this issue, kindly let me know whats the work around.
Thanks Earnie This was the issue. With use of / , this issue is not seen further. Thanks kamal On Fri, Sep 28, 2012 at 5:50 PM, Earnie Boyd <earnie@users.sourceforge.net>wrote:
Why \\ instead of /? You should always use / for a URI field.
Have you used the firefox debug tools?
Earnie
On Fri, Sep 28, 2012 at 4:47 AM, Kamal Palei <palei.kamal@gmail.com> wrote:
Hi All I have a line of code as below.
$data[$index]['Resume'] = '<a href="\ncjobs.com\sites\default\files\resumes\\' . $record->uid . '\\' . $record->filename .'" ' . 'target="_blank">' . $record->filename . '</a>';
I am trying to show a link in one table cell.
In IE8, this is working fine, I am able to download the file.
In Firefox 15.0.1, this is not working, gets error "he requested URL / ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani<http://ncjobs.com/resume_search/skill_based_search/java/1/0/360/00//ncjobs.com/sites/default/files/resumes/4/Chinmay_Pani> mod.doc was not found on this server."
I am wondering from where it is prepending "/ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/" (this is nothing but the current URL, I wanted to access "\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani mod.doc" URL.
If you have faced this issue, kindly let me know whats the work around. -- [ Drupal support list | http://lists.drupal.org/ ]
On 9/28/12 4:47 AM, Kamal Palei wrote:
Hi All I have a line of code as below.
$data[$index]['Resume'] = '<a href="\ncjobs.com <http://ncjobs.com>\sites\default\files\resumes\\' . $record->uid . '\\' . $record->filename .'" ' . 'target="_blank">' . $record->filename . '</a>';
I am trying to show a link in one table cell.
In IE8, this is working fine, I am able to download the file.
In Firefox 15.0.1, this is not working, gets error "he requested URL /ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/\ncjobs.com\sites\default\files\resumes\4\Chinmay_Pani <http://ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/%5Cncjobs.com%5Csites%5Cdefault%5Cfiles%5Cresumes%5C4%5CChinmay_Pani> mod.doc was not found on this server."
I am wondering from where it is prepending "/ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/ <http://ncjobs.com/resume_search/skill_based_search/java/1/0/360/00/>" (this is nothing but the current URL, I wanted to access "\ncjobs.com <http://ncjobs.com>\sites\default\files\resumes\4\Chinmay_Pani mod.doc" URL.
If you have faced this issue, kindly let me know whats the work around.
Thanks kamal NECS, Bangalore
Why are you using \ as path separators? They are supposed to be /. IE, being microsoft based might be accepting both, but FireFox is not, therefor since the URL doesn't begin with a / it is considedered a relative path, so it gets the current page address prepended. -- Richard Damon
participants (3)
-
Earnie Boyd -
Kamal Palei -
Richard Damon