aldrinbaroi / mediawiki-page-attachment

Automatically exported from code.google.com/p/mediawiki-page-attachment
Other
1 stars 1 forks source link

Fatal error: Call to private method LinksUpdate::getExistingCategories() from context 'PageAttachment\Category\CategoryManager' #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable set category on upload
2. Access any page

What is the expected output? What do you see instead?
No error.

Please use labels and text to provide additional information.
MediaWiki 1.19aplha

Original issue reported on code.google.com by Aldrin.Baroi@gmail.com on 19 Feb 2012 at 5:36

GoogleCodeExporter commented 9 years ago

Original comment by Aldrin.Baroi@gmail.com on 19 Feb 2012 at 5:37

GoogleCodeExporter commented 9 years ago
Fix for issue# 41 would make it incompatible with MediaWiki 1.18.x.  So, 
changing the release number to 3.0.0

Original comment by Aldrin.Baroi@gmail.com on 21 Feb 2012 at 2:35

GoogleCodeExporter commented 9 years ago
Looks like in MediaWiki 1.19, method access permissions changed from "public" 
to "private" in "LinksUpdate" class for the methods used by "PageAttachment" 
extension to get category related information.  

The only solution (VERY BAD) is to copy the needed methods (code) from 
MediaWiki's "LinksUpdate" class and create "PageAttachment" specific class.

Need to explore more before giving up!

Original comment by Aldrin.Baroi@gmail.com on 21 Feb 2012 at 10:44

GoogleCodeExporter commented 9 years ago
Test with MediaWiki 1.19.0-beta2 -- same issue.

Original comment by Aldrin.Baroi@gmail.com on 12 Apr 2012 at 7:40

GoogleCodeExporter commented 9 years ago

Original comment by Aldrin.Baroi@gmail.com on 15 Apr 2012 at 3:32

GoogleCodeExporter commented 9 years ago
Fixed.

The following methods are copied from "LinksUpdate" class from 
"LinksUpdate.php" file and
updated to pass in $linksUpdate object; since these methods are now private in 
MediaWiki 1.19

       1) getExistingCategories()
       2) getCategoryDeletions()

NOTE:
==== 
The following variables are not still private in "LinksUpdate" class.
       1) $mDb
       2) $mId
       3) $mOptions
       4) $mCategories

If any of the above variable's access permission is changed to private
then need to rewrite these methods again.

Original comment by Aldrin.Baroi@gmail.com on 22 Apr 2012 at 11:13