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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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