NetTalk Central

Author Topic: MakePage not including pageheader  (Read 3494 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
MakePage not including pageheader
« on: January 04, 2012, 05:15:41 PM »
I wanted to keep track of what page a user is on. As a test I put self._Trace('Page:'&p_page) in the embed before the parent.

The trace worked fine, but then the only time the page header was sent to the browser was on the index page because I call it out in the XHTML.
When I removed to embedded code, everything works normally.
I thought it was the trace that caused the error so I replaced it with a single comment. Compiled and ran and the header is missing again.

Any thought as to why this might be happening or a better place to track what page a session has been served? I thought of Sendfile, but that gets everything and I just want page names.

Thanks,
Chris
------------------------------------------------------------
Here is the procedure in ThisNetWorker -

ThisNetWorker.MakePage PROCEDURE(<STRING p_page>,LONG p_Type=0,LONG p_Special=0,<STRING p_Title>,<String p_Header>,<string p_footer>)

  CODE
  ! Start of "NetTalk Method Executable Code Section"
  ! [Priority 2500]
  !stuff goes here <-- this breaks the headers
  ! Parent Call
  PARENT.MakePage(p_page,p_Type,p_Special,p_Title,p_Header,p_footer)
  ! [Priority 7500] 
  ! End of "NetTalk Method Executable Code Section"

! Start of "NetTalk Method Routine Section"
! [Priority 5000]

! End of "NetTalk Method Routine Section"

This just makes no sense to me.
« Last Edit: January 04, 2012, 05:48:02 PM by ccordes »
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: MakePage not including pageheader
« Reply #1 on: January 05, 2012, 03:16:55 AM »
fixed in 6.14.
thanks for the report.

For those that care, the inclusion of the embed code causes the Parent Call to pass a parameter for the header. The receiver treated "omitted" and "blank" as different.

This fix will make suppressing headers and/or footers) on specific browses and forms more cunning - instead of just '' it'll need something like 'xxx'.

cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: MakePage not including pageheader
« Reply #2 on: January 05, 2012, 03:57:12 AM »
Thanks, Bruce I should've seen that.
If you use  if omitted(p_page) or p_page=''  instead of if omitted(2) in the parent would that fix it?

Chris
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: MakePage not including pageheader
« Reply #3 on: January 05, 2012, 04:35:30 AM »
I've tweaked it so;

if omitted(2) or p_page=''

I can't use the omitted(p_page) form because C5.5 doesn't support it.

cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: MakePage not including pageheader
« Reply #4 on: January 05, 2012, 04:47:52 AM »
Fixed here.
The actual fix for the header issue is
    if omitted(6) or p_header=''   !for the headers
and
    if omitted(7) or p_footer=''    !for the footers

You already have an ELSIF p_page=''  in the first condition

I'll watch for 6.14

Thanks again.
Chris
« Last Edit: January 05, 2012, 09:05:11 AM by ccordes »
Real programmers use copy con newapp.exe