[13:21:28] How can I restrict access to the site so that only registered users can view the pages? Like a private wiki [13:24:41] https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_viewing_of_all_pages [13:36:58] thx [14:02:55] hi [18:09:14] hello folks! [18:11:02] update.php fails with this query error: https://dpaste.de/eQRn [18:11:38] I have $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; in my LocalSettings. mySQL 5.7 and upgrading mediawiki from some 1.13 to 1.30 [18:16:44] table wiki_users is missing altogether. I suppose I'm trying an update too long in time? [18:37:56] michelem2: do you have a $wgDBprefix set? [18:38:54] legoktm: no, I noticed I had wgSharedDB set to wiki_users instead. Commenting that out allowed me to run the update [18:38:59] The mediawiki installation wizard currently says that the database field should be left blank when using a database over unix sockets and gives the example postgres), but when leaving the field blank one can't proceed to the next step đŸ¤” [18:39:19] I wonder why update.php cannot check if that variable is set and warn [18:40:17] michelem2: I suspect the updater wasn't tested with that setting, I'll look a bit more and probably file a bug [18:41:08] legoktm: thanks, super nice of yours. FTR, docs mention disabling that variable here: https://www.mediawiki.org/wiki/Manual:Shared_database [18:54:38] hello, how can I import files to mediawiki? I have html, latex, markdown formats. html didnt wokr [18:54:40] work* [18:55:13] also mhtml and rst (sphinx) formats are available [18:56:58] with html I get this error: Import failed, expected mediawiki, got html [18:58:38] Rooot: what are the steps to "import"? [19:02:02] andre__, I exported from the editor, and imported into mediawiki. [19:03:05] Rooot, what does that mean? [19:03:15] what is "the editor" and how to "export" from that? [19:03:30] how did you "import into mediawiki" exactly? [19:04:24] andre__, the editor is zim wiki, and I used the export function from the menu. then I imported with 'Special:Import' into MW [19:05:08] so you exported to which format? [19:05:16] See https://meta.wikimedia.org/wiki/Help:Import for what Special:Import is [not] for... :) [19:05:48] "Zim Wiki" is some random desktop editor that has nothing to do with MediaWiki, if I get it right? [19:07:03] I wasnt asked to select any format while importing. [19:07:25] Rooot: See https://meta.wikimedia.org/wiki/Help:Import [19:07:28] zim wiki is a text editor in wiki format [19:07:30] There is no reason to ask for any format. [19:07:45] Rooot, whatever "wiki format" is. [19:07:57] I don't see how that is related to MediaWiki, to be honest... [19:08:44] Rooot, https://en.wikipedia.org/wiki/Zim_(software) states that it's "(hybrid DocuWiki/Markdown)". Not MediaWiki format. [19:09:46] the most horrible thing I had to discover about mediawiki was that you had to sift through long pages just to get a tiny bit of thing done [19:10:05] * andre__ shrugs [19:10:05] didnt expect that it was 'this' code-intensive [19:10:14] whatever "a tiny bit of thing" means. [19:10:30] a most simple file move, page setup or the like [19:10:43] we are in 2018, mate [19:10:44] so if you want to import random file formats as files (not: wiki pages) into a MediaWiki installation, Special:Upload is probably your friend. Or the API. [19:11:05] Platitudes about the year won't help anybody. :) [19:11:59] I'd like to import them as wiki pages [19:12:04] not as files [19:12:09] and if you want to drop content into a MediaWiki page it needs to be in MediaWiki format. Not in some other format by some software called "Zim Wiki". [19:12:33] you're calling 'html [19:12:40] ' some other format [19:12:43] In that case you'll have to find something to turn your "Zim Wiki" files into MediaWiki syntax, I'm afraid [19:12:51] Don't know as I don't know "Zim Wiki". [19:13:17] Rooot: https://www.mediawiki.org/wiki/Manual:Importing_external_content#Converting_content_from_HTML [19:13:23] instead it would make more sense that mediawiki could make use of 'html' which is obviously not 'some format' [19:13:32] See the link I posted. [19:14:50] zim wiki also exports in pandoc format, is this accepted by mediawiki? asking because the extension in the link refers to it [19:15:23] Did you read the link I posted? [19:15:55] the part about html, yes [19:16:40] It mentions Pandoc. [19:17:17] I don't think it supports Pandoc, no. [19:17:50] since when is Pandoc a file format? [19:18:04] 'markdown' [19:18:27] No, MediaWiki does not support entering Markdown, afaik. [19:18:46] as per https://www.mediawiki.org/wiki/Requests_for_comment/Markdown [19:18:55] and https://www.mediawiki.org/wiki/Extension:MarkdownSyntax is dead. [19:21:20] I think VisualEditor supports pasting in formatted text, which it then converts to mediawiki markup [19:21:24] not 100% sure though [19:21:31] and VE is *not* an easy thing to install [19:21:34] Oh true. Skizzerz is right. [19:24:43] I will try the extension. [19:26:42] andre__ thank you for links and helping..Skizzerz, thank you, too, I will keep that editor in mind [19:26:53] Good luck. :) [19:27:06] thanks, I need it [20:03:30] hello folks! I logged in as Admin, and I can see myself as Administrators in http://en.howtopedia.org/?title=Special:ListUsers&group=sysop — however I do not find any option to un-protect a page. Notice: I created the page while using a separate DB for users with $wgSharedDB , but had to disable that with the upgrade. I logged in with the Admin user of the "local" DB [20:04:49] michelem2: Its possible that Admins don't have the right to unprotect (if defaults have been changed). Check Special:ListGroupRights to check [20:05:34] michelem2: Also, check what happens when you go to http://en.howtopedia.org/?title=Name_of_page_here&action=unprotect [20:13:47] I have "Change protection levels and edit cascade-protected pages (protect)" in the permission list page for group Administrator. When I click under Administrators on "(list of members)", I see "Admin". I am only suspecting that the "Admin" was an ID from the shared DB table, but I am now logged using the local DB table [20:15:23] If you no longer have $wgSharedDB setup, then any shared users should not appear in Special:Listusers [20:16:07] Maybe you could have some sort of dirty cache of user rights somehow. If you go to Special:Preferences, does it say you are in the Admin group there? [20:18:48] It does. "Member of groups: http://en.howtopedia.org/?title=Howtopedia_-_english:Administrators&action=edit&redlink=1, http://en.howtopedia.org/?title=Howtopedia_-_english:Autoconfirmed_users&action=edit&redlink=1, http://en.howtopedia.org/?title=Howtopedia_-_english:Bureaucrats&action=edit&redlink=1, http://en.howtopedia.org/?title=Howtopedia_-_english:Users&action=edit&redlink=1" [20:18:57] whops, stupid "smart copy" [20:19:11] "Member of groups: Administrators, Autoconfirmed users, Bureaucrats, Users" [20:21:26] I'm short on time, is there a way I can hack a change? I am root access to the underlying system, can reset any password and have raw SQL access. [20:30:16] I removed the respective rows from page_restrictions, but mediawiki still gives me "page protected" on the web interface [20:30:40] I'm not exactly sure where the issue is [20:30:50] page_restrictions is no longer used [20:31:19] What happened when you went directly to the unprotect page? [20:31:47] sure it's not? https://www.mediawiki.org/wiki/Manual:Page_restrictions_table [20:31:52] You could try updating the user_timestamp field in db as a hack, might clear some caches (Just as a stab in the dark, I think kind of unlikey to work) [20:32:10] I thought you mean tthe page_restrictions field in page table [20:32:20] sorry, my bad, its clear you meant the right one from your comment [20:33:08] You can also try to flush some caches by making a dummy edit to LocalSettings.php [20:44:14] I'm trying to restore the shared DB and take it from there. [20:44:50] I tried to run update.php with —doshared , but it does not honor the wgDBprefix setting! [20:46:10] Some places in MediaWiki, instead of using the DBPrefix setting, want instead the format DBName-DBPrefix. I'm not sure whether or not this is one of those places [20:49:50] thanks for your help bawolff. I'll continue tomorrow [20:49:56] Good luck [20:52:14] hello, can anyone tell me please, how I can use an image on a wiki page? [20:52:23] how I can add an image [20:52:42] !images [20:52:42] For instructions to use images in MediaWiki, see . For more technical details about image uploads, see and . Note that uploads are disabled per default (see !uploads). [20:52:43] and later I will ask why simply 'insert image' doesnt exist in mediawiki editor [20:52:53] yes I looked there [20:53:05] even the dumbest editor has 'add image' [20:53:07] Rooot: That depends on which mediawiki editor you are using [20:53:18] I am using mediawiki [20:53:20] itself [20:53:23] I believe there is an add image in the default one [20:53:31] But it doesn't integrate an upload function [20:53:50] mediawiki doesnt have anything that you can simply click and do [20:53:51] Regardless, you do [[File:Name of file.png]] [20:54:24] and where is it going to fetch the file from? [20:54:48] From any you have uploaded by going to Special:Upload (or pressing upload in the left hand sidebar) [20:55:08] if there's no upload file button on the right hand side bar, then uploaded images are probably disabled on your wiki [20:55:46] Depending on your config (if $wgUseInstantCommons = true; which depends on what was set in the installer) MediaWiki may also use images from https://commons.wikimedia.org [20:55:48] there is upload file [20:56:27] the original problem is that these are not standalone images. they are on html pages [20:56:36] and I cant add html directly [20:56:41] If you want to use images from around the internet, there is also a config option $wgAllowExternalImages but its disabled by default as most people don't want that [20:56:45] I was here for this problem a short while ago [20:57:11] I'm not sure I understand what you mean by standalone images vs html pages [20:57:53] I mean, the images are not separate image files, like image.png..they are embedded around texts on html pages [20:58:11] so I'd like to import these html pages to mediawiki [20:58:24] You can't directly embed pictures in your html code, can you? [20:58:31] no [20:58:35] I cant [20:58:37] The html code will have a tag and links to the image [20:58:45] And the image is in it's own file [20:58:59] yes [20:59:22] I mean, even if you see the image inside a html page, the image still isn't saved as a part of that html page. It's saved as a standalone file. [20:59:44] The html just references that image file. [21:00:01] I see what you mean..but what I mean is that the images are many, and I'd rather solve the original problem of importing html [21:00:08] Usuaully in your web browser you can right click on the image, and do "save image as" [21:00:18] instead of uploading a pile of images [21:00:37] not to mention that they are in separate folders [21:01:01] that makes a ton of unnecessary extra work of sorting and matching [21:01:03] There is a script called importImages.php that can import a large number of images into your wiki [21:01:44] Well, if you just import the html and not the images, you'll only see the html (because the html only references the images, and that reference will then be into nowhere). You need to import the images if you want to see them on your wiki. [21:02:01] html files contain the images [21:02:05] ultimately, MediaWiki is not meant as a general purpose archive of html content. You will probably have to use some scripting to manually import a bunch of stuff into your wiki [21:03:18] libreoffice supposedly has a 'send to mediawiki' function, which doesnt send [21:03:36] it also has 'export to mediawiki' which doesnt export [21:03:50] html, I mean [21:06:30] 'export to mediawiki' in libreoffice works as expected for me. It creates a .txt file with wikitext, that can then be copy-pasted into any wikitext-editor. [21:06:41] Some people find that copy and pasting into visual editor often does a decent job of converting html to wikitext [21:08:29] (e.g. The thing at https://en.wikipedia.org/api/rest_v1/#!/Transforms/post_transform_html_to_wikitext_title_revision . But that's not a good interface to it) [21:12:50] libreoffice does create the txt file, but when my html files contain images, as I said, what good is txt document [21:13:35] MediaWiki does not support images fully inline. Libreoffice does the best it can [21:14:10] Your html files probably don't do it either (Its technically possible using data: urls or inline svgs, or js rendered canvas tags. But its pretty rare) [21:31:38] thank you for your help. still I'm deeply disappointed by the incompatibility of mediawiki with everything [21:31:55] apparently you cant integrate it with nothing [21:33:18] i.e. you dont stand a chance of syncing with an offline editor if you're using it [21:33:53] not to mention tons of paragraphs to read to solve the simplest problem [21:34:13] bulky and heavy [22:50:58] I have two parser functions. The first will return some text including strip markers. The second on will take the input, use htmlspecialchars() on it and put it in the output. [22:51:28] Now, when I put the first into the second like {{#a: {{#b}} }} [22:51:47] the strip markers are damaged and will not be replaced. [22:52:06] Any ideas?