NetTalk Central

Author Topic: Browse will not page properly  (Read 4573 times)

Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Browse will not page properly
« on: May 30, 2019, 03:35:03 AM »
Hi,

I have a bog-standard browse that will not refresh when I hit any of the nav-buttons (first-prev-next-last), but instead the page turns grey.
If I hit F5 the correct page refreshes.

In the console I get this error:
XML Parsing Error: mismatched tag. Expected: </th>.

Which is rubbish.  In the page source line 22 is in the pageheadertag:

<!-- PageHeaderTag -->

<div id="pageheadertag_div"  class="nt-site-header-6 ui-widget-header ui-corner-top"  data-role="header">
<div class="nt-left nt-site-header-logo"><a href="../IndexPage"><figure><img src="images/logo_macy.jpg"  data-image="d3pjan8a1fc1"</figure></a></div>
<div class="if-not-small">
  <h1>Mac Y - Kundeportal</h1>      <<<<< This is line 22
</div> 
<div class="if-small">
  <h2>Mac Y - Kundeportal</h2>
</div>

 <strong>S&#230;lger: MariSoft /</strong>

<!-- Double Drop Menu -->

What could be wrong here?

Cheers
/Poul

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Browse will not page properly
« Reply #1 on: May 30, 2019, 04:22:58 AM »
Don't know if that's a (the) problem but your first <div> has no corresponding </div>

The error seems to indicate that you're in table mode which I doubt is the case? So maybe it's a red herring.

Peter

Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: Browse will not page properly
« Reply #2 on: May 30, 2019, 05:44:51 AM »
Hi Peter,

No I just cut from the source that way.  If I take the whole page the div's are correctly paired.
But your remark about table mode (which it is for this browse) made me test i div mode. And here there is no problem.

So paging is broken when in table mode!

/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse will not page properly
« Reply #3 on: May 30, 2019, 09:00:24 PM »
Hi Poul,

the problem is caused when the response from the server, ie the data for the next page, is not valid xml.
In this case it's complaining that the problem occurs by the time the </th> does (or doesn't) appear.

In most-all cases (assuming no bugs on my side) it happens when you turn on "allow xhtml" somewhere, and then the items in that field are not valid xml. In this case it's this part.

<div class="nt-left nt-site-header-logo">
  <a href="../IndexPage">
    <figure>
      <img src="images/logo_macy.jpg"  data-image="d3pjan8a1fc1"
    </figure>
   </a>
</div>


as you can see the <img> tag has no closing tag. I recommend adjusting that line to read;

      <img src="images/logo_macy.jpg"  data-image="d3pjan8a1fc1" />

Cheers
Bruce





Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: Browse will not page properly
« Reply #4 on: June 02, 2019, 08:29:20 AM »
Thanks Bruce.
Fixed that error but table will still not properly page.

Ran the html file through html-tidy and got 3 warnings only, so cannot see where the problem is:

HTML Tidy Parsing ...
line 21 column 73 - Warning: <img> lacks "alt" attribute
line 85 column 53 - Warning: <img> lacks "alt" attribute
line 99 column 43 - Warning: trimming empty <span>
Info: Document content looks like HTML5
3 warnings, 0 errors were found!

Attached the source file.

/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse will not page properly
« Reply #5 on: June 03, 2019, 05:30:08 AM »
HTML is good but the text has to be valid XML as well.
So run it through an XML Validator.

Also - special note - <b> MUST be <<b> in a Clarion string.

If you struggle more come to the webinar on Thursday, ask a question, and I can show you how to inspect the xml in the browser.

cheers
Bruce

Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: Browse will not page properly
« Reply #6 on: June 04, 2019, 12:32:50 AM »
Hi again,

This is a bit strange.  The only non-generated code is in the pageheadertag where I have a small include file (see below).
Tested in w3school xml-validator it has an error at line 6, column 1 that I simply cannot figure out:
Extra content at the end of the document.

But even if I remove that piece of code the site still has this paging problem.  Strange ???

Anyway my include file:

<div class="nt-left nt-site-header-logo">
    <a href="../IndexPage">
    <figure><img src="images/logo_macy.jpg"  data-image="d3pjan8a1fc1"/></figure>
    </a>
</div>
<div class="if-not-small">           <<<---  Error line
  <h1>Mac Y - Kundeportal</h1>
</div> 
<div class="if-small">
  <h2>Mac Y - Kundeportal</h2>
</div>

Cheers
/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse will not page properly
« Reply #7 on: June 05, 2019, 01:22:50 AM »
The text, as posted below, is valid XML.
Perhaps you should post the small include file here so we can see that?


Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: Browse will not page properly
« Reply #8 on: June 05, 2019, 01:28:25 AM »
See attached.

/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse will not page properly
« Reply #9 on: June 05, 2019, 02:01:36 AM »
that include file of xml seems ok.
So perhaps we need to see the wider response?

>> But even if I remove that piece of code the site still has this paging problem.  Strange ???

suggests the problem is elsewhere in the response. (so you've fixed the inc file, but perhaps there are issues elsewhere as well.)

See NetWork tab in browser, developer tools, to see the whole response returned by the server.

cheers
Bruce

Poul Jensen

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: Browse will not page properly
« Reply #10 on: June 05, 2019, 06:36:41 AM »
Dev tools --> Network does not make any sense to me :-)

I will try and pop in at the webinar tomorrow.

Cheers
/Poul

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Browse will not page properly
« Reply #11 on: June 05, 2019, 10:25:19 PM »
>> Dev tools --> Network does not make any sense to me :-)

You may not be alone. But this is a critical resource to understanding how things work, and also very important in debugging. Definitely come to the webinar and ask a question so I can show this. Very important....

cheers
Bruce