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

VFolders: Alter VirtualFolder.save() to to append -virtual to the name if necessary #3534

Closed
unho opened this issue Jan 22, 2015 · 6 comments
Labels
Milestone

Comments

@unho
Copy link
Member

unho commented Jan 22, 2015

If the vfolder name conflicts with any the name for any existing directory or file in the vfolder location it is necessary to rename it. Have in mind that the location can use any combination of {LANG} and {PROJ} placeholders, so it would be necessary to check all the matching TPs.

@unho unho added the current label Jan 22, 2015
@unho unho added this to the 2.7.0 milestone Jan 22, 2015
@jleclanche jleclanche mentioned this issue Jan 22, 2015
12 tasks
@unho unho changed the title Alter VirtualFolder.save() to to append -virtual to the name if necessary VFolders: Alter VirtualFolder.save() to to append -virtual to the name if necessary Mar 17, 2015
@unho unho modified the milestones: mstone-mlo, 2.7.0 Mar 17, 2015
@unho unho removed the current label Mar 18, 2015
@unho
Copy link
Member Author

unho commented May 11, 2015

@iafan What about raising an error when we try to add a vfolder named like a regular folder?

@dwaynebailey dwaynebailey modified the milestone: mstone-mlo May 11, 2015
@iafan
Copy link
Contributor

iafan commented May 11, 2015

@unho, I'm not opposed to this approach. How will we cover the situation when the physical folder is added on update_stores, and such a virtual folder already exists? Also raise an exception? How will one rename the virtual folder to resolve the conflict?

@dwaynebailey
Copy link
Member

@iafan My view is this:

  1. If there is a name clash we disable the vfolder (even if that clash happens by the appearance of a new folder that matches the vfolder)
  2. Report this as part of update_stores
  3. I'd like Pootle to run fine even with an unresolved clash so no exception raising that would disable anything. An exception might be useful for someone doing some remote monitoring.
  4. To be able to rename the vfolder we'd need to have the ability to delete vfolders
  5. I'd style a clashing vfolder differently on the admin view of the vfolders and disable all information.

@iafan
Copy link
Contributor

iafan commented May 13, 2015

Thanks, @dwaynebailey. I agree with your vision here. It might be easier to simply disable the vfolder than to implicitly rename it (this would change its URL and break inbound links, if any).

As for item 4, I think at some point I shared an idea to replace all the vfolders based on the vfolder description .json file. So deleting or renaming the vfodler would mean adjusting the same master .json file that contains all the descriptions and running the add_vfolders command (also it might make sense to rename this command to update_vfolders for clarity). Such a command would complain on any folder naming conflicts.

@unho
Copy link
Member Author

unho commented Aug 10, 2015

See #3905 for temporary workaround.

@unho unho added this to the 2.7.x milestone Aug 11, 2015
@unho unho modified the milestones: 2.7.x, 2.8.0 Sep 24, 2015
@phlax
Copy link
Member

phlax commented Sep 10, 2016

this was fixed by #5221

@phlax phlax closed this as completed Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants