#The database name doesn't end in a valid suffix (e.g. 'wiki').

1 messages · Page 1 of 1 (latest)

untold dawn
#

Error in the title

#

The relevant Confic:

#
$wgCreateWikiCategories = [
    'General' => 'general'
];
$wgCreateWikiUseCategories = true;
$wgCreateWikiUseClosedWikis = true;
$wgCreateWikiUseCustomDomains = true;
$wgCreateWikiUseExperimental = true;
$wgCreateWikiUseInactiveWikis = true;
$wgCreateWikiUsePrivateWikis = true;
$wgCreateWikiUseJobQueue = true;
$wgCreateWikiDatabase = 'mwikis';
$wgCreateWikiGlobalWiki = 'mw';
$wgCreateWikiSubdomain = '<my_domain>';
$wgCreateWikiCacheDirectory = 'cache';
$wgCreateWikiSQLfiles = [
    "$IP/maintenance/tables-generated.sql"
];
#

<@&803977072875405422>

#

Help

toxic nymph
#

Please don't ping administrators, they're only Discord mods

#

CreateWiki is extremely hard to install

#

Does your central wiki's database end in -wiki?

#

It doesn't

#

you'll need to rename your central database to end in "wiki"

untold dawn
#

It's nice to see that in the documentation

#

😒

#

But thanks

toxic nymph
#

Documentation isn't good for third parties, yeah

#

it's mostly meant for Miraheze so docs are more of an afterthought lol

wispy agate
#

Pretty sure that's not a requirement

toxic nymph
#

wgCreateWikiDatabaseSuffix controls that I think

#

though I don't know if you can just set that to be blank

untold dawn
#
$wgCreateWikiDatabaseSuffix = null;
toxic nymph
#

What about ''?

untold dawn
#

Nope

#

Does not work either

wispy agate
#

I'm also pretty sure you have to configure $wgConf->suffixes

toxic nymph
#

I think WikiInitalise does that?

wispy agate
#

only if you're using it

#

to use WikiInitialize you have to require_once the file and then create a new object

untold dawn
#

Is this a array?

wispy agate
wispy agate
#

In my setup I used

$wgConf->suffixes = [ 'wiki' ];
untold dawn
toxic nymph
untold dawn
#

Yes

wispy agate
#

Did you have it working with CentralAuth before you started with CreateWiki?

wispy agate
#

Yes, referring to your setup

untold dawn
untold dawn
#

So, I now have it so far that the subwiki is created.... However, it only runs on the main instance (testwiki.<wikidomain> is the same as if I simply call <wikidomain>).

untold dawn
#

Oh, and I still have this error

#

DB connection domain 'mw' does not match 'mw-mw_'

#

@toxic nymph

toxic nymph
#

I've never seen that error in my life

toxic nymph
#

i.e. a method that tells MediaWiki that testwiki.domain is one wiki and domain is another wiki, etc

#

CreateWiki by itself doesn't automatically do that

#

You either need to use WikiInitalise or set an if statement to manually do that via LocalSettings.php

untold dawn
toxic nymph
#

if you want CreateWiki to handle it then invoke WikiInitalise: require_once "$IP/extensions/CreateWiki/includes/WikiInitialise.php"; $wi = new WikiInitialise();

untold dawn
toxic nymph
#

yes, you manually add them every time you create a new wiki

#

It's actually easier than using WikiInitalise heh

untold dawn
#

And how do Miraheze do that? I don't think Miraheze do it manually

toxic nymph
#

We used to use WikiInitalise

untold dawn
#

Only with the 2 lines it does not work

#

Do I still need parameters?

toxic nymph
#

I believe you also have to add $wi->readCache(); $wi->config->extractAllGlobals( $wi->dbname ); $wgConf = $wi->config; at the bottom of your LocalSettings

toxic nymph
#

CreateWiki likes things in a very specific manner. If it doesn't work with that then that's about as much as I can help as I'm away from my computer which has a config which works for CreateWiki.

untold dawn
#
    [
        '127.0.0.1' => ''
    ]
untold dawn
#

@toxic nymph

#

There?

toxic nymph
#

I think you have to copy the entire setVariables config, including the array

#

and change 127.0.0.1 to your wiki's URL

untold dawn
toxic nymph
#

er, set the 127.0.0.1 to the root of your wiki's domain

#

If that doesn't work then that means there's a cache issue

untold dawn
#

