•  
      request #28299 Absolute links opens a new tab
    Infos
    #28299
    Manuel Vacelet (vaceletm)
    2022-11-17 18:00
    2022-09-12 10:18
    29860
    Details
    Absolute links opens a new tab

    Whenever an absolute link is present in a page, it will open a new tab. Is it possible to change this behavior so links loads in the same page ?

    Mediawiki Standalone
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Robert Vogel (rvogel)
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    2022-11-17
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    I finally got the final answer, as far as I can tell, there is a cache of the page. Just removing $GLOBALS['wgExternalLinkTarget'] = '_blank'; in /usr/share/mediawiki-tuleap-flavor/LocalSettings.Tuleap.php is a first step but the page must be edited, then links are no longer _blank.

    gerrit #27243 in review.


    • Status changed from New to Under review
    • Assigned to changed from None to Manuel Vacelet (vaceletm)
    User avatar

    i tried this locally, and it works. Please try to put it and the very end of LocalSettings.php, to make sure nothing overrides Also, did you try with links from the default main page? its possible that those have target hardcoded (not sure how that content was created). Try adding [https://google.com] on some random page and test with that link.

    User avatar

    I tried:

    • Removing $GLOBALS['wgExternalLinkTarget'] = '_blank';
    • Setting $GLOBALS['wgExternalLinkTarget'] = false;

    Both in /usr/share/mediawiki-tuleap-flavor/LocalSettings.Tuleap.php without luck. Links still opens in new tabs

    User avatar

    This is controlled by config variable $GLOBALS['wgExternalLinkTarget']. By default its set to _blank, which is why it opens links in new tab (not sure who or why set it like that). To disable it, remove line $GLOBALS['wgExternalLinkTarget'] = '_blank'; from LocalSettings.Tuleap.php or, if not present, set this variable to false.