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

Import replacing a story duplicates existing passages #1392

Closed
2 of 3 tasks
mintjxlly opened this issue Mar 16, 2023 · 3 comments · Fixed by #1540
Closed
2 of 3 tasks

Import replacing a story duplicates existing passages #1392

mintjxlly opened this issue Mar 16, 2023 · 3 comments · Fixed by #1540
Labels
bug Something isn't working P2 (should) Usage is significantly impeded, enhancements to cover major functionality gaps

Comments

@mintjxlly
Copy link

Describe the bug.

Sometimes when I reload the page or I import a story that has the same name as another, it duplicates all existing passages. The image attached has an example, there's only supposed to be 21 or so passages. This is after deleting a few.
image

Steps to reproduce:

  1. Have a story of a certain name. (The name of mine was "Playing Reaper", idk if that had anything to do with the issue.)
  2. Import the story's HTML and replace the story.
  3. Reload the page.

Expected behavior:

The story to import normally and replace passages currently in the old story / for the page to reload and not duplicate.

Additional context on this problem.

No response

Twine version number

2.6.2

Does this problem occur with the web version of Twine or the desktop app?

Web

What operating system does this problem occur on?

Windows

If this problem is occurring with the web version of Twine, what browser does it occur on?

Chrome/Chromium

Presubmission checklist

  • I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
  • I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
  • I have read and agree to abide by this project's Code of Conduct.
@mintjxlly mintjxlly added the bug Something isn't working label Mar 16, 2023
@jthyer
Copy link

jthyer commented May 15, 2024

I've run into this same issue repeatedly across multiple machines, on Twine version 2.8.1. I wrote out a whole bug report before finding this existing one, so I'm going to copy paste in my bug description and my steps to reproduce.

Bug Description

I'm working on a twine 2 project in the web editor across two computers. When I finish work on one computer, I download the .twee file and upload it to my drive. Then I download it to the other computer and import the twee file.

I have copies of the project in the web editor's memory on both computers. When I attempt to import the newest version of the .twee into one of the computers, it says "A story with the same name in your library will be replaced." I check the box and click "Import."

It seems to work fine at first. But when I close the tab and reopen it, all the passages from the older version of the project, the one that should have been deleted, are loaded into the same twee file on top of the newer versions of the passages. This is honestly pretty catastrophic -- I've run into the issue after making many edits multiple times, and I've only been able to fix it by painstakingly removing the duplicate passages from the twee file in a text editor.

Steps to Reproduce

This is not unique to my active project. I created a test project in one web editor window, made several passages with placeholder text, and exported the twee file. Then I loaded the web editor in an incognito window, and imported the project. I made several edits in the incognito window, and exported the new twee.

When I imported the twee file on the original window, it seemed to work fine. But when I closed and opened the tab, it duplicated all the passages that were in the old version of the project. I've run through this process in both Firefox and Chrome, and the error occurred in both browsers.

Expected Behavior

Overwriting the old version of the project should completely erase the old version from memory and replace it with the new version. Right now its passages are being retained somewhere, and it's causing duplicate issues.

@klembot
Copy link
Owner

klembot commented May 17, 2024

@jthyer thanks for resurrecting this bug! I can repro the problem in the web version but not the app version. This helps narrow down where the problem is. It is indeed annoying. I can't think of a workaround for it other than deleting the story before you re-import it, which is not great.

@klembot klembot added the P2 (should) Usage is significantly impeded, enhancements to cover major functionality gaps label May 17, 2024
@jthyer
Copy link

jthyer commented May 17, 2024

Excellent, thanks for taking a look! Yeah, deleting and reimporting works fine so it's not causing me any headaches now. I'm just glad the issue has eyes on it so more devs won't get blindsided in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 (should) Usage is significantly impeded, enhancements to cover major functionality gaps
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants