Node doesn't get parent assigned during nodeapi insert

p_alexander - January 7, 2009 - 00:38
Project:BookMadeSimple
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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;

#1

MarcElbichon - January 12, 2009 - 08:54

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

MarcElbichon - January 29, 2009 - 19:50
Status:needs review» fixed

#3

System Message - February 12, 2009 - 20:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.