[08:18:57] Hi guys, if I use the hook onPageSaveComplete introduced in 1.35 and add code to it which writes a word to a txt file, would it actually write the file? [08:19:30] Because if you try to send something to console it won't work because how the hook works, as far as I understand [08:19:41] I simply want to test if the hook gets executed [11:07:28] Hi, does anyone come across "Call to undefined method SMW\DIProperty::getPredefinedPropertyTypeId()" can't find anything and it has a slash between SMW and DIProperty but the code line doesn't has a slash in the name --> "$predefPropType = SMWDIProperty::getPredefinedPropertyTypeId($prop);" [11:31:58] Guest78: PHP is executing code different from the file you're looking at. SMW\DIProperty is namespaced, probably newer code than SMWDIProperty [11:34:14] Vulpix I found thins https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki_3.0.0/Migration_guide where it says Removed DIProperty::getPredefinedPropertyTypeId, deprecated since 2.1, use PropertyRegistry::getPropertyValueTypeById do you maybe know how to use PropertyRegistry::getPropertyValueTypeById? [11:34:33] I'm not a dev and php is new to me [11:35:32] Well, this section is indeed for developers :) [11:36:09] It doesn't mean you have to touch the code. This is for extensions that use SemanticMediaWiki features [11:36:51] I know but the wiki gets this error [11:37:05] after updating SWM to 3.2 [11:37:07] Maybe you have an outdated extension installed and you have to see if an updated version exists: then download it and install, and see if that fixes the problem [11:37:32] no it's a custom script, about 6 years old [11:37:37] Look for upgrades [11:37:52] Who wrote that custom script? [11:37:57] no updates, custom script by a previous dev [11:40:26] Ok. Well, that would be difficult, then, if you don't know PHP. That page provides a few notes about changes required, but there's no mention if parameters are the same, or if that's the full name of the class (including namespace) or not... [11:41:47] OK I think it's SMW\PropertyRegistry::getInstance()->getPropertyValueTypeById($prop); [11:50:22] Dear colleagues, I would like to find an extension. May I ask if such an extension exists. [11:50:47] I look for a way to replace some words in a whole page. For example, [11:51:36] we have a page with \emph{ bla bla bla } inside, and want to replace this pattern to {{emph| bla bla bla }}. [11:52:27] The main idea is to put LaTeX formatted texts and to convert them into wiki-markup. This is why I would like to replace some text patterns into other text patterns. [11:52:48] Maybe there's an extension for such processing? Thank you. [12:06:13] PMZ did you check the special page Replace Text? [12:09:06] The Special page Replace Text changes the sources. I'd like to keep the sources. [12:09:54] It changes the text in a given article [12:09:58] LaTeX formatting is much more flexible, so I'd like to keep it. [12:10:05] I have done this many times [12:10:16] So the aim is, to keep source text and to change its output. [12:10:25] ok [12:10:40] Also, with the Special page, we need to run it again with every added page :-). Hoped to avoid this. [12:11:06] then you could use a hook like onBeforePageDisplay [12:11:15] and change the text [12:12:14] for example with $text = str_replace(....... [12:20:02] Thank you. [12:30:31] @PMZ I think onOutputPageBeforeHTML will work [12:31:17] https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML it has &$text [12:32:26] Thanks again! [14:11:07] Hello, Can someone help? [14:13:05] Guest82: you'll have to ask your question first [14:13:14] (Dontasktoask.Com) [14:15:38] RhinosF1 OK. I configured https://www.mediawiki.org/wiki/Extension:FeaturedFeeds/WMF_deployment on ckbwiki but why don't I see the result of the article? [14:17:05] I worked on it as a test in my subpage https://ckb.wikipedia.org/wiki/%D8%A8%DB%95%DA%A9%D8%A7%D8%B1%DA%BE%DB%8E%D9%86%DB%95%D8%B1:Aram/%D8%AF%DB%95%D8%B3%D8%AA%D9%BE%DB%8E%DA%A9 [14:18:36] Did you set all the pages in the MediaWiki namespace? [14:20:18] I think the process needs just one MediaWiki page. Here https://ckb.wikipedia.org/wiki/%D9%85%DB%8C%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Ffeed-featured-page [14:20:50] And i translated the messages on translatewiki.net [14:26:05] Have you tried setting the other 4 messages [14:27:54] Which ones? [14:35:26] Mentioned on the page you linked [14:35:41] There's a table of 5 pages to setup [14:41:14] Yes, I translated/created those messages yesterday. [15:09:59] Hey guys, I'm trying to use the hooks PageContentSaveComplete or the new one PageSaveComplete, but they don't seem to work. [15:10:42] I'm on mw 1.35, tested the code inside the hooks with other hooks and it works. In debug mode there is no error, can't see any issue. [15:11:33] I know that with 1.31 the hook PageContentSaveComplete worked 100%, with the same code inside. What could the issue be or how can I find the issue? [15:11:40] Anyone any idea? [16:51:38] Nikerabbit: Do you know why LocalisationCache has a conditional check in loadPluralFiles for file_exists( $mwPlural )? It seems like the file would always exist. It was introduced in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/11836 [17:12:59] Krinkle: the answer is in the code review comments :) [17:13:15] "Nope. This check is unnecessary. But we can keep the plurals-mediawiki.xml in case some mediawiki users dont want to tailor CLDR standard." [17:14:14] Back then CLDR standards were a new thing and there was some expectation that people may want to disable them the rough way, I guess. [17:17:54] hm.. ok [17:18:07] I'll propose removing it as part of a clean up commit [17:18:23] if we want to support disabling it, we should make it a config option instead of requiring some kind of core hack [21:39:18] Is Lukas Werkmeister in this channel? [21:39:24] *Lucas [21:42:04] Hi, I'm setting up MW 1.35 and have got Visual Editor (without Restbase or Parsoid) working quite nicely. When I put a Varnish layer in front I can no longer edit pages using Visual Editor. I'm fairly confident the cause of this is that `wgServer` is set for the varnish front end and not the backend and I think this means I need to set [21:42:04] `$wgVisualEditorRestbaseURL` or `$wgVisualEditorFullRestbaseURL`. Can anyone describe how I should set that to refer to `rest.php` in canonical form?? [21:42:50] Jdlrobson: they signed off at ~11 PDT, normally they're nicked as Lucas_WMDE [21:43:13] Thanks legoktm ! I'll follow up with him tomorrow [22:48:26] Wondering if anyone has any experience with the api and knows how I might go about logging a user in directly after creating an account. I don't want to make a second api call...I'd prefer to do it on the backend from within the first api call...but I can't quite figure out the code to make the login happen. [22:52:26] I imagine the API isn't designed to support that [23:00:25] if the account creation API doesn't return a session cookie then chances are you're stuck