hey there,
are the any plans in porting this module for drupal 7?
best,
walter
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1225454_info_file.patch | 341 bytes | pfrilling |
| #5 | 1225454_install_file.patch | 3.67 KB | pfrilling |
| #5 | 1225454_module_file.patch | 20.93 KB | pfrilling |
| #4 | book_copy.zip | 9.29 KB | thummel |
| #1 | book_copy.zip | 9.35 KB | valderama |
Comments
Comment #1
valderama commentedhere is a working d7 port.. not everything's tested yet, but its a start..
Comment #2
VenDG commentedI tried to use this with the current version and got an error:
DatabaseSchemaObjectExistsException: Table book_copy_history already exists. in DatabaseSchema->createTable() (line 652 of /includes/database/schema.inc).
Comment #3
thummel commentedUsing the zip file above, I tried to copy a book and go the error: "Page not found /book_copy/copy/603" [where 603 is the nid of the book being copied].
Is there any further interest in developing the drupal 7 version?
Comment #4
thummel commentedThere was an error in the install file that I believe I corrected. It appears to install correctly and seems to work now.
Comment #5
pfrillingGreat job thummel! The code seems to be working for me. Attached are three patch files with your changes. Sorry for the three files, I wasn't sure how to roll three commits into one patch.
Comment #6
thummel commentedThanks for the patches! It would be really nice to put out a drupal 7 release for this module. Hopefully, the module's maintainer can do that.
Comment #7
vm commentedMarking as needs review
Comment #8
bradallenfisher commentedDoesn't create a book_copy_history table for me. I keep getting this error after clicking derive a copy:
However it does create a new book as expected.
Comment #9
btopro commentedcopys it within the previous item copied in my testing. I clone a book from its root and it doesn't make a new book, adds clones of the entire structure inside the current one. Not a huge deal to then move it over to its own book from there but I clicked on the book root so I wouldn't expect it to clone inside itself.
Comment #10
jduhls commentedI got the same error as you, baf139. I commented out 151-153 of book_copy.module to fix (also, if anyone wants to create a patch).
Comment #11
btopro commentedvalderama 's initial port has been committed to dev, I'm working through versions to give people credit to get up to a working dev now
Comment #12
btopro commentedthummel 's changes from zip file merged in
Comment #13
btopro commentedbaf139's coder audit and bug fixing applied. I've also done a general coding practices audit on the module. It still needs work to be 100% stable but is at least dev worthy. Some early testing suggests that it will bomb out on large structures but smaller structures appear to be creating successfully.
Comment #14
jduhls commentedRE: #8 and #10. FWIW: "no book_copy_history table" error when click "Show book history" from within a book:
PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "book_copy_history" does not exist LINE 1: SELECT * FROM book_copy_history WHERE bid = '1279' ^: SELECT * FROM {book_copy_history} WHERE bid = :bid; Array ( [:bid] => 1279 ) in _book_copy_initial_source() (line 265 of /sites/default/modules/contrib/book_copy/book_copy.module).Comment #15
btopro commentedjduhls checkout the latest dev, I believe baf139's changes have fixed this. A dev branch will publish tonight if you don't want to mess with git
Comment #16
jduhls commentedah yes...sorry. my first git clone from a drupal repo. thought I had to wait for the dev version to appear on home page for this project. got it now. thanks!
Comment #17
aitala commentedSeems to work fine on a test site...
Eric
Comment #18
mallin commentedI've done a lot of testing on a test site, copied a book with ca. 400 nodes. Done it several times, succeeded every time.
Comment #19
btopro commentedthat's two confirmed workings out there. how bout 1 more and I'll flag for an alpha? I'm pretty impressed you got it to copy 400 successfully, some testing by a coworker was bombing out after 50 or so, though that may be an unrelated issue.
Comment #20
mallin commentedIt took a while and I got some timeouts in the browser, but it didn't influence the way module works. It copied the book without errors.
Comment #21
mcpuddin commentedThis code works for me.. however when cloning a new book, its not creating a new one but rather appending it to the existing one. Is that intended? or am I missing something?
Comment #22
btopro commentedI believe this is a glitch with the current implementation. As this is ported from D6 I think a coworker and I are going to sit down and take a closer look at the project as a whole, possibly creating a 2nd branch using replicate as the backend for this module.
Comment #23
mcpuddin commentedCool! I won't spend time then bugging this one and reposting it. I have a project coming soon that will need this and would be happy to pitch in as needed. Maybe we can hack it out at DrupalCon if ya'll be there.
Comment #24
btopro commentedI wish. I hang out on #drupal-edu on irc (freenode) if you'd like to discuss. Hopefully I'll get to it today because with how simple replicate is to implement is more just about building a simple Book item-tree spider of sorts and let it go to town.
Comment #25
btopro commentedinitial port to a 2.x branch has been pushed up to VC, dev will publish tonight.
Changes
- uses batch API to replicate large groups of items without issue, 5 at a time
- Works with full book outlines and is a cleaner implementation
- requires the replicate module (which requires entity)
Known issues
- outline designer integration shows up but does nothing, I think this has something to do with attempting to execute the batch API in the background
- While you are able to copy parts of branches, it currently doesn't appear to select these correctly when you force it through the URL, its inconsistent (like copying a branch and sibling branches instead of just the selected branch).
Dropped
- history functionality, seemed like cruft to me but will add in a sub-module for it if people want that
- book_copy specific api. this can be achieved via the replicate api functions though I'm not opposed to getting it back in
- at the moment the textual link on a node in a book outline isn't there, I'm waiting til issue 2 is resolved before putting this back on the interface. for now, you can enter a node id in the url when you go to copy a full book outline to change it to parts of outlines
If there is verification that this copies entire outlines successfully in other peoples environments then I'll close this out and we can start working on the other issues
Comment #26
btopro commentedThe previously reported issues have been resolved and support for a new title on copy has been added! Please try out the Beta though I'm very happy with the results I'm seeing.