Page MenuHomePhabricator

DynamicPageList (third-party) refers to CategoryPage.php which no longer exists
Closed, ResolvedPublic

Description

When using Extension:DynamicPageList (third-party), this wikitext crashes if you use "mode=category":

<dpl>
category = Anything
mode = category
</dpl>

because DynamicPageList/DPL.php line 1484 contains this line:

require_once( 'CategoryPage.php' );

This file no longer exists in MediaWiki 1.26, I guess. Delete this line, and the problem goes away.

Event Timeline

maiden_taiwan raised the priority of this task from to Needs Triage.
maiden_taiwan updated the task description. (Show Details)
maiden_taiwan added a subscriber: maiden_taiwan.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 28 2015, 6:39 PM

This is DPL version 2.3.0.

Here is a patch. Your patch uploader page wouldn't accept it.

Here is a patch.

Thanks!

Your patch uploader page wouldn't accept it.

Uh? What did you try exactly and what was the error you got in Gerrit?

! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)

In the full output below, I see a hint to scp a hook file from gerrit, but when I ran it, I got an SSH "Permission denied (publickey)". I would like to be a good citizen and provide this patch through the supported channel, but I don't have time to figure this out....

Result from uploading patch:
/data/project/gerrit-patch-uploader/git/bin/git clone --depth=1 ssh://gerrit/mediawiki/extensions/DynamicPageList /tmp/486658.1.webgrid-lighttpd/tmp3Z6yRv
Cloning into '/tmp/486658.1.webgrid-lighttpd/tmp3Z6yRv'...
Total 181 (delta 57), reused 153 (delta 47)

/data/project/gerrit-patch-uploader/git/bin/git rev-parse --abbrev-ref HEAD
Will commit to branch: master

/data/project/gerrit-patch-uploader/git/bin/git config user.name [[mw:User:Maiden taiwan]]
/data/project/gerrit-patch-uploader/git/bin/git config user.email gerritpatchuploader@gmail.com

scp -p gerrit:hooks/commit-msg .git/hooks/

/data/project/gerrit-patch-uploader/git/bin/git apply < patch
error: patch failed: DPL.php:1481
error: DPL.php: patch does not apply

patch --no-backup-if-mismatch -p0 < patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/DPL.php b/DPL.php
|index f33ef4b..1d90604 100644
|--- a/DPL.php
|+++ b/DPL.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored

patch --no-backup-if-mismatch -p1 < patch
(Stripping trailing CRs from patch.)
patching file DPL.php


/data/project/gerrit-patch-uploader/git/bin/git add -A

/data/project/gerrit-patch-uploader/git/bin/git commit --author='Daniel Barrett <mediawiki@blazemonger.com>' -F - < message
[master 15f62a6] Don't include CategoryPage.php -- it no longer exists
 Author: Daniel Barrett <mediawiki@blazemonger.com>
 1 file changed, 1 deletion(-)

/data/project/gerrit-patch-uploader/git/bin/git rev-list -1 HEAD
15f62a60b2dfbff2f6a852443f8657eddc2fd81c


/data/project/gerrit-patch-uploader/git/bin/git push origin HEAD:refs/for/master
remote: Resolving deltas:  50% (1/2)   
remote: Resolving deltas: 100% (2/2)   
remote: Resolving deltas: 100% (2/2)
remote: 
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done    
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: Don't include CategoryPage.php -- it no longer exists
remote: 
remote: Change-Id: I15f62a60b2dfbff2f6a852443f8657eddc2fd81c
remote: 
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 gerrit-patch-uploader@gerrit.wikimedia.org:hooks/commit-msg ${gitdir}/hooks/
remote: 
remote: 
To ssh://gerrit/mediawiki/extensions/DynamicPageList
 ! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://gerrit/mediawiki/extensions/DynamicPageList'
Upload failed
Reason: Push failed (check log above for details)

Change 330262 had a related patch set uploaded (by Dbarrett):
Removed reference to obsolete, nonexistent file CategoryPage.php.

https://gerrit.wikimedia.org/r/330262

Finally managed to have time to get developer access, and submitted the patch above. This bug has been around for 3 releases, so hopefully this will eliminate it.

Change 330262 merged by jenkins-bot:
Removed reference to obsolete, nonexistent file CategoryPage.php.

https://gerrit.wikimedia.org/r/330262

Umherirrender closed this task as Resolved.Jan 21 2017, 10:46 PM