Download & Extend

Node doesn't get parent assigned during nodeapi insert

Project:Book made simple
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When trying to use tokens for Pathauto alias assignment, it became clear that $node->parent wasn't getting updated by BookMadeSimple, and it doesn't get done in the book_outline_submit call. I checked the book module to see when it happens there, and I couldn't find anything (may have missed it). However, the same token method works when using plain books along with Pathauto and forcing an update on $node->parent from within BookMadeSimple corrected the issue.

Also, I had to change the module weight to 1 (see http://drupal.org/node/332808#comment-1186245).

Not gonna roll a patch for one line, plus the newest version isn't in CVS I think? I used 1.5 from http://code.google.com/p/mmr-drupal-modules/downloads/list

After line 130 add:

$node->parent = $root_id;

Comments

#1

Change made in release 1.6 available at http://code.google.com/p/mmr-drupal-modules/downloads/list

Weight change is avaliable in 1.5 but you need to run update.php.

#2

Status:needs review» fixed

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.