Skin talk:Minerva Neue

About this board

87.163.196.60 (talkcontribs)

I do have an edit on every page - but not on the main page.

So, mobile users cannot edit the main page.

For my application, this is bad.

Jdlrobson (talkcontribs)

You'll need to add a link inside the wikitext to support this. You can hide the link for desktop if needed in MediaWiki:Common.css

46.148.198.130 (talkcontribs)

how

2A01:C23:6551:3B00:D482:7E82:712E:5E0A (talkcontribs)

i also have no edit capabilities on the mainpage. i use it in desktop mode. have to switch to another skin for editing content of the mainpage.

Reply to "No edit on main page"

Footer Links in Mobile View using Minerva Neue

2
70.188.76.218 (talkcontribs)

At the bottom of each page there is a link to "Desktop". Is there any way to add more links to this footer area?

Tinss (talkcontribs)

Sadly it's not possible. A patch to implement that feature would be welcome !

Reply to "Footer Links in Mobile View using Minerva Neue"

VisualEditor as the default editor

2
Summary by Tinss

Set $wgMFDefaultEditor = 'visual'; in LocalSettings.php.

Tinss (talkcontribs)

Does anyone know how to set VE as the default editor ? According to this page, it's possible but there is no mention on how.

Tinss (talkcontribs)

Found it. It is set in the MobileFrontend extension ($wgMFDefaultEditor = 'visual';).

Enabling AMC (Advanced Mobile Contributions) on a private wiki

4
Tinss (talkcontribs)

To enable AMC on your private wiki. In LocalSettings.php:

wfLoadSkin( 'MinervaNeue' );
...
$wgMinervaAdvancedMainMenu = ['base' => true];
$wgMinervaPersonalMenu = ['base' => true];

Then, in skins/MinervaNeue/includes/Menu/User/AdvancedUserMenuBuilder.php replace the getGroup method with the following code and set the mobile-frontend-user-create-account message.

	public function getGroup( array $personalTools ): Group {
                $group = new Group( 'p-personal' );

                if ( $this->user->isAnon() ) {
                        $entry = SingleMenuEntry::create(
                                'userContributions',
                                $this->messageLocalizer->msg( 'mobile-frontend-user-create-account' )->escaped(),
                                \SpecialPage::getSafeTitleFor('Create_account')->getLocalURL()
                        );
                        $group->insertEntry( $entry );

                        $this->definitions->insertLogInMenuItem( $group );
                        Hooks::run( 'MobileMenu', [ 'user', &$group ] );
                        return $group;
                }

                $group->insertEntry( new ProfileMenuEntry( $this->user ) );
                $talkPage = $this->user->getUserPage()->getTalkPageIfDefined();
                if ( $talkPage ) {
                        $entry = SingleMenuEntry::create(
                                'userTalk',
                                $this->messageLocalizer->msg( 'mobile-frontend-user-page-talk' )->escaped(),
                                $talkPage->getLocalURL()
                        );
                        $entry->setIcon( 'userTalk', 'before' );
                        $group->insertEntry( $entry );
                }

                $this->definitions->insertWatchlistMenuItem( $group );
                $this->definitions->insertContributionsMenuItem( $group );
                $this->definitions->insertLogOutMenuItem( $group );
                Hooks::run( 'MobileMenu', [ 'user', &$group ] );
                return $group;
        }

This code assumes that your wiki is private, but that users are free to create an account. If that is not the case, simply remove the line that adds a link to create an account.

If someone is willing to make that menu adapt to user permissions and commit it to the Minerva skin that would be great.

Jdlrobson (talkcontribs)
Tinss (talkcontribs)

In the user menu, Minerva will display for anonymous users the user's IP address, contributions, watchlist and so on. This makes sense for Wikipedia which allows anonymous users to edit, but on a private wiki which requires logging in for editing, this is not appropriate. In this cas, the only menu items for anonymous users should be to create an account or log in.

Jdlrobson (talkcontribs)

Ah thanks for clarifying.

In 1.38, you can use the following code in LocalSettings.php to disable menu items:

$wgHooks['SkinTemplateNavigation::Universal'][] = function ( $skinTemplate, &$links ) {
unset( $links['user-menu']['createaccount'] );
unset( $links['user-menu']['login'] );
unset( $links['user-menu']['login-private'] );
unset( $links['user-menu']['anoncontribs'] );
};

In MediaWiki < 1.38 I suggest hiding these elements by editing MediaWiki:Minerva.css add using


$wgMFSiteStylesRenderBlocking = true;
Reply to "Enabling AMC (Advanced Mobile Contributions) on a private wiki"

Images don't appear to be responsive

3
NemesisAT (talkcontribs)

I've found recently, both on Wikipedia and my own wiki, that 2x resolution images are not being delivered by MobileFrontend/MinervaNeue. If I download an image from an article on Wikipedia in the mobile skin, then switch to the desktop skin and download the same image, the new image is double the resolution.

Jdlrobson (talkcontribs)
NemesisAT (talkcontribs)

Thank you! From that thread I found this one, and I've managed to re-enable the functionality by setting $wgMFStripResponsiveImages to false.

Reply to "Images don't appear to be responsive"

No suggestions to create a new page

1
84.111.224.227 (talkcontribs)

When using other skins, if I search a page and there are no exact results, there's a short text and link to create the page. More comfortable than editing the URL.

Reply to "No suggestions to create a new page"
84.111.224.227 (talkcontribs)

Using other skins, there's an edit tab and I can edit pages. But when I use MinervaNeue, no edit button/link anywhere in sight. The debug log has the below exception when loading the main page. It doesn't appear when another skin is used. I'm using MW 1.36 and the skin version is – (7203827) 17:04, 4 September 2021

[GlobalTitleFail] MessageCache::parse called with no title set.

#0 /var/www/html/includes/language/Message.php(1331): MessageCache->parse(string, NULL, boolean, boolean, Language)

#1 /var/www/html/includes/language/Message.php(922): Message->parseText(string)

#2 /var/www/html/includes/language/Message.php(953): Message->format(string)

#3 /var/www/html/includes/TemplateParser.php(173) : eval()'d code(73): Message->__toString()

#4 /var/www/html/includes/TemplateParser.php(291): TemplateParser->{closure}(array, array)

#5 /var/www/html/includes/skins/SkinMustache.php(143): TemplateParser->processTemplate(string, array)

#6 /var/www/html/includes/skins/SkinTemplate.php(146): SkinMustache->generateHTML()

#7 /var/www/html/includes/OutputPage.php(2634): SkinTemplate->outputPage()

#8 /var/www/html/includes/MediaWiki.php(927): OutputPage->output(boolean)

#9 /var/www/html/includes/MediaWiki.php(940): MediaWiki::{closure}()

#10 /var/www/html/includes/MediaWiki.php(546): MediaWiki->main()

#11 /var/www/html/index.php(53): MediaWiki->run()

#12 /var/www/html/index.php(46): wfIndexMain()

#13 {main}

84.111.224.227 (talkcontribs)

Note: no actions in the MW site when using '?useskin=minerva' either

84.111.224.227 (talkcontribs)

So, this seems to be limited to the main page. Doesn't work on wikipedia either. Very confusing.

Reply to "No edit actions on pages"

Don't call $output->setPageTitle() with empty string

2
140.213.165.50 (talkcontribs)

With Minerva skin activated and not logged in, on homepage I found that the page title is empty, including the title bar (in the browser). Leaving weird title there - My Wiki Site.

The cause is here: /skins/MinervaNeue/includes/Skins/SkinMinerva.php there is:

$out->setPageTitle( $pageTitle );

It should be wrapped with a conditional:

if ( strlen($pageTitle) ) {

    $out->setPageTitle( $pageTitle );

}

Quick fix is appreciated. Thanks.

Jdlrobson (talkcontribs)
Reply to "Don't call $output->setPageTitle() with empty string"

increase max width on desktop

4
2001:8F8:1E23:DE9:D94E:8FD4:457A:4C50 (talkcontribs)

how to increase max width on desktop

i tried the following with no luck:

@media screen and ( min-width: @width-breakpoint-desktop ) .banner-container, .header, .page-header-bar, .overlay-header, .content, .overlay-content, .content-unstyled, .pre-content, .post-content, #mw-content-text > form { margin-right: auto; margin-left: auto; width: 100%; max-width: 70em; }

79.249.159.6 (talkcontribs)

Try a fixed width breakpoint such as (min-width:960px).

Polymath uk (talkcontribs)

Did you ever find out how to do this? TIA

Polymath uk (talkcontribs)

I finally figured this out. I could not fix this with CSS mods. I edited the skin file responsible which I realise is considered bad practice. If anyone knows how to incorporate what I have posted below into a CSS mod please comment.

The file I changed was in $IP/skins/MinervaNeue/resources/skins.minerva.content.styles/tablet/common.less

At the end of the file is a section that reads:


@media screen and ( min-width: @width-breakpoint-desktop ) {

        // stylelint-disable-next-line selector-max-id

        .banner-container,

        /* FIXME: Generic header class needed me-thinks! */

        .header,

        .page-header-bar,

        .overlay-header,

        /* FIXME: Generic content class needed? */

        .content,

        .overlay-content,

        .content-unstyled,

        .pre-content,

        .post-content,

        /* Form only pages e.g. Special:MobileOptions */

        #mw-content-text > form {

                margin-left: auto;

                margin-right: auto;

                width: 90%;

                max-width: @contentMaxWidthTablet;

        }

        .header {

                // Make sure the main menu and secondary button icon images are$

                // with the content.

                max-width: @contentMaxWidthTablet + 2 * @iconGutterWidth;

        }


Modify the section under #mw-content-text > form


        #mw-content-text > form {

                margin-left: 5%;

                margin-right: 5%;

                width: 90%;

                max-width: 90%;

        }


You can of course enter whatever margins you wish and also a max-width. I tried setting max-width: none; but this caused a horizontal scrollbar with a tiny scrolling area. The value above seem to work fine on many screen sizes.

Reply to "increase max width on desktop"

Deprecated: Use of SkinTemplateOutputPageBeforeExec hook ... was deprecated in MediaWiki 1.35

2
Noloader (talkcontribs)

Hi Everyone,

We recently updated to Mediawiki 1.36. I'm testing some of our installed skins under it.

Minerva Neue is causing this warning to be printed on the top of each page:

Deprecated: Use of SkinTemplateOutputPageBeforeExec hook (used in HitCounters\Hooks::onSkinTemplateOutputPageBeforeExec) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/html/w/includes/HookContainer/HookContainer.php at line 137] in /var/www/html/w/includes/debug/MWDebug.php on line 376

I have no idea why we are running debug code on a production server. I guess that's a separate issue for the Mediawiki folks.

My apologies if this is not a Minerva Neue issue.

Our mediawiki information can be found here.

Ammarpad (talkcontribs)

This is not caused by Minerva skin; the extension causing the issue is already mentioned in the deprecation message, which is Extension:HitCounters.

Reply to "Deprecated: Use of SkinTemplateOutputPageBeforeExec hook ... was deprecated in MediaWiki 1.35"