#The database name doesn't end in a valid suffix (e.g. 'wiki').
1 messages · Page 1 of 1 (latest)
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
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"
Documentation isn't good for third parties, yeah
it's mostly meant for Miraheze so docs are more of an afterthought lol
Pretty sure that's not a requirement
wgCreateWikiDatabaseSuffix controls that I think
though I don't know if you can just set that to be blank
That already doesn't work:
$wgCreateWikiDatabaseSuffix = null;
What about ''?
I'm also pretty sure you have to configure $wgConf->suffixes
I think WikiInitalise does that?
only if you're using it
to use WikiInitialize you have to require_once the file and then create a new object
But how?
Is this a array?
This might be helpful for getting it setup, but CreateWiki is not really something I'd recommend for most people https://github.com/Universal-Omega/scripts/blob/master/mediawiki/globals/setup-CreateWiki.php
Check the manual, https://www.mediawiki.org/wiki/Manual:$wgConf, but yes
In my setup I used
$wgConf->suffixes = [ 'wiki' ];
Wikimedia\Rdbms\DBQueryError: Error 1049: Unknown database 'centralauth'
Do you have CentralAuth installed?
Yes
Did you have it working with CentralAuth before you started with CreateWiki?
Like mine?
Yes, referring to your setup
No, not really
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>).
Oh, and I still have this error
DB connection domain 'mw' does not match 'mw-mw_'
@toxic nymph
I've never seen that error in my life
Do you have any method in your LocalSettings.php to tell MediaWiki to serve different wikis?
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
Not? Bad!
How?
If you want to do it the manual way then you can use https://www.mediawiki.org/wiki/Manual:Wiki_family#Wiki_farm
if you want CreateWiki to handle it then invoke WikiInitalise: require_once "$IP/extensions/CreateWiki/includes/WikiInitialise.php"; $wi = new WikiInitialise();
The values of the variable $wikis are hardcoded
yes, you manually add them every time you create a new wiki
It's actually easier than using WikiInitalise heh
And how do Miraheze do that? I don't think Miraheze do it manually
We used to use WikiInitalise
Then?
Only with the 2 lines it does not work
Do I still need parameters?
I believe you also have to add $wi->readCache(); $wi->config->extractAllGlobals( $wi->dbname ); $wgConf = $wi->config; at the bottom of your LocalSettings
Still not yet
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.
And what do I do with it?
[
'127.0.0.1' => ''
]
I think you have to copy the entire setVariables config, including the array
and change 127.0.0.1 to your wiki's URL
But then it also always directs me to the main wiki
er, set the 127.0.0.1 to the root of your wiki's domain
So if your wikis are on test.wiki.com and wiki.wiki.com, set it to wiki.com
If that doesn't work then that means there's a cache issue
@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?
add all of this but replace wikidb with mw and replace the 127.0.0.1 with your wiki's URL
LOL?
$wgCreateWikiDatabase = 'mwikis';
Table 'wiki.cw_wikis' doesn't exist INSERT IGNORE INTO
cw_wikis
Anyway, put everything on wiki, everything seems to work....
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
I have, does not work
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
And when I call up the subdomain of my wiki, I come to the main domain
@toxic nymph
Forget it, accidentally set the wiki URL to the main domain
Don't ping administrators
Then one should not be able to ping them either
They're Discord administrators, there's legit need for them to be pinged sometimes
I'm not sure that'll be merged into CreateWiki as-is. That's there on purpose for Miraheze as all our wikis end in -wiki
Being able to create a wiki without the suffix will break things
Can't be, the database check also says that databases can only have alphanumeric names (- so among other things, not)
The - in -wiki is to signify that there's something before it
so I meant wikis end in "wiki"
like testwiki, metawiki, commonswiki, etc.
Hmm
Why do I then get the error with the invalid suffix?
$wgConf->suffixes = [
'wiki'
];
And yes, the names end with wiki
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?
I have this:
$wi->setVariables(
"$IP/cache",
[
''
],
[
'<domain>' => ''
]
);
You mean
require_once "$IP/extensions/CreateWiki/includes/WikiInitialise.php";
$wi = new WikiInitialise();
?
The database name doesn't end in a valid suffix (e.g. 'wiki').
Would you mind letting us know for what you need CreateWiki for? Is it for a project or mostly just for testing things out?
Our Minecraft network should have several subwikis
Each for one gamemode
Ah, I see
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
How do I configure global groups?
And with Special:CentralAuth it is not registered in which subwikis the account already was
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.
If they destroy work without justifying it, I see no reason to accept it without appropriate behaviour... And believe me, I've still been pretty restrained! How many people do you think I've had to deal with who destroyed other people's work (especially mine) without comment?
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?
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/