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

Cloning internal books #841

Closed
greatislander opened this issue Jul 9, 2017 · 9 comments

Comments

@greatislander
Copy link
Collaborator

commented Jul 9, 2017

Prerequisites

Description

Books should be cloneable via the v2 REST API within a network (given appropriate permissions).

Steps to Reproduce

Not applicable.

System Information

Pressbooks: 4.0.0-RC1
WordPress: 4.8.0
PHP: 7.1

@greatislander

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 17, 2017

  • Verify book license, prohibit cloning for all-rights-reserved and by-nd variants.
  • Verify section license, prohibit cloning for all-rights-reserved and by-nd variants.
  • Assign pb_is_based_on metadata key to URL of source book.
@connerbw

This comment has been minimized.

Copy link
Member

commented Aug 2, 2017

TODO:

  • If you are admin, and in the Network or Root Site dashboard, clicking, clone a book shows"Forbidden"
  • Add animated progress bar while waiting.
  • Fix animated progress bar in Safari. (Apparently some Safari users haven't seen this bar in a while?)
  • Add option to turn off Cloning like we do the Root API.

@connerbw connerbw reopened this Aug 2, 2017

@connerbw connerbw self-assigned this Aug 2, 2017

@connerbw connerbw assigned greatislander and unassigned connerbw Aug 3, 2017

greatislander added a commit that referenced this issue Aug 16, 2017
Various cloner fixes (#841) (#881)
* Various cloner fixes.

+ If you are admin, and in the Network or Root Site dashboard, clicking, clone a book shows"Forbidden"
+ Add animated progress bar while waiting.
+ Fix animated progress bar in Safari. (Apparently some Safari users haven't seen this bar in a while?)
+ Add option to turn off Cloning like we do the Root API.

* Add tests

* Remove leftover comments [ci skip]

* Tabs, not spaces. [ci skip]

* Increase code coverage.

* Fix animation for Safari?

* Spelling mistake, exporting should be cloning [ci skip]

* Fix animations in Safari, sort of.

@greatislander greatislander reopened this Aug 16, 2017

@zwhnz

This comment has been minimized.

Copy link

commented Aug 16, 2017

Testing Notes

  • URL with numbers is not great - are we working towards the user being able to enter their own?
  • “Cloning failed” error when I tried: https://fourpointoh.textopress.com, can’t see why
  • 500 error on big book
@greatislander

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2017

@zwhpressbooks @pressbooksapurva Added a field to choose the URL of the new book, please test and then we are good to go.

@zwhnz

This comment has been minimized.

Copy link

commented Aug 17, 2017

Looks like the cloning process is overwriting an existing URL when I try it. Works great otherwise, though!

@greatislander

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2017

@zwhpressbooks Can you clarify? You enter the URL of a book that already exists and it lets you clone on top of it? :/

@zwhnz

This comment has been minimized.

Copy link

commented Aug 17, 2017

@greatislander

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2017

Figured it out. Was testing against a malformed URL because the $domain global was the url of the current book, not the root site. e889f12

@greatislander

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2017

Ready for you to test again @zwhpressbooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.