Closed (fixed)
Project:
Frequently Asked Questions
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Mar 2007 at 20:06 UTC
Updated:
19 Mar 2007 at 21:49 UTC
I have created an answer to a question where the answer includes a reference to an “internal” link (ex: href="internal:disclosures/termsofuse" ) using a Drupal input filter that allows it to be automatically converted to a fully resolved link at display time.
When creating a content type “FAQ”, the link is converted correctly on the “preview” and “edit” node pages, but when it is displayed on the “faq” page, the link is not converted.
I would imagine that many questions are answered by referencing another internal node (i.e. forum topic, policy statement, membership page, etc.) so I think this is pretty important.
Comments
Comment #1
nancydruI'm not sure what kind of filter you're using, but the answers will use the filters defined in the default input format. I also don't understand this "internal:" type of linking. Linking within Drupal is simple; you just specify
href="/urlalias_name"(assuming you're using a URL alias). I know that works in FAQ just fine, because I do it.Comment #2
stella commentedCan you provide more information on the input filter you're using and the method of linking? it's not one i've encountered before. Does it work with page and story nodes?
Cheers,
Stella
Comment #3
dnuss commentedThe filter is from Module : Path Filter (http://drupal.org/project/pathfilter)
I have it tied to the "Filtered HTML input format" and "Full HTML" Input formats.
It is known as the "Internal path filter" and allows Internal paths in double quotes, written as "internal:node/99", for example, to be replaced with the appropriate absolute URL or relative path.
Yes, it works on stories, etc.
Also note that when I "create content" for the FAQ Question / Answer, the filter is working since the "preview" shows the converted link, and the page shown after the "submit" ( which is the edit page of the node ) the link is also converted.
Comment #4
dnuss commentedI did some debugging and I have isolated the reason the filters are not getting executed on the FAQ pages.
In faq.module (using v 1.1.4.14 as a reference), at line 637:
$output .= '<dd class="faq_answer">'. t($full_node->body) ."</dd>\n";calling t() does not cause the filters to be called. I changed that line to:
$output .= '<dd class="faq_answer">'. t(check_markup($full_node->body,$full_node->format,FALSE)) ."</dd>\n";and all the filters were called and the result was a translated “internal:….” To it’s real URL.
Now that raises some issues, since It appears that $teaser or $body is never passed to check_markup() in the faq.module, so answers can never have an internal node referenced ( unless it is hard coded, then we get into issues of test servers vs. production servers base url ).
So we have a dilemma. Comments / suggestions?
Comment #5
nancydruI vote for changing it your way.
Comment #6
stella commentedfixed in CVS, will be included in the next release. Thanks dnuss for spotting this one!
Comment #7
stella commentedReleased in 5.x-1.2