Jdlrobson added a comment.

  @cscott we are going to need a new core hook to restore this behaviour:
  
    diff --git a/includes/EditPage.php b/includes/EditPage.php
    index 243042cee6..79ac2f81f0 100644
    --- a/includes/EditPage.php
    +++ b/includes/EditPage.php
    @@ -4250,6 +4250,20 @@ class EditPage implements IEditObject {
                    $pstContent = $contentTransformer->preSaveTransform( 
$content, $this->mTitle, $user, $parserOptions );
                    $scopedCallback = $parserOptions->setupFakeRevision( 
$this->mTitle, $pstContent, $user );
                    $parserOutput = $contentRenderer->getParserOutput( 
$pstContent, $this->mTitle, null, $parserOptions );
    +               // @todo: Hook needed here to allow WikidataPageBanner to 
disable table of contents with code below:
    +               if ( $parserOutput->getExtensionData( 'wpb-banner-options' 
) !== null ) {
    +                       $options = $parserOutput->getExtensionData( 
'wpb-banner-options' );
    +                       $tocInBanner = $options['enable-toc'] ?? false;
    +                       if ( $tocInBanner ) {
    +                               $parserOutput->setText(
    +                                       
Parser::replaceTableOfContentsMarker(
    +                                               $parserOutput->getRawText(),
    +                                               ''
    +                                       )
    +                               );
    +                       }
    +               }
    +               // @todo: end book.
                    ScopedCallback::consume( $scopedCallback );
                    return [
                            'parserOutput' => $parserOutput,

TASK DETAIL
  https://phabricator.wikimedia.org/T295632

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jdlrobson
Cc: Atsirlin, Jdlrobson, cscott, Andyrom75, Aklapper, Nishu02, bwang, cjming, 
Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, 
Jayprakash12345, QZanden, LawExplorer, Winter, _jensen, rosalieper, Scott_WUaS, 
Wong128hk, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to