Issue:DPL error code "DynamicPageList2.php on line 2238"

From FollowTheScore
Revision as of 07:48, 31 December 2007 by Roc michael (talk | contribs) (Reply)
Jump to: navigation, search
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)

You may have made an editing error. Try again. Gero 00:39, 31 December 2007 (CET)

Sorry Gero.
You are right! After I check out the line 846. I find the problem like following image.
20071227 DPL calendar has no error-1.png
Then, I use another editor to edit the file. All problems are disappear. Thank you! Do you want to make a new version of DPL for this issue? Or I will have a special version DPL.--Roc michael 07:48, 31 December 2007 (CET)