how are teasers processed ?

k2s - November 2, 2007 - 22:00
Project:XML Content
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

Very important filter, thank you, but I have problem with it.

It seams to me that the XML content is cut by Drupal before it is sent to XMLContent filter. Variable $xml on line 221 ( $valid = $dom->loadXML($xml);) is then not valid XML.

I I set "" in end of the XML content the $xml variable is complete on line 221 but XSLT will generate the full page and that will be shown in teaser.

If XSLT will generate "" in its output it is not respected anymore by Drupal.

Is there way to fix it ?

#1

urlisse - September 11, 2009 - 15:31

Teasers in D6 can be annoying at best. I was able to quickly bypass this bug by installing the Excerpt module and by adding the following line to the xmlcontent.module :

     case 'process':
+      if (substr($text, 0, 5) != '<?xml') return $text;
       $xslt_path = drupal_get_path('module', 'xmlcontent'). '/' . variable_get("xmlcontent_xslt_path_$format", '');
       return _xmlcontent_transform($text, $xslt_path);

Of course, this is more like a hack. Has anyone started working on more proper solution?

 
 

Drupal is a registered trademark of Dries Buytaert.