Page MenuHomePhabricator

fix behavior for non-existent articles in students table
Closed, DeclinedPublic

Description

If a student has a non-existent article in the students table, does not appear as a redlink to that page, and trying to add another non-existent title for that student will result in nothing happening. (Existing articles can be added in any number, but only one non-existent article can be added per student.)

If the non-existent article is subsequently created, it remains unlinked in the students table. Attempting to re-add the same title *after* it has been created results in a database error. For example, when I attempted this on test2 wiki [1]:

Function: EducationProgram\ArticleStore::insertArticle
Error: 1062 Duplicate entry '7-903-Crazywaht' for key 'ep_articles_course_page' (10.64.16.27)

[1] = https://test2.wikipedia.org/wiki/Education_Program:Columbia_University/Lolcats:_an_inter-disciplinary_exploration_%284eva%29

Non-existent articles added for students should appear as redlinks, and they should become normal links if the target page is created.


Version: unspecified
Severity: normal

Details

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:20 AM
bzimport set Reference to bz57608.
  • Bug 47439 has been marked as a duplicate of this bug. ***

Hello, it is more than a year since this bug was started. It remains one of the most serious problems we encounter when using the extension. Can someone estimate how much work this relatively minor change would require? Teachers in my education program keep questioning this bizarre behaviour of the extension.

Additionally, who is the person responsible for Education extension at WMF? Thanks.

@Vojtech.dostal the WMF education team has no engineering resources, so the extension is really only supported by volunteer contributions at this point in time.

Thanks for poking this bug ticket. I know this is a high priority bug, however I'm not sure how we can get it resolved.

I know that Education team cannot do much in this case and I did not intent to push on the Education team to do something. This is a tech issue. What if there was a serious security problem with Education extension, who would be the one solving it? Also, if a volunteer decided to step in and fix the bug, who would be there to contact in terms of access to the code etc.?

My best guesses for guidance and context would be @AndyRussG, @Ragesoss, @awight.

Any pointers for @Vojtech.dostal if he wants to work on this or get additional engineering support/momentum?

if there was a serious security problem with Education extension, who would be the one solving it?

Probably someone from Security.

Also, if a volunteer decided to step in and fix the bug, who would be there to contact in terms of access to the code etc.?

Anyone can clone the code and (almost) anyone can propose patches. If you point to patches that are ready to go into master then I'll try to find reviewers, or maybe review some myself. If a volunteer becomes experienced enough with the code and has contributed enough, they may be able to seek ownership of the repository through the normal process.

Any pointers for @Vojtech.dostal if he wants to work on this or get additional engineering support/momentum?

I'd prefer if you rewrote the extension rather than piling more hacks on top of it. Using ContentHandler instead of EP's own system for everything would be a start. Would probably solve a lot of T45975 blockers.

I'd prefer if you rewrote the extension rather than piling more hacks on top of it. Using ContentHandler instead of EP's own system for everything would be a start. Would probably solve a lot of T45975 blockers.

There is no way we can get a programmer to completely rewrite the extension. We only have minor issues with it and this is one of the most serious. In fact I don't want our teachers to learn how to handle a new extension when they had already learned how to work in this one.

Is it really a 'hack' to show articles in the list as links? IMHO isn't this just about turning the words into a hypertext link?

Thanks for clarifying the process of suggesting patches to the extension.

We only have minor issues with it and this is one of the most serious.

There are fundamental issues with the way this extension has been written. I do not think it would be allowed to be deployed to WMF production as-is today.

Is it really a 'hack' to show articles in the list as links? IMHO isn't this just about turning the words into a hypertext link?

I was commenting more on the general idea of EducationProgram extension development rather than this specific bug. I just don't want to see even more of MediaWiki reimplemented here. This thing has it's own revision table...

https://gerrit.wikimedia.org/r/#/c/344570

Just submitted this first patch that fixes one of the reported issues: non-existent articles are now shown as red links.

This first patch doesn't solve the second issue: being unable to add more than one non-existent article. This second issue is due to the fact that EP checks for duplicates before adding an article, and all non-existent articles have page_id 0 in the ep_articles table.

https://gerrit.wikimedia.org/r/#/c/344572

I submitted a second patch with a fix to the second reported issue: now it's possible to add more than one non-existent article per student.

As explained before, this issue was due to the fact that EP checks for duplicates before adding an article, and all non-existent articles have page_id 0 in the ep_articles table. I fixed the issue by telling EP to check for duplicates by looking at the page_title, rather than the page_id.

Reedy subscribed.

Extension is being removed and archived.