I'm not sure where to start with this one, so hopefully it sounds familiar to someone. I'm running Zope 2.7.0 and rendered page templates all seem to have an initial blank line. Unfortunately, my xml parser doesn't like that. Am I just seeing some bizzare behavior here, or have page template always been like that? I'd hate to have to come up with some hack to strip that line off someplace. Has anyone had to deal with this before? Thanks joseph
Joseph Kocherhans wrote at 2004-3-12 10:29 -0700:
I'm not sure where to start with this one, so hopefully it sounds familiar to someone. I'm running Zope 2.7.0 and rendered page templates all seem to have an initial blank line. Unfortunately, my xml parser doesn't like that. Am I just seeing some bizzare behavior here, or have page template always been like that? I'd hate to have to come up with some hack to strip that line off someplace. Has anyone had to deal with this before?
I can get an XML declaration in the first line without any problem. I have never seen your problem. -- Dieter
Joseph Kocherhans wrote:
I'm not sure where to start with this one, so hopefully it sounds familiar to someone. I'm running Zope 2.7.0 and rendered page templates all seem to have an initial blank line.
What does your ZPT look like? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
I'm not sure where to start with this one, so hopefully it sounds familiar to someone. I'm running Zope 2.7.0 and rendered page templates all seem to have an initial blank line.
What does your ZPT look like?
It doesn't appear to be dependent on my zpt if that's what you're getting at. If there's something else you're trying to find out let me know :) Every PageTemplate I access has a leading blank line. I probably should have posted this to begin with, so here are the platform details: WinXP (if only I had a choice in the matter ;) Zope 2.7.0 Python 2.3.3 (The binary installer from python.org, not the one that gets installed with the Zope windows installer.) PageTemplates on my FreeBSD host are fine (same zope and python versions as above), but I just checked Zope 2.6.4 on WinXP and I'm getting that initial blank line. Could anyone verify this behavior on Windows? I've just been viewing the source of standard_template.pt to check things out for now. Thanks, joseph
Joseph Kocherhans wrote:
It doesn't appear to be dependent on my zpt if that's what you're getting at.
Interesting...
know :) Every PageTemplate I access has a leading blank line. I probably should have posted this to begin with, so here are the platform details:
How are you editing your page templates? Is it the same on BSD and XP?
Python 2.3.3 (The binary installer from python.org, not the one that gets installed with the Zope windows installer.)
Huh? Why aren't you using the one that comes with Zope? What did you do to change this? Are there any other parts of the 2.7.0 installation that you've tinkered with on WinXP?!
Could anyone verify this behavior on Windows? I've just been viewing the source of standard_template.pt to check things out for now.
Viewing the rendered source or the actual source? ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
It doesn't appear to be dependent on my zpt if that's what you're getting at.
Interesting...
know :) Every PageTemplate I access has a leading blank line. I probably should have posted this to begin with, so here are the platform details:
How are you editing your page templates? Is it the same on BSD and XP?
That's part of what baffles me... I've been checking the rendered standard_template.pt as a reference since I haven't edited it.
Python 2.3.3 (The binary installer from python.org, not the one that gets installed with the Zope windows installer.)
Huh? Why aren't you using the one that comes with Zope? What did you do to change this? Are there any other parts of the 2.7.0 installation that you've tinkered with on WinXP?!
I just changed the runzope.bat script to point to a different python.exe. I know it's probably not a good idea, but this is just a dev machine and I got sick of copying site-packages from my system python to zope's python. I haven't tinkered with anything else. I wondered if that was causing the problem, but my stock 2.6.4 install is doing the same thing. I haven't changed it at all. I think I've seen the same issue with Zope 2.5.x on Win2k before too. I wasn't trying to process PageTemplates as xml though, so it was just curious, not a fatal error. This was like 2 years ago though, so it's just a vague memory.
Could anyone verify this behavior on Windows? I've just been viewing the source of standard_template.pt to check things out for now.
Viewing the rendered source or the actual source? ;-)
The rendered source has the initial blank line... the actual source appears as expected over ftp and through the zmi. I'm going to just work around the issue for now, but I have to get a production 2.7 install going soon on Win2k server. I'll check and see if it behaves the same way before I change anything and report back. I'll be using zope's python in production too ;) joseph
Joseph Kocherhans wrote:
That's part of what baffles me... I've been checking the rendered standard_template.pt as a reference since I haven't edited it.
OK...
I just changed the runzope.bat script to point to a different python.exe. I know it's probably not a good idea, but this is just a dev machine and I got sick of copying site-packages from my system python to zope's python.
What have you got in site-packages that Zope is using? Oh for symlinks on Windows...
The rendered source has the initial blank line... the actual source appears as expected over ftp and through the zmi.
How are you viewing the rendered source? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
Joseph Kocherhans wrote:
That's part of what baffles me... I've been checking the rendered standard_template.pt as a reference since I haven't edited it.
OK...
I just changed the runzope.bat script to point to a different python.exe. I know it's probably not a good idea, but this is just a dev machine and I got sick of copying site-packages from my system python to zope's python.
What have you got in site-packages that Zope is using? Oh for symlinks on Windows...
ldap, win32com, PIL, psyco, reportlab, pretty much all of the egenix stuff, PyXML
The rendered source has the initial blank line... the actual source appears as expected over ftp and through the zmi.
How are you viewing the rendered source?
Viewing the source in Firefox, Mozilla, and IE. The problem actually came to my attention while I was using CMFReportTool. PyXML couldn't parse one of the templates due to the initial blank line. It seems like the problem is independent of the http client. joseph
Joseph Kocherhans wrote:
I'm going to just work around the issue for now, but I have to get a production 2.7 install going soon on Win2k server. I'll check and see if it behaves the same way before I change anything and report back. I'll be using zope's python in production too ;)
Yay. Win2k server, fresh install, works fine. I guess I'll add one product/package at a time and test again... Hopefully I'll find what the cause is. I'll report back regardless. joseph
participants (3)
-
Chris Withers -
Dieter Maurer -
Joseph Kocherhans