@toxic nymph

#

Works so far

#

But, i get this:

#

MWException: Wiki 'mw' can not be found

#

How do I put the main wiki into the CreateWiki table?

toxic nymph
#

add all of this but replace wikidb with mw and replace the 127.0.0.1 with your wiki's URL

untold dawn
#

$wgCreateWikiDatabase = 'mwikis';

#

Table 'wiki.cw_wikis' doesn't exist INSERT IGNORE INTO cw_wikis

#

Anyway, put everything on wiki, everything seems to work....

untold dawn
#

But

#

The database name doesn't end in a valid suffix (e.g. 'wiki').

#

@toxic nymph

toxic nymph
#

I don't really know what to say

#

You'll have to rename your main wiki I'm guessing

#

er

#

You're trying to use Special:CreateWiki?

#

If so, put "<subdomain>wiki" in the first field

untold dawn
toxic nymph
#

I've noticed that happen sometimes but I don't really know how to fix that

#

It has something to do with the placing of variables last I remember but maybe my issue was different than yours

#

I'm stumped

untold dawn
untold dawn
#

@toxic nymph

untold dawn
untold dawn
#

<@&803977072875405422>

#

These changes have solved my problem

toxic nymph
#

Don't ping administrators

untold dawn
toxic nymph
#

They're Discord administrators, there's legit need for them to be pinged sometimes

toxic nymph
#

Being able to create a wiki without the suffix will break things

untold dawn
toxic nymph
#

The - in -wiki is to signify that there's something before it

#

so I meant wikis end in "wiki"

#

like testwiki, metawiki, commonswiki, etc.

untold dawn
#

Hmm

#

Why do I then get the error with the invalid suffix?

#
$wgConf->suffixes = [
    'wiki'
];
#

And yes, the names end with wiki

toxic nymph
#

that's strange

#

At the beginning of LocalSettings.php, after invoking WikiInitalise, do you have this? $wi->setVariables( "$IP/cache", [ '' ], [ '<domain>' => 'wiki' ] );

#

where domain is the root domain?

untold dawn
#
$wi->setVariables(
    "$IP/cache",
    [
        ''
    ],
    [
        '<domain>' => ''
    ]
);
toxic nymph
#

that should work then

#

Do you have WikiInitalise invoked?

untold dawn
#
require_once "$IP/extensions/CreateWiki/includes/WikiInitialise.php";
$wi = new WikiInitialise();
#

?

toxic nymph
#

Yes

#

It should be near the top of your LocalSettings

untold dawn
warm drum
#

Would you mind letting us know for what you need CreateWiki for? Is it for a project or mostly just for testing things out?

untold dawn
#

Each for one gamemode

warm drum
#

Ah, I see

untold dawn
#

How do I run Mediaswiki CLIs in subwikis?

#

Something like php maintenance/update.php --quick

#

Ah, got it

#

php maintenance/run.php --wiki <database> <maintenance_script>

#

Okay, got it working... Well, if I create the databases and import the SQL files manually

untold dawn
#

@warm drum

#

There?

untold dawn
#

How do I configure global groups?

#

And with Special:CentralAuth it is not registered in which subwikis the account already was

warm drum
#

Please note that your comments in the GitHub repository were disrespectful and a MSCoC violation. This is a notice not to continue with that kind of tone here.
CreateWiki/ManageWiki is meant to be neutral but in some cases may have some Miraheze-related settings. In your latest PR, you tried to add some settings specific to your installation, instead of doing that locally via LocalSettings.php (as Miraheze does). As frustrating as that may be, there's no right to treat people with disrespect.

untold dawn
#

Frustrating is still less than an understatement

#

And instead of just closing directly, one could have simply explained it to me? But what for? Rather destroy the work of others

#

And when I write to you here, no one responds! But as soon as it becomes critical, one answers me here? I'm sure you have a lot to do, no question... But you will have 10 minutes in between, won't you?

warm drum
#

How is closing a PR destroying work?

#

The work you did is still available, no one destroyed anything. We just closed it because it's not something we'll accept for our extension

#

You are free to copy ManageWiki (with correct licensing) and make a fork

#

And once again, as I said in the beginning, we are unable to help with basic MediaWiki questions as we already have a lot to do (if you just look at Phabricator). And I think it's worth pointing out again that we're not paid for any of this. Certainly if users are impatient and disrespectful that won't make us want to help more/