Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to see rollback links on diff pages #627

Closed
ghost opened this issue May 9, 2019 · 9 comments · Fixed by #628
Closed

Unable to see rollback links on diff pages #627

ghost opened this issue May 9, 2019 · 9 comments · Fixed by #628
Assignees

Comments

@ghost
Copy link

ghost commented May 9, 2019

Rollback links are not displaying on diff pages since the last update. I could see the links till around 16:00 UTC on 8 May, but I've not been able to see them since then. I've tried disabling all beta features, all custom JS scripts, all other gadgets except Twinkle, switching to a different browser, disabling all add-ons, but none of it made a difference. Explicitly adding showRollbackLinks pref in twinkleoptions.js also didn't help. Twinkle itself is loading, as I'm able to see "[welcome]" button for new users on the diff page. The rollback options show up just fine on contributions page, the issue is visible only on the diff page.

I don't know if the browser version will make a difference, but I can see the issue on both Chrome 74.0.3729.131 and Firefox 66.0.4.

@Amorymeltzer
Copy link
Collaborator

@Gazoth Can you paste an example diff link where the agf/rollback/vandal links don't show up but should? They show up fine for me.

@ghost
Copy link
Author

ghost commented May 9, 2019

Here is an example. I can see the welcome link as the editor of this revision is new, but I cannot see the rollback links. Also, I can see "restore this revision" link on oldid pages.

@Amorymeltzer
Copy link
Collaborator

@Gazoth That diff doesn't include the latest revision of the page; the agf/roll/vandal links only show up when you're looking at the latest revision on the right-hand side of the two-column diff. Try this link.

@ghost
Copy link
Author

ghost commented May 9, 2019

I can see the issue in the link that you provided too. Even if the revision is not the newest, I should have been able to see "restore this revision" link, but I'm unable to see that too.

@Amorymeltzer
Copy link
Collaborator

Amorymeltzer commented May 9, 2019

Okay then, can you copy the url of the latest diff of the article Macbeth and paste it here? That might help. Are you using the visual editor?

Additionally, when you have a moment, can you get a few pieces of information for me from your preferences? It might help me replicate your issue.

  • From the Appearance tab: your skin, and which boxes under Diffs you have checked
  • From the Editing tab: whether you have the toolbar or "disable visual editor" boxes checked
  • From the Gadgets tab: all boxes you have checked
  • From the Beta tab: all boxes you have checked

Also, can you follow the instructions at WP:JSERROR and copy-paste any errors or messages from your browser's console on a diff page where you should be seeing links.

@ghost
Copy link
Author

ghost commented May 9, 2019

I found the issue. I had enabled "Do not show page content below diffs" under Preferences > Appearance > Diffs. Disabling that option brings back the rollback links.

Here is the latest diff from Macbeth. I'm not using the visual editor, but I do have the visual differences beta enabled. I don't think the rest of the questions are relevant anymore, but I can still answer them if enabling "Do not show page content below diffs" does not reproduce the issue for you.

@Amorymeltzer
Copy link
Collaborator

Ah, okay, I've got it! It's from #562, specifically https://github.com/azatoth/twinkle/pull/562/files#diff-1dcb5e0e39547eb0cb4124afd50081bfR83. Basically, that option sets wgRevisionId to 0, so the check that the content displayed is the same as the diff given fails. I'll have to do some testing tomorrow, but I think that check might be overly parsimonious.

@Amorymeltzer Amorymeltzer self-assigned this May 10, 2019
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue May 10, 2019
…iff content hidden

Fixes wikimedia-gadgets#627.  If a user has "Do not show page content below diffs" selected in Special:Preferences, `wgRevisionId` will be set to 0 on diffs, meaning no links would be shown on diffs.  Comparing `wgRevisionId` to `wgDiffNewId` from wikimedia-gadgets#563 appears to be a holdover from some (local) attempts to handle merge conflicts between wikimedia-gadgets#511 and wikimedia-gadgets#407, when I initially had this structured differently, but that should now handled in the init, so this was excessive.
@Amorymeltzer
Copy link
Collaborator

@Gazoth Should be working now, let me know how it looks!

@ghost
Copy link
Author

ghost commented May 11, 2019

Working fine with no issues. Thanks for the quick response!

Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Apr 7, 2020
Fixes wikimedia-gadgets#913, same basic issue as wikimedia-gadgets#627/wikimedia-gadgets#628: if a user has "Do not show page content below diffs" selected in Special:Preferences, wgRevisionId is set to 0 on diffs.  While wikimedia-gadgets#628 took care of that for the links on diff pages themselves, trying to rollback from a contribs page was left unfixed.  Those links load the diff page then `auto`matically revert, so will run into the same issue.  This essentialy reverts back to the check before 3e5ec5b (wikimedia-gadgets#561), albeit by using `mw.util.getParamValue` rather than the no-longer-existing `Morebits.queryString.get` (wikimedia-gadgets#725).
wiki-ST47 pushed a commit to wiki-ST47/twinkle that referenced this issue Sep 2, 2020
Fixes wikimedia-gadgets#913, same basic issue as wikimedia-gadgets#627/wikimedia-gadgets#628: if a user has "Do not show page content below diffs" selected in Special:Preferences, wgRevisionId is set to 0 on diffs.  While wikimedia-gadgets#628 took care of that for the links on diff pages themselves, trying to rollback from a contribs page was left unfixed.  Those links load the diff page then `auto`matically revert, so will run into the same issue.  This essentialy reverts back to the check before 3e5ec5b (wikimedia-gadgets#561), albeit by using `mw.util.getParamValue` rather than the no-longer-existing `Morebits.queryString.get` (wikimedia-gadgets#725).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant