mediawiki4intranet / Wikilog

Heavily improved Wikilog extension
http://wiki.4intra.net/Wikilog
GNU General Public License v2.0
10 stars 10 forks source link

It does not work with MediaWiki 1.34.1 #36

Open vporton opened 4 years ago

vporton commented 4 years ago

/Blog:Main:

[bc7a5cfb2b2842036af6d69b] /~porton/mediawiki-1.34.1/index.php/Blog:Main Error from line 107 of /home/porton/public_html/mediawiki-1.34.1/extensions/Wikilog/WikilogItemPager.php: Call to undefined method ParserOptions::getEditSection()

Backtrace:

#0 /home/porton/public_html/mediawiki-1.34.1/extensions/Wikilog/WikilogMainPage.php(102): WikilogSummaryPager->__construct(WikilogItemQuery)
#1 /home/porton/public_html/mediawiki-1.34.1/includes/actions/ViewAction.php(63): WikilogMainPage->view()
#2 /home/porton/public_html/mediawiki-1.34.1/includes/MediaWiki.php(511): ViewAction->show()
#3 /home/porton/public_html/mediawiki-1.34.1/includes/MediaWiki.php(302): MediaWiki->performAction(WikilogMainPage, Title)
#4 /home/porton/public_html/mediawiki-1.34.1/includes/MediaWiki.php(900): MediaWiki->performRequest()
#5 /home/porton/public_html/mediawiki-1.34.1/includes/MediaWiki.php(527): MediaWiki->main()
#6 /home/porton/public_html/mediawiki-1.34.1/index.php(44): MediaWiki->run()
#7 {main}

Even if you are not going to fix it yourself (are you going?), please give me an advice how to fix it.

szotsaki commented 4 years ago

This doesn't bring back the functionality, but makes the page work (and will show edit links all the time):

diff --git a/WikilogItemPager.php b/WikilogItemPager.php
index 1cd6a91..ff53084 100644
--- a/WikilogItemPager.php
+++ b/WikilogItemPager.php
@@ -101,10 +101,10 @@ class WikilogSummaryPager
                } else {
                        $popt = $wgOut->parserOptions();

-               # We will need a clean parser if not including.
+                       # We will need a clean parser if not including.
                        $wgParser->startExternalParse( $wgTitle, $popt, Parser::OT_HTML );
                }
-               $this->mShowEditLink = $popt->getEditSection();
+               $this->mShowEditLink = true; //$popt->getEditSection();
        }

        /**

Apart from it, it's worth checking the pending PRs and applying them until and including #29.