BookMadeSimple does everything that the native book module lacks of. I have posted an issue #475032: Add book parent when translating a book page to the book.module issue queue, but I don't think, this would be solved there. Perhaps you can solve it in BookMadeSimple?


MarcElbichon’s picture

Sorry, this is an Internalization issue.

Pepe Roni’s picture

Yes, you're right. But with that point of view, BMS at all is an issue of the book.module.

So why not extend BMS to support this, as the said issue is an issue with (translating) books?

MarcElbichon’s picture

yes but translation is done by Internalization not by book module. I don't know Internalization module, but it seems it don't act well with page book.

What is exactly the problem ?

Pepe Roni’s picture

As long as you are not comfortable with I18n (Internationalization, 18 characters between I and n) you won't be able to understand my problem, I see. I will post a receipt so that you can follow my steps until you run into the same problem. But give me some time for this, please.
Now, here is the receipt:

  • Install the i18n module and activate Internationalization and Synchronize translation (I don't know if it is really needed)
  • go to admin/settings/language and edit English. Here you enter "en" as path prefix
  • now add another language (French?), but keep English as default
  • now create two node types, one for book parent and one for child page. In section Workflow settings enable multilingual support with transalation. In subsection Synchronize translation you can check what you need. At first, keep all unchecked. In section BookMadeSimple I think you know what to do ;)
  • Now make sure your current language is en. If not, add en/ in the url just before node/. Add content for a book parent in english and then add a child page in english, too (with BMS methods). The book outline should show the correct parent!
  • You can enter additional book pages, if you want, but you need not to realize the said problem.
  • Now translate the book parent into the other language (using the Translate-tab on the node view or node edit form)
  • Now go back to original node (using the English link at the bottom), then to the book page. Translate this book page into the other language, too. Now, in the node edit form, check the Book outline section: no book is set! I would have expected to have the translated book there (all because it exists!).

What I lined out here, is what I think is the normal translation process: begin with the parent, then translate the child pages. And the translated child pages should stay connected within the translated book automatically.

MarcElbichon’s picture

new14.62 KB

Can you test this version ?

Pepe Roni’s picture

Sorry, does not work correctly. The book is set, but the parent item is not.

If you add &parent=nnn to the url (or similar in the links array), where nnn is the bid of the translated parent, it should work. If I do it manually, it at least works.

MarcElbichon’s picture

new14.69 KB

Curious, this works for me.
I can't modify the url because it is managed by i18n and I can't capture it in BMS code.
Can you try with this version ?

MarcElbichon’s picture

new14.67 KB

Oops, i forgot to delete traces
Send you a new version

Pepe Roni’s picture

Sorry, no changes, even with fresh drupal installation (except for trace messages still there).

Now had some time to analyze the problem a little bit more. If you omit the parent item in a child page, it is replaced by the book itself, thus in the end, it seems to work. But if you translate a page on any lower level (a page as a child of a page), always the book itself is set as parent item. You can always control it before saving in the book outline section.

Could you catch/overwrite the function translation_node_overview in on line 15? This function lacks to create &parent=nnn in the generated link for add translation. Don't know if Drupal searches for a function book_made_simple_node_overview, in that you can clone and improve the code?

MarcElbichon’s picture

new14.97 KB

Can you test this new version ?
I add parent=nnn to url.

Default "add child" link and links added by BMS don't work when adding a child to translated page (non default language). Parent book is not set.
Is it a correct way ?
If yes, may i hide dropdown list box in translated pages ?

Prefix language wasn't set

MarcElbichon’s picture

new15 KB

If browser hangs up, try this version

Pepe Roni’s picture

Both versions work for me! Thanks.

Great work!

Now, whats about a new release 6.x-2.1 or 6.x-2.x-dev?

MarcElbichon’s picture

Have you checked style list of links as described in your #474390: Add child page does not respect language url issue (#3)
The last version of this post contains also this feature.

When you'll confirm all is OK, i'll create a new release.

Thanks for your contribution


MarcElbichon’s picture

I'm wondering if you could help me.
I'd like to create an handbook for BMS, but my english being so poor, i'm wondering if you could do this for me !

Pepe Roni’s picture

To #13: Yes, it works!

Pepe Roni’s picture

Of course, I really like to do that! I have already written a small howto: Simple image gallery with imagefield where I mentioned BMS.

We can exchange e-mail adresse via the contact form. Then we can collaborate on the handbook until we have a final version.

I am also willing to write the german translation of BMS if you send me the .pot file.

MarcElbichon’s picture

new3.33 KB

Here's the .pot file

MarcElbichon’s picture

new3.32 KB

Sorry. I changed pot file. Here's the newest

MarcElbichon’s picture

Status:Active» Closed (fixed)
scottrigby’s picture

Project:Book made simple (Obsolete)» Book made simple
Version:6.x-2.0» 6.x-3.4