Build error: The current node cannot contain other nodes

This forum is for all Flare issues not related to any of the other categories.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Build error: The current node cannot contain other nodes

Post by ChoccieMuffin »

Hi all.

In one of my projects (which I admit gets hacked around outside of Flare quite a bit) I get this error when building PDF targets.

I can't find any help on the error so I don't quite know where to start in tracking down the problem. Any hints, folks?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
abrayman
Jr. Propeller Head
Posts: 1
Joined: Tue May 10, 2016 7:05 am

Re: Build error: The current node cannot contain other nodes

Post by abrayman »

I had a similar problem when building a pdf. I watched the Build Progress, and found where the build (which topic) was failing. Once you find where the build is failing, check that topic, and in the xml look for :

<body> <![CDATA[ ]]></body>

I removed that line of code, I replaced it with: <body> </body>

After the CDATA was removed, the build was successful.
wabernat
Propeller Head
Posts: 18
Joined: Thu Aug 21, 2014 4:46 pm

Re: Build error: The current node cannot contain other nodes

Post by wabernat »

I just fixed this problem using the above method. I've been developing a new template and received this error when I first went to build. After a fruitful couple of hours wasted, I went home, ate, burned some night oil, and discovered (by toggling off topics one by one using conditional text) that the cool new cover page I had been working on was the offending bomb-chucker (I should be grateful it wasn't an Appendix!)

Anyway, I encountered much the same problem as previously described. In my case there was no CDATA declaration between the body tags. In fact, there was nothing at all, which is what resulted in this bomb. If you get this error, look for CDATA, but also look for "<body> </body>" in the text. If you see it, Flare's favorite character, the non-breaking space #&160; is your pal. I changed it to:

"<body>#&160;</body>" and now it works like a champ.

--William
garrettwinn
Jr. Propeller Head
Posts: 3
Joined: Thu Feb 28, 2013 3:48 pm

Re: Build error: The current node cannot contain other nodes

Post by garrettwinn »

I also just ran into this issue, but it had a slightly different problem and solution, so I thought I'd post here as well.

The way to find this one (after searching for both "CDATA" and "<body> </body>") was to go through and conditionalize out each topic one by one in the TOC and then try to build and see when it actually worked.

Turns out, the problem was this part of the text of the page:

Code: Select all

<body>
<MadCap:tocProxy />
</body>
And to fix it, I just removed all the spaces or whatever and made it into a single line:

Code: Select all

<body><MadCap:tocProxy /></body>
Then it was able to build fine.

--Garrett
Wymando
Jr. Propeller Head
Posts: 1
Joined: Thu Feb 03, 2022 2:18 pm

Re: Build error: The current node cannot contain other nodes

Post by Wymando »

I experienced the same issue for yet another reason.
I browsed the build log to identify the topic file that was tripping up the build.

Inside the topic file, I found I had left an html comment in the code.
<!-- comment contained here -->
Usually these are fine, but for some reason this was tripping the system. (Perhaps because it was wrapping a MadCap:pagebreak element that I had wanted to turn off temporarily.)

I removed the line of code and rebuilt without a problem.
Post Reply