Page MenuHomePhabricator

[edit] link in WikiLove preview screen causes data loss
Closed, ResolvedPublic


When clicking the [edit] link in the preview mode of WikiLove, the user is taken to an error page. (See attached screenshot

Screenshot 2016-03-11 11.36.35.png (336×491 px, 54 KB)
) Upon clicking the "Back" button, the existing WikiLove message that has already been composed is lost, and the user has to start over.

My expected behavior: I clicked the link thinking that it would take me to a manual screen, displaying the wiki syntax that generates the message. I did this because I wanted to copy and paste the barnstar to Meta Wiki (which does not have WikiLove enabled).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It would be trivial for us to suppress the edit section links so people don't accidentally click on it, but what you really want is a way to get the wikitext wikilove generated right?

Also maybe request WikiLove be enabled on meta? :)

I see three possible outcomes, any of which would be good. The first, I think, is ideal:

(1) Make the [edit] button take you to a manual entry mode. There are other possible uses for this -- for instance, my personal preference would typically to be to remove the time stamp, which usually doesn't apply. Or, to demonstrate how the code produces the result, as part of a process of learning about MediaWiki.

(2) Enable WikiLove on Meta. Yes, I think that would be a good thing. I'm not sure why it's not already enabled there, my guess is that there was an explicit decision not to. I'll look into it, and maybe file a bug as you suggest.

(3) Eliminate the [edit] link. This would be far better than doing nothing, as I don't see any value in having the link appear, and it would eliminate the possibility of losing data in this way.

For what it's worth, I looked on Meta Wiki, and asked about enabling WikiLove, here:

Apparently a 2012 Meta vote rejected enabling WikiLove:

I don't agree with the outcome, but I also don't have the bandwidth to put together a new discussion/vote right now. So For the moment, I'd say option #2 is ruled out.

Just ran into this on Commons. The "[edit]" section edit link points to

The presence of any section edit link in the preview is likely to cause problems, regardless of where it points. The only way to edit this section (which hasn't been submitted yet) is in the dialog the user is currently in. Whether it points editing the current page, the destination page, or a random internal placeholder title like [[API]], it will confuse the user.

Screen Shot 2017-09-06 at 22.35.54.png (484×652 px, 66 KB)

I like @Legoktm's suggestion of suppressing the section-edit links for the preview, which also happens to be the easiest solution from a technical vview.

Change 376440 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/WikiLove@master] Disable edit section links in preview

Change 376440 merged by jenkins-bot:
[mediawiki/extensions/WikiLove@master] Disable edit section links in preview

Legoktm claimed this task.