NetTalk Central

Author Topic: Error. Invalid String Start and String End positions. No data will be sent  (Read 3378 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Hi,

Having an issue with a NTWS browse procedure not generating anything on the page
The log from debugview is attached

My thinking is that something is generating something funky somewhere

Any ideas appreciated of how to track this down?

thanks

Johan


 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #1 on: November 23, 2023, 09:09:44 PM »
>> Any ideas appreciated of how to track this down?

Inspect the generated code, and follow it through netweb.clw
I'd work backwards from the calls where the browse is failing.

Cheers
Bruce


JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #2 on: November 23, 2023, 09:29:07 PM »
Hi Bruce,

thanks, just found that if I switch off the global setting for user must be logged in then it generates,
even if local settings are set to not require log in,
still testing and investigating

perhaps there were some changes to this area?

thanks

Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #3 on: November 24, 2023, 05:25:32 AM »
define "local settings are set to not require log in"

Bruce

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #4 on: November 24, 2023, 06:46:56 AM »
Hi Bruce

Was easier to attach a pic showing the settings.
My understanding is that the global can be set to "user must be logged in"

but to make a procedure public I can set those to "User must be logged in - NO"

If the global default on security tab is set to "user must be logged IN" and the local(procedure) setting is NO, then the browse loads, but no data is loaded.

Johan







Johan


Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #5 on: November 24, 2023, 08:24:30 AM »
Hi JohanR
What NT version? Ive tested it using 14.13 and works ok.
-----------
Regards
Alberto

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #6 on: November 24, 2023, 08:49:24 AM »
Hi Alberto

Apologies, should have been one of the 1st things I mentioned
Yes, also 14.13

That case will scratch further to try and understand what's going on

regards

Johan

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #7 on: November 24, 2023, 09:29:52 AM »
FWIW, Ive opened the Bsic with Llogin example, set the defaul/secure on the webserver to Yes, goto the mailboxes browse and set it to no and it works.

Cheers
-----------
Regards
Alberto

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Error. Invalid String Start and String End positions. No data will be sent
« Reply #8 on: November 25, 2023, 04:07:10 AM »
Hi,

Using the source generated by the example app and my app, something is triggering an extra IF in my app,
This line is not generated in the example

      If (p_web.Site.LoginRequired = false or p_web.GetSessionLoggedIn() = true)

points to this line in the template
      p_web.Trace('zaq==: 1=(%SecwinCtrlsDisplayProcedure)2=(%nLoginRqd)3=(%nLevelRqdUp)4=(%nLevelRqd)5=(%SecwinAccessCtrlsGroupN)6=(%TMPPutEndBecauseIf)')

      #insert(%HandleLoginCodeLevel2,%SecwinCtrlsDisplayProcedure,%nLoginRqd,0,%nLevelRqdUp,%nLevelRqd,%SecwinAccessCtrlsGroupN,'',''),%TMPPutEndBecauseIf

      p_web.Trace('zaq-2')


Below the differences, not sure, but seems that this could be the issue.
Trying to figure out what is causing it or how the security logic is different between the 2 apps

Will post if I find something

thanks for your help so far

Johan



example app
      p_web.Trace('zaq-1')
      p_web.Trace('AA-p_web.Site.LoginRequired:' & p_web.Site.LoginRequired)   
      p_web.Trace('zaq==: 1=(AliasBrowseControl)2=(0)3=()4=()5=()6=(0)')
      p_web.Trace('zaq-2')
            loc:ColumnResizeable = p_web.site.BrowseColumnsResizeable
            packet.append(p_web.CreateBrowseHeader(loc:vordernumber,'1','AliasBrowseControl',p_web.Translate('Name',(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),'Click here to sort by Name',,,p_web.Combine(),1, loc:columns+1 ,,,0,loc:Sorting,'String','nt-left',loc:LayoutMethod,' style=" width:'&clip('auto')&';" title="'&p_web.jsok('Click here to sort by Name')&'" data-colname="'&clip('ALI:Name')&'"',loc:CellStarted,0 + 1, loc:ColumnResizeable))

my app
      p_web.Trace('zaq-1')
      p_web.Trace('AA-p_web.Site.LoginRequired:' & p_web.Site.LoginRequired)   
      p_web.Trace('zaq==: 1=(test_client_list)2=(-1)3=()4=()5=()6=(0)')
      If (p_web.Site.LoginRequired = false or p_web.GetSessionLoggedIn() = true)
      p_web.Trace('zaq-2')
            loc:ColumnResizeable = p_web.site.BrowseColumnsResizeable
            packet.append(p_web.CreateBrowseHeader(loc:vordernumber,'1','test_client_list',p_web.Translate('client nr',(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),'Click here to sort by client nr',,,p_web.Combine(),1, loc:columns+1 ,,,0,loc:Sorting,'String',,loc:LayoutMethod,' title="'&p_web.jsok('Click here to sort by client nr')&'" data-colname="'&clip('cli:client_nr')&'"',loc:CellStarted,0 + 1, loc:ColumnResizeable))


the template code