Page MenuHomePhabricator

Trying to restore course: Error: 1062 Duplicate entry '7' for key 'PRIMARY'
Closed, DeclinedPublic

Description

Hi. The teacher User:Yierva creates a course here:

Wikimedia México/Problemas de estética. Estetización de la política. Benjamin y Rancière

But now appears as deleted, and when we try to restore the courses appears this:

https://es.wikipedia.org/w/index.php?title=Education_Program:Wikimedia_M%C3%A9xico/Problemas_de_est%C3%A9tica._Estetizaci%C3%B3n_de_la_pol%C3%ADtica._Benjamin_y_Ranci%C3%A8re&action=epundelete

Función: ORMRow::insert
Error: 1062 Duplicate entry '7' for key 'PRIMARY' (10.64.16.22)

Thanks for the support.


Version: unspecified
Severity: minor

Details

Reference
bz62246

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:59 AM
bzimport set Reference to bz62246.

andrew.green.df wrote:

Hi ProtoplasmaKid, thanks for the report. I'm looking into it.

Do you have any more details--for example, do you know when the course was created, and when this started happening? Also, is it possible that someone changed the title/moved it at some point?

andrew.green.df wrote:

OK, I think I know what happened here.

It looks like the course was originally created with no term. This was possible with the previous version of the interface for creating and editing courses, though it shouldn't be possible with the new interface.

It turns out the new interface is not compatible with courses with no term. So the bug is that if you use the new interface to edit a course with no term, the course becomes inaccessible, appears to have been deleted, and appears on the list of courses as a course with no title.

I'm able to reproduce this on my local Mediawiki install by reverting to the old interface, starting to create a course with no term, removing the " ()" from the title on the form and the URL bar, and saving the new course. Then, if I update back to the new interface, and edit the course appears to be deleted but can't be undeleted, and shows up as a blank entry on Special:Courses, just like in this case.

Assuming that this is indeed what happened, I think the fastest route to get this course up and running again would be to simply re-create it. I'm really sorry about the extra work this entails. :( Thanks very much for understanding.

I should mention that while many people find the current EducationProgram extension quite useful, there are still lots of issues with it. We're doing our best to juggle maintaining it, making the most pressing improvements, and creating new software that will provide better functionality for courses as well as other similar collaborative editing projects. :)

The other option for this particular course would be to try to manually repair it in the database. I can look into the possibility, but again, I think the quickest way forward would be just to re-create it. Thanks again for understanding.

We should also check that there aren't any other courses with no term, so this doesn't happen to other courses.

(In reply to Andrew Green from comment #1)

Hi ProtoplasmaKid, thanks for the report. I'm looking into it.

Do you have any more details--for example, do you know when the course was
created, and when this started happening? Also, is it possible that someone
changed the title/moved it at some point?

Hi Andrew, the problem occurs till the students suscribes to the course. We don't see other action out of the procedures. In fact, we have another courses functioning normally.

We will re-create it.

Regards.

andrew.green.df wrote:

Thanks! Also, I've just found a way to at least recover any information that may be in the damaged course:

  1. Go to Special:Courses page and using the controls there, delete the course with no name.
  2. You should now be able to undelete the course normally.

Even so, the recovered course will be unusable, because the same problem will occur next time someone tries to edit it. So you should still create a new course to replace it, this time with the term, then re-delete the damaged course by again performing the first step mentioned above (once you've copied all the information you need from it).

If you need help, please don't hesitate to contact me on IRC (I'm AndyRussG there. Connected to #wikipedia-en-ambassadors, #wikipedia-es, #wikimedia-mx and a few other channels.)

Since this shouldn't happen with any courses created from here on out, I'm leaving this open as a low priority issue.

Reedy subscribed.

Extension is being removed and archived.