Jump to content

User talk:Wbm1058/My MediaWiki core developers thread

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Oops

[edit]

Didn't realize the talk page didn't move. The complexity of that one was a little higher than normal thanks to the user making preemptive moves that were not advisable. Sammi Brie (she/her • tc) 01:50, 27 August 2023 (UTC)[reply]

@Sammi Brie: I also just moved Talk:California's 14th State Assembly district. You should assume that rm Closer will only handle the easy moves gracefully, and perform more complex moves manually. Thanks, wbm1058 (talk) 02:04, 27 August 2023 (UTC)[reply]
I actually did these manually... Sammi Brie (she/her • tc) 03:47, 27 August 2023 (UTC)[reply]
OK, sorry, Sammi, I saw that you posted your close of the discussion using rmCloser and assumed that tool was used to move the page as well (I haven't actually used that tool myself). So now I will assume that you were caught by the issue described at T12814. Does this sound right to you? (1) you filled out the page-move form and "Move associated talk page" was checked when you clicked the "Move page" button. (2) You then saw the warning message: The destination page already exists. Do you want to delete it to make way for the move? (Check the edit history.) (3) You check the "Yes, delete the page" box while keeping the "Move associated talk page" checked as well, then you clicked the "Move page" button a second time. This time the software reports back that the page was successfully moved. (4) The software does not report that the talk page was not deleted and moved, despite your having checked both boxes to "delete the page" and "Move associated talk page" (the software did not show you a "delete the associated talk page" box to check). You need to move the talk page separately now (or you could have WP:G6 deleted the talk page before the move if you were an administrator). You didn't do that because you had assumed that the software would move both pages in a single move operation, as it implied that it would.
If that's what happened, that's OK. I see that you're just a young page mover. I'm kind of an "administrator's administrator" in that I patrol for articles with talk page redirects and I found those pages populating the category. I frequently find pages moved by experienced administrators also populating that category, and having to constantly clean these moves up is wearing. So I just dug up that old low-priority "feature request" for this "enhancement" dating from 2007, reminding me that if you want anything done around here, 90% of the time ya gotta do it yourself! Feel proud that you're the "straw that broke my back" and motivate me to finally become a MediaWiki developer. I've been spending hours and hours over the past several months finishing up these incomplete page moves, and have come to realize that the only way I can relieve the project of that task is to spend hours and hours (more likely several months) figuring out how to fix that bug. And yes, it's a bug not a feature! Regards, wbm1058 (talk) 20:53, 27 August 2023 (UTC)[reply]
Yes, that's correct. I would have had no idea that this behavior was the issue. Most of the reason I have pagemover is to handle complex US radio station call sign moves (WP:NCBC is unlike nearly every other naming convention guideline on enwiki). Sammi Brie (she/her • tc) 20:55, 27 August 2023 (UTC)[reply]

Another developer tried to fix this several years ago. I've installed MediaWiki 1.40 and Visual Studio Code on my desktop PC and will work on fixing this in the coming month(s). – wbm1058 (talk) 20:02, 16 September 2023 (UTC)[reply]

c:\php\mediawiki\core> "c:\php\php" -S localhost:80

Talk page syncing

[edit]

On Special:Diff/1197910664, I realised early on that Talk pages doesn't automatically get deleted. Although I do check for talk pages, I missed this somehow. One well-deserved trout slap for myself. – robertsky (talk) 12:31, 22 January 2024 (UTC)[reply]

@Robertsky: right, see #Oops above. I should get back to working on that project. – wbm1058 (talk) 12:35, 22 January 2024 (UTC)[reply]
Should I change the section title to "Opps I did it again"? 🤔😁
Wow, I was actually thinking that a userscript might be sufficient. Something detects if the talk page isn't moved (as that information is given on the move page after the move), and then pulls out the edit history and current content (truncated, or nested iframe/noscroll small div, if need be) of the talk page for admins to evaluate to see if the target talk page can be deleted for or a pageswap is required instead. But hey, if there are already codes pending in gerrit, why not. – robertsky (talk) 12:48, 22 January 2024 (UTC)[reply]

Thanks for tidying up after me there, Wbm1058. Just to clarify, when I originally moved the article back to that name, did its talk page not come with it automatically? ——Serial Number 54129 14:37, 30 March 2024 (UTC)[reply]

@Serial Number 54129: see #Oops above. I should get back to trying to tackle that. – wbm1058 (talk) 14:42, 30 March 2024 (UTC)[reply]
Ah! I see. So I'll do it by hand next time to be sure. Thanks! ——Serial Number 54129 14:47, 30 March 2024 (UTC)[reply]

Thank you

[edit]

I didn't realize I didn't move the talk page here [1] (I'm usually pretty good about moving pages but I suppose I misclicked here). Thank you for noticing and for cleaning up after me, I seriously appreciate it. Clovermoss🍀 (talk) 19:26, 6 August 2024 (UTC)[reply]

Turns out I'm learning things too. I had no idea about WP:MALPLACED. Clovermoss🍀 (talk) 20:21, 6 August 2024 (UTC)[reply]
Oh wait ... I added the disambiguation page to the wrong page. Geez. Two mistakes at once. I'm really sorry. That's quite embarrassing. I hope it didn't annoy you too much. Clovermoss🍀 (talk) 20:26, 6 August 2024 (UTC)[reply]
@Clovermoss: No problem. I have you pegged as a quick learner. See #Oops above for another "gotcha" to be aware of. I've still got it on my to-do list to fix/enhance the software to better handle that. Editors had conflated the old and new libraries in New York, so I split the article in two. List of Carnegie libraries in Canada has a line with information about the Carnegie library of Niagara Falls, Canada. – wbm1058 (talk) 20:42, 6 August 2024 (UTC)[reply]
Yeah, I knew about that. There's so many content gaps that I try my best to work on one thing at a time. I might go to the library to see if there's newspaper snippets to look for sources about this eventually (I did that for Dufferin Islands and got stuff going back to early 1900s but I haven't gotten around to actually using them)! But for the Canadian library, the photo used was for the historical Carnegie library and not any of the actual library branches in the city. When I'm back from Poland I'll take photos for Commons because surprisingly no one else has. Improving content about the Niagara Region has been a long term goal of mine and it never seems to stop 😅
I will definitely check out the Oops section. Thank you for being patient with me and not getting upset about my mistakes. I appreciate that, too. Clovermoss🍀 (talk) 20:48, 6 August 2024 (UTC)[reply]
So hey, you're at Wikimania?! Have fun! I've yet to make it to the big one, but am registered for Indianapolis in October. – wbm1058 (talk) 20:52, 6 August 2024 (UTC)[reply]
Yeah I am. This is my first wikimania and so far it's been interesting. Dealing with the time zone difference kind of sucks because I really should be sleeping right now. I'll be at WCNA again this year and it'd be nice to see you again. I may or may not have a session then about mobile editing. I haven't heard back yet but hopefully I'll get a chance to talk about it. Clovermoss🍀 (talk) 20:57, 6 August 2024 (UTC)[reply]
I read your oops section and I think there's a decent chance that that's what actually happened to me with the first mistake. There's a bunch of technically minded folks I've been hanging out with here in Poland so I'll ask if they have any ideas on fixing it tomorrow. Thank you for noticing this issue, cleaning up all these page moves, and trying to fix the issue yourself. Clovermoss🍀 (talk) 23:33, 6 August 2024 (UTC)[reply]
Matma Rex tried fixing it years ago, and helped me with my first MediaWiki code submission a few months ago. I'm guessing he's at the conference. When I was last working on this several weeks ago, I got hung up on understanding the change from the "legacy error array" format to "an array of MessageSpecifier objects". I was wanting to continue with replacing some deprecated code. The actual procedural coding change I want to make feels like it should be fairly simple. It's a shame that I'm getting hung up with having trouble understanding object-oriented syntax and how it works. I still have at least a dozen tabs open in my web browser related to this, and three piles of paper code printouts sitting on my desk. – wbm1058 (talk) 04:17, 7 August 2024 (UTC)[reply]
I don't think I've met them yet and I'm unsure if they're here. I was thinking of some other editors I was hanging out with yesterday like Novem Linguae, Chlod and Dreamy Jazz. There were a few others but I don't remember their usernames off the top of my head. Clovermoss🍀 (talk) 05:18, 7 August 2024 (UTC)[reply]
Matma Rex is here and was in the lobby for a couple hours last night :)
Perusing phab:T12814 a bit... a good tip for understanding stuff like $userPermitted = $mp->authorizeMove( $this->getAuthority(), $this->reason )->isOK(); is to use an IDE like VS Code with the Intelephense extension installed, then load up MediaWiki core, then you can hover over with your mouse things like authorizeMove, getAuthority, etc. and it will tell you exactly what types should be going in and out of the method. You can also click on the method and press F12 to jump to its definition. Then you can also click on the outline icon to see the list of methods in the class. These activities are essential for poking around classes, since they all have "custom" interfaces of custom objects going in and out of various methods. This is OOP's strength (lots of types and type checking being enforced) but also OOPs weakness (it's complex and custom). Screenshots.
Oh, and in general it's not very helpful to var_dump entire classes. You will usually instead want to F12 the method to go to the class, click outline to browse the list of methods, and find a `getX()` type method to retrieve the data you need. Another good trick is to install PHP XDebug, set a breakpoint in the class where you want to inspect, then wait for the breakpoint. Then you can hover over variables with your mouse to see their current values.
I could go on about the purpose of classes but I've seen you write code with classes in it so hopefully you already have a basic idea. The idea is to build a castle around that particular code, precisely controlling what flows in and out from other parts of the program, which has advantages. –Novem Linguae (talk) 06:15, 7 August 2024 (UTC)[reply]
Thanks Novem Linguae. I do have Visual Studio Code installed, and have found it to be indispensable for MW development. Before I installed it to use for that, I got along fine (and still do) just editing my single-file bots in Notepad. Indeed the framework botclasses.php which, as you know, I inherited and support, uses basic classes. However the code I've been tackling includes interfaces which take the complexity to a whole new level.
You're suggesting that it's worth it to pay $25 to get Intelephense? wbm1058 (talk) 14:43, 7 August 2024 (UTC)[reply]
Intelephense is free, I think :) Maybe the extension is freemium and paying unlocks some kind of higher level. I would just go install it in VS Code -> Extensions. –Novem Linguae (talk) 14:57, 7 August 2024 (UTC)[reply]
You can also use Phpactor (which is free with no paid options); it should work mostly the same as Intelephense, but I never compared them. Matma Rex talk 13:04, 8 August 2024 (UTC)[reply]
Re: build a castle around that particular code, precisely controlling what flows in and out from other parts of the program... back in the day, we just called that a subroutine and controlling what flowed in & out was just a matter of the function arguments. Now they're called "methods", a term I'm still in the process of getting used to. – wbm1058 (talk) 14:48, 7 August 2024 (UTC)[reply]
Classes are like a collection of subroutines, I think. Somewhere between subroutine scope and global scope. –Novem Linguae (talk) 15:01, 7 August 2024 (UTC)[reply]
Historically, a (subroutine) library consisted of subroutines (generally called functions today). The concept now includes other forms of executable code including classes and non-executable data including images and text. It can also refer to a collection of source code. – wbm1058 (talk) 17:22, 24 November 2024 (UTC)[reply]
I am indeed at Wikimania, you can find me in the Hackathon room at the table with the "Developer Corner" poster :)
@wbm1058 FYI, the "legacy error arrays" should be completely gone from the page moving code after these changes I made last month: [2]. Maybe that makes your life easier. Matma Rex talk 13:10, 8 August 2024 (UTC)[reply]
Thanks, right, you just basically completed the project that I had gotten sidetracked into. I see that was a minefield as you introduced a regression (T370669) that was fixed just recently. I'm not sure that will make my life easier but I sure hope it does. Now I need to re-clone or rebase the code I checked out, which is out-of-date because I'm chasing a moving target. And some of my printouts that I marked up with various colored highlighter pens and handwritten notes are out-of-date, too. Will need to backtrack and take a fresh look. – wbm1058 (talk) 14:08, 8 August 2024 (UTC)[reply]
Some PHP manual pages I looked up. Saving here for future reference.
wbm1058 (talk) 21:35, 9 August 2024 (UTC)[reply]

I did actually do what I promised to do when I got back to Canada (which was take photographs of the local libraries). c:Category:Niagara Falls Public Library (Ontario) now has 11 images instead of none and I'm quite proud of my efforts today. I did a lot of walking around the city. Clovermoss🍀 (talk) 01:05, 15 August 2024 (UTC)[reply]

Nice. Congratulations, Wikimedian of the Year! wbm1058 (talk) 01:26, 15 August 2024 (UTC)[reply]

Special:MovePage's namespace dropdown menu needs further thought

[edit]

Meantime, I'm posting here my log of over 400 pages I deleted as Wikipedia:Criteria for speedy deletion#U2 userpages of nonexistent users. This, in my view, demonstrates another need for improving the user interface so that users don't make this cross-namespace page-moving error so often, because they neglected to tend to a necessary drop-down box specifying the namespace to move to. I haven't searched for a Phabricator about this issue, so I don't know whether one's been submitted yet. – wbm1058 (talk) 15:02, 21 November 2024 (UTC)[reply]

If I understand correctly, this page moving problem (different from the other one we talked about a few months ago) is T50239, and I would say it's a classic. It's clear that the namespace+title input field is not very understandable for most users, but it's not clear to me how to make it better. The root of the problem may be that namespaces by themselves are just confusing. Matma Rex talk 21:11, 26 November 2024 (UTC)[reply]
Yup, that's it. Anther decade+-old Phab to add to my to-do list. – wbm1058 (talk) 22:20, 26 November 2024 (UTC)[reply]