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

Impossible to remove / redirect document (appears duplicate) when using yarn tool delete slug locale --redirect newslug - heir of #6226 #6278

Closed
3 tasks done
SphinxKnight opened this issue May 14, 2022 · 0 comments
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@SphinxKnight
Copy link
Member

Summary

The removal tool does not work in some conditions.
When removing macros and targeting conflicting pages, I used

yarn tool delete conflicting/Web/API/WebRTC_API_d8621144cbc61520339c3b10c61731f0 fr --redirect Web/API/WebRTC_API

but this did not work: "error: unable to remove and redirect a document with children" (while this doc had no children)
Removing the redirect option displayed:

Will remove 2 documents:
conflicting/Web/API/WebRTC_API_d8621144cbc61520339c3b10c61731f0
conflicting/Web/API/WebRTC_API_d8621144cbc61520339c3b10c61731f0
Deleting without a redirect. Consider using the --redirect option with a related page instead

URL

Not applicable :/

Reproduction steps

  1. Get a fresh repo and a copy of mdn/translated-content
  2. Run yarn tool delete conflicting/Web/API/WebRTC_API_d8621144cbc61520339c3b10c61731f0 fr --redirect Web/API/WebRTC_API

Expected behavior

The command completes and it removes the page/adds the redirect

Actual behavior

An error since the tool believes there are either two pages (when no redirect options is used) or that there is a child for this page.

Device

Laptop

Browser

Other (specify below)

Browser version

Other version (specify below)

Operating system

Linux

Screenshot

image

Anything else?

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 14, 2022
@SphinxKnight SphinxKnight changed the title Duplicate document for removal/redirection (tool delete) - heir of #6226 Impossible to remove / redirect document (appears duplicate) when using yarn tool delete slug locale --redirect newslug - heir of #6226 May 15, 2022
OnkarRuikar pushed a commit to OnkarRuikar/yari that referenced this issue Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

1 participant