Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Undefined offset: 0 while parsing form map on page default
I’ve updated three websites to 4.6.1 with no issues at all. The fourth fails to parse an article form with the error in subject.
I’ve turned debug mode on in case someone wants to have a look
http://ladestlab.it
thanks
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
Hi Harri
I think that <txp:article offset="0" form="map" limit="1" />
could just be <txp:article form="map" limit="1" />
smd_where_used could help you find where you use the tag.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
offset=0 or not the result is the same, I only added it because of the error message
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
I would check your map
article form (or post it there).
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
Here is my “map” form. Let me stress that this was working fine prior to the update. I am using the unlimited categories plugin, which I also updated to the 4.6-version
<article role="article" itemscope itemtype="http://schema.org/Article">
<txp:if_individual_article>
<h2 itemprop="name"><txp:title /></h2>
<txp:else />
<h2 itemprop="name"><a href="<txp:permlink />" itemprop="url"><txp:title /></a></h2>
</txp:if_individual_article>
</txp:if_section name="news">
<p><strong><txp:text item="posted" /></strong><time datetime="<txp:posted format='iso8601' />" itemprop="datePublished"><txp:posted /></time>
</a></p>
</txp:if_section>
<div itemprop="articleBody">
<txp:if_article_image>
<txp:image_url id='<txp:custom_field name="article_image"/>'>
<txp:article_image class="mappa" escape="" /></txp:image_url>
</txp:if_article_image>
<txp:if_excerpt>
<txp:excerpt />
<txp:if_article_list>
<txp:permlink>Read more</txp:permlink>
<txp:else />
<txp:body />
</txp:if_article_list>
<txp:else />
<txp:body />
</txp:if_excerpt>
</div>
<p><strong>Share</strong> on <txp:arc_social_share_twitter>Twitter</txp:arc_social_share_twitter> | <txp:arc_social_share_facebook>Facebook</txp:arc_social_share_facebook> | <txp:arc_social_share_gplus>Google+</txp:arc_social_share_gplus>
<txp:if_section name="maps,themes, "><br><span itemprop="keywords">
<txp:rss_uc_filedunder linktosection="themes" label="Themes: " labeltag="strong" />
</span></txp:if_section>
</p>
</article>
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
ooook.
I spotted it. </txp:if_section name=“news”>
Sorry.
Thank you very much to all.
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
harri wrote #302343:
ooook.
I spotted it. </txp:if_section name=“news”>
Sorry.
Thank you very much to all.
Posting in the forum is the best debugging method:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
colak wrote #302344:
Posting in the forum is the best debugging method:)
Yep, it’s the ultimate rubber duck because, in the event the duck can’t help, we often can :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
This notwithstanding, the parser could be more verbose on errors. The current debugger doesn’t help much here.
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
etc wrote #302348:
the parser could be more verbose on errors.
+1. Even an indication of where on the Page/Form (if known) would be super helpful.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#11 2016-10-20 13:06:54
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,304
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
etc wrote #302348:
This notwithstanding, the parser could be more verbose on errors.
I actually was just looking for a topic where someone stumbled across parser differences < 4.6 vs 4.6+ for placing the following question, but, heck, now I can just drop it here :)
—-
As Oleg hinted at several times, proven true by some recent posts, the tag parser of 4.6 interprets tags in a stricter manner than previous versions.
Is it predictable what the outcome of certain groups of coding faults might be, eg. what will be the result on page of intersecting container tags, of closing a tag before opening one, of putting attributes in the closing tag, of not closing a tag, is a white page produced only by certain faults, etc? I’m asking because if this parser behaviour follows predictable rules
a) it might be easier for us to help the community if we put up a list/table of such faults/their results reasons and
b) in case of occurring code faults it could eventually be possible for Textpattern CMS to output hints for the web coder (e.g. “Look for intersecting container tags”).
(Edited: wording.)
Last edited by uli (2016-10-20 13:18:46)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [SOLVED] Undefined offset: 0 while parsing form map on page default
The parser can easily detect an opening/closing tags mismatch and issue a warning. This should be enough for debugging most syntax errors. We just have to decide how this info should be output: just a statement (easy) or the whole faulty block (well, easy too). Maybe, depending on testing/debug mode?
Offline