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

Gitify extract overwrites resources with the identical alias #303

Open
achterbahn opened this issue Nov 7, 2019 · 3 comments
Open

Gitify extract overwrites resources with the identical alias #303

achterbahn opened this issue Nov 7, 2019 · 3 comments

Comments

@achterbahn
Copy link

Summary

Resources are overwritten during Gitify extract when two resources have the same alias

Step to reproduce

  1. Create a resource (ex. pagetitle "test"), save it. -> Alias "test" is generated (ex. with id=1)
  2. Delete created resource
  3. Duplicate deleted resource, open it, give it the same title "test" and save. -> Alias "test" is generated.
  4. `Gitify extract``
  5. Result: only one resource is extracted. Acutally both are extracted but since the name of the export file test.html is built with only the alias, it will be overwritten. One resource will be lost.

Observed behavior

Resources with the same alias will be overwritten.

Expected behavior

Resources should not be overwritten if they have the same alias.

Environment

Gitify 0.12.0, MODX 2.7.2, LAMP Stack

@Mark-H
Copy link
Member

Mark-H commented Nov 7, 2019

As multiple resources with the same alias can't show up in the front-end, that's sort of an invalid condition to begin with.

I'm also not sure how that could be prevented. That would mean stepping away from the alias (/URI) for the primary key on the content, which is a key thing.

@achterbahn
Copy link
Author

We had the problem with a end user of MODX who did exactly how I described it. The other solution of not letting this happen is to prevent that resources have the same alias in any case (even with deleted resources).
With key thing you mean breaking changes?

@Mark-H
Copy link
Member

Mark-H commented Nov 7, 2019

With key thing I mean that the whole point of using the alias as primary key, is that it doesn't have to use the ID... so it can handle ID conflicts and such better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants