Difference between revisions of "Issue:DPL error code "DynamicPageList2.php on line 2238""

From FollowTheScore
Jump to: navigation, search
Line 50: Line 50:
 
  Parse error: parse error, unexpected T_STRING in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 846
 
  Parse error: parse error, unexpected T_STRING in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 846
 
::Then, I undo it but it still show the message until I re-download the DPL from your site.--[[User:Roc michael|Roc michael]] 16:47, 30 December 2007 (CET)
 
::Then, I undo it but it still show the message until I re-download the DPL from your site.--[[User:Roc michael|Roc michael]] 16:47, 30 December 2007 (CET)
 
----
 
 
There was a bracket missing, try:
 
 
if (is_array($aSecLabels[$i]) && $aSecLabels[$i][0]=='#') $aMultiSecSeparators[$i] = "\n----\n";
 
 
:[[User:Gero|Gero]] 00:36, 31 December 2007 (CET)
 

Revision as of 01:37, 31 December 2007

Description: DPL error code "DynamicPageList2.php on line 2238"
Extension / Version: DPL   /   1.6.4
Type / Status: Bug   /   open

Problem

Hi Gero.

When I use some dpl queries(e.g DPL calendar or others), I will get following error code:

Notice: Uninitialized string offset: 0 in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 2238

Notice: Uninitialized string offset: 0 in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 2238

And whether I disable the Semantic Mediawiki or not, it will always appear. What I see is just like following picture.

20071227 DPL calendar has error.png

When the same page has no DPL query, It will be normal. See following picture.

20071227 DPL calendar no error.png
  • DynamicPageList2 (version 1.6.4)
  • MediaWiki: 1.11.0
  • Win XP
  • The AppServ Open Project - 2.5.7 for Windows
    • Apache Web Server Version 2.2.3
    • PHP Script Language Version 5.1.6
    • MySQL Database Version 5.0.24a
    • phpMyAdmin Database Manager Version 2.9.0.2

Could you give me a hand?

Reply

Probably your DPL query contains more secseparator arguments than there are include sections. The error should disappear if the numbers match. In addition you can try the following bug fix in the php code line 2238:

if (is_array($aSecLabels[$i]) && $aSecLabels[$i][0]=='#') 	$aMultiSecSeparators[$i] = "\n----\n";

Gero 10:29, 29 December 2007 (CET)

Gero. Thank your for reply.
After I changed the line 2238
if ($aSecLabels[$i][0]=='#') 	$aMultiSecSeparators[$i] = "\n----\n";
into
if (is_array($aSecLabels[$i]) && $aSecLabels[$i][0]=='#') 	$aMultiSecSeparators[$i] = "\n----\n";
I got the following message
Parse error: parse error, unexpected T_STRING in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 846
Then, I undo it but it still show the message until I re-download the DPL from your site.--Roc michael 16:47, 30 December 2007 (CET)