Topic on Project:Support desk

Restoring mediawiki to defaults

6
Michael1111 (talkcontribs)

Right

I have been trying to change the mainpage which seemed to be a lot of effort as I didn't want redirects and I didn't want it to be called mainpage. I changed where the logo would redirect to and that worked fine, but when I was trying to change the link in the sidebar it kept sending me to 'INVALID-TITLE'. Literally anything other than what I wanted to put in there would work, but the page I needed to go to just sent me to 'INVALID-TITLE'

Anyway I've messed it up and now this piece of code which I had to change where the logo directs to now breaks it entirely when I remove it again

/* Change the main page url used in things like the logo to a url of another page on the wiki */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = Title::newFromText('Text')->getLocalURL(); // Point the main page url to a wiki page's url return true; }

so I would like to reset all my mainpages and sidebar links to the defaults if that is possible or do I need to reinstall?
88.130.122.124 (talkcontribs)

Hi!

Which page is the main page can be configured as described here: Manual:FAQ#How_do_I_change_which_page_is_the_main_page.3F.

All other changes you did should then no longer be necessary: Remove the stuff from LocalSettings.php and delete those pages in the MediaWiki: namespace in your wiki, which you have created to change the URL. :-)

158.234.250.71 (talkcontribs)

Thanks for that. What is the default entry for the mainpage link in the sidebar as that is still taking me to 'INVALID-TITLE'?

Thanks

88.130.122.124 (talkcontribs)

This is the default content of the sidebar: []. You are obviously looking for this line:

mainpage|mainpage-description
158.234.250.71 (talkcontribs)

adding that changes the link to take me to 'INVALID-TITLE'

is 'mainpage' the name of a variable(?) or the actual name of the main page?

Florianschmidtwelzow (talkcontribs)

Hello,

what is the content of MediaWiki:Mainpage?? This should be Main Page, which is default.

EDIT: Yes, mainpage is an interface message :)

Reply to "Restoring mediawiki to defaults"