Forum OpenACS Q&A: include tag weirdness

Collapse
Posted by Sean Redmond on

I've never had a problem with an include tag before, so this has me stumped. I'm doing some experimenting and not working with any packages, so:

  • The page with the include tag is in /web/serverroot/www/
  • The included file is in /web/serverroot/resources/

This server is OACS 4.6.3 server, which I setup just by making a copy of a working server.

The include is right near the end of the file, like so:

    <div class="tk">
      <include src="/resources/test">
        <ul>
          <li>63.57</li>
          <li>22.225</li>
          <li>22.1421</li>
        </ul>
      </div>
    </div>
  </body>
</html>

And for now, /resources/test.adp just contains <p>TEST<p>

When I load the file, it's getting somewhat randomly mangled. For instance, on one invocation, the following gets put at the beginning of the file:

 
        <ul>
		  <li>63.57</li>
		  <li>22.225</li>
		  <li>22.1421</li>
        </ul>
      </div>
    </div>

  </body>
</htm>
<!DOCTYPE ...

And at the end:

      ...
      <div class="tk">
		<p>TEST</p>
l>

Everytime it's a little bit different, but always the end before the beginning. What's going on? It's looks like different threads are sending output in the wrong order, but I've never had that happen before?

Collapse
2: Re: include tag weirdness (response to 1)
Posted by Jeff Davis on
Can you try and change the name from resources to something else. resources is magic inside the request processor and it's possible it is causing this behavior.
Collapse
3: Re: include tag weirdness (response to 2)
Posted by Sean Redmond on
As much as I was hoping it would be that simple, I renamed the directory (to "grezources") but it didn't make any difference.
Collapse
4: Re: include tag weirdness (response to 1)
Posted by Torben Brosten on
"I setup just by making a copy of a working server."

Is this a VM environment? running aolserver3.x?

I raised the nsparam stacksize from [expr 128*1024] to [expr 256*1024] in one (as part of a tuning exercise).

On restart, aolserver began responding with oddly broken html pages through the templating system.

I set the nsparam stacksize to its original setting, restarted and the problem went away...

Collapse
5: Re: include tag weirdness (response to 4)
Posted by Sean Redmond on
It is not a VM, and it is Aolserver 3.4.2. I'm betting that it will turn out to be something simple like that, but it isn't the stacksize, or at least I haven't changed the stacksize.

To make the copy, I just copied /web/server1 to /web/server2, and made the few necessary changes to the server2 config file.  Both servers are for the moment using the same database, but I wouldn't expect that to cause this kind of trouble.

Collapse
6: Re: include tag weirdness (response to 1)
Posted by Mark Aufflick on
I have seen wierd rendering problems like this in pages where there are unclosed or out-of-order adp tags.

It can be a real pain to track down, and the symptoms are very subtle - often a stray > with a few chars exactly as you have expeienced.