Needs review
Project:
InsertNode
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2009 at 03:03 UTC
Updated:
24 Apr 2011 at 22:38 UTC
Attached is a patch that makes InsertNode apply the normal Drupal processing to the body of the node, so that things like CCK fields and filter tags will be included/processed. Note: this may/will break pages where a node inserts it's own body. It should be pretty easy to prevent this, but I think anyone inserting the same node in itself deserves to have broken pages. ;) Well, not really, but I don't have time to fiddle around with it.
| Comment | File | Size | Author |
|---|---|---|---|
| InsertNode.module.process_content.diff | 1 KB | OliverColeman |
Comments
Comment #1
OliverColeman commentedActually, this may/will break all pages that are part of a cycle of node insertions (eg, let A, B and C be nodes. If A inserts B, B inserts C, and C inserts A, then A, B and C will break).
Comment #2
AlexisWilke commentedOliver,
Indeed, loops will break. Note that in the following, the last test on the 2nd line will always fail (i.e. return false).
I'm testing so see whether that fix would work in 6.x... 8-)
Thank you.
Alexis
Comment #3
OliverColeman commentedYou're right, the last test on the second line will always fail; it was a vestige of previous development, like that crazy appendix in humans... :)
Comment #4
AlexisWilke commentedOliver,
Okay! I have found the proper function to use in Drupal 6.x. It is called node_view().
That can be used to display the body, the teaser and the links.
I'm about to include that in the D6 version (btw, I do not support the v5.x so I will not be applying your patches, however, feel free to contact the primary author to be included as a programmer if you want to do so! It would be great, there are several other issues in v5.x that need to be fixed... 8-) )
EDIT:
This is now checked in the -dev version. It works great for me and includes an anti-recursivity feature too.
Thank you.
Alexis
Comment #5
AlexisWilke commentedThis issue is now 2 years old, closing. You should at least be on D6.
Thank you.
Alexis