Last modified: 2007-03-04 20:17:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11052, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9052 - Template not evaluated if call is prefixed with whitespace
Template not evaluated if call is prefixed with whitespace
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList2 (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://semeb.com/dpldemo/index.php/Bu...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-21 14:35 UTC by Gunter Schmidt
Modified: 2007-03-04 20:17 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gunter Schmidt 2007-02-21 14:35:46 UTC
If you have your pages using the template with "{{ TemplateName ..." it is not evaluated, as there is a 
blank between the brackets and the templatename.

Example is set up on dpl-webpage.
Comment 1 Gunter Schmidt 2007-02-21 15:00:32 UTC
Already found a solution:

<pre> 
#DynamicPageList2Include.php

function wfDplLstIncludeTemplate($parser, $page='', $template1='', $template2='')
{
	$text = $parser->fetchTemplate(Title::newFromText($page));
+	do 
+		$text = str_replace('{{ ', '{{', $text, $tc);
+	while ($tc > 0);
    if ( preg_match( "/\{\{".$template1."/im", $text, $m, PREG_OFFSET_CAPTURE) ) {
</pre>
Comment 2 Rob Church 2007-02-21 17:32:37 UTC
Looks like DPL2 isn't parsing the templates right.
Comment 3 Gunter Schmidt 2007-03-04 20:17:49 UTC
Fixed with 0.9.8

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links