Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Strange form problem - part of the page not parsing/rendering
OK, this is weird. A few days back my blog starting acting strangely. No changes in the forms were made for 6 moths, I only updated from 4.07 to 4.08 this year.
Check this page, for example: http://bobydimitrov.com/mind/458/my-car
Currently, under Firefox, I get the post, the list of comments (13 of them) – and that’s it! No comments form, no footer. Those are missing from the source too. Strangely, under IE8, I get the comments form, but not the footer. There’s some mixup, as the comment preview also does not work as expected (shows the preview but nothing below – no comment form, no comments, no footer.
Again, I have not changed the forms, so I have no idea where to look for the problem and what’s the source of it. Any ideas are welcome!
Last edited by Boby Dimitrov (2009-06-05 10:00:48)
Offline
Re: Strange form problem - part of the page not parsing/rendering
Here are the forms, just in case. The blog uses “default” page and “default” form for displaying the posts.
default page:
<txp:output_form form="section_prefix" />
<txp:output_form form="header" />
<txp:if_section name="">
<h1><txp:site_name /></h1>
<txp:else />
<txp:if_article_list>
<h1><a href="/" title="Към главната страница..."><txp:site_name /></a><span> - сайт на Боби Димитров</span></h1>
</txp:if_article_list>
<txp:if_individual_article>
<h1><a href="/" title="Към главната страница..."><txp:site_name /></a> » <txp:spc_section_alias_link group="1,2" /><span> - сайт на Боби Димитров</span></h1>
</txp:if_individual_article>
</txp:if_section>
<a id="JumpToNav" href="#Container">Към съдържанието</a>
<txp:output_form form="navigation" />
<div id="Container">
<txp:if_section name="search">
<h2>Резултати от търсене</h2>
<p>Ако не намирате това, което търсите, пробвайте с по-малко (или други) думи. Търсачката разграничава малки от главни букви, затова търсене за "веселие" е различно от търсене за "Веселие".</p>
<txp:article form="search_results" sort="posted desc" />
</txp:if_section>
<txp:if_section name="default">
<txp:article limit="10" />
<txp:feed items="10" h="2">http://www.google.com/reader/public/atom/user/02369879082390605247/state/com.google/broadcast</txp:feed>
<txp:else />
<txp:if_article_list>
<h2><txp:spc_section_alias_name group="1,2" /></h2>
<p><txp:spc_section_alias_description group="1,2" /></p>
</txp:if_article_list>
<txp:article limit="30" />
</txp:if_section>
<txp:if_section name="last">
<txp:output_form form="last_comments" />
</txp:if_section>
<txp:if_section name="tag">
<p id="TagCloud"><txp:tru_tags_handler break=" " setsizes="0" /></p>
</txp:if_section>
<txp:if_section name="default,tag,last,about,search">
<txp:else />
<txp:if_article_list>
<div id="MiniNav">
<span id="Newer"><txp:newer>По-нови</txp:newer></span>
<span id="Older"><txp:older>По-стари</txp:older></span>
</div>
</txp:if_article_list>
</txp:if_section>
</txp:if_section>
</div>
<txp:output_form form="footer" />
default form:
<txp:if_individual_article>
<h2><txp:title /></h2>
<txp:cnj_if_excerpt>
<txp:excerpt />
<txp:body />
</txp:cnj_if_excerpt>
<txp:cnj_if_not_excerpt>
<txp:body />
</txp:cnj_if_not_excerpt>
<p class="CommentsLink"><txp:posted /> | <txp:spc_section_alias_article_link group="1" /> | <txp:tru_tags_if_has_tags>Тагове: <txp:tru_tags_from_article /></txp:tru_tags_if_has_tags></p>
<div id="MiniNav">
<span id="Older"><txp:link_to_prev><txp:prev_title /></txp:link_to_prev></span>
<span id="Newer"><txp:link_to_next><txp:next_title /></txp:link_to_next></span>
</div>
<txp:if_comments>
<h2>Коментари</h2>
</txp:if_comments>
</txp:if_individual_article>
<txp:if_article_list>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:cnj_if_excerpt>
<txp:excerpt />
</txp:cnj_if_excerpt>
<txp:cnj_if_not_excerpt>
<txp:body />
</txp:cnj_if_not_excerpt>
<p class="CommentsLink"><txp:posted /> | Секция: <txp:spc_section_alias_article_link group="1" /> | <txp:comments_invite /></p>
</txp:if_article_list>
Offline
Re: Strange form problem - part of the page not parsing/rendering
- I see extra
</txp:if_section>
that should be there (end of default page). - Turn your site’s Status to debugging and look for errors.
- If it doesn’t solve it oossibly post a tag trace
Last edited by Gocom (2009-06-05 11:40:13)
Offline
Re: Strange form problem - part of the page not parsing/rendering
Whoooooa, the Debugging status threw a ton of errors! I don’t even know where to begin… Should I post the whole tag trace output?
By the way, should I remove a </txp:if_section> from the default page, or should I add one and where?
EDIT:
OK, removing one of the </txp:if_section> solved the missing comments form/footer problem, seems like that stopped the page from being parsed fully. Although it IS weird how did that happen by itself, as I haven’t edited the forms/pages in a long time…
Now there are two general type of errors in the tag trace. First one is repeated for every comment:
Tag error: <txp:message /> -> Textpattern Notice: tag is deprecated on line 1948
And the other is complex and obviously related to a plugin, but I’ll be grateful if any advice is offered:
Tag error: <txp:spc_section_alias ....(i stripped this part as it contains the text values of the tag properties) /> -> Notice: Undefined variable: final_dest on line 46
Notice: Undefined variable: namethis on line 59
Notice: Undefined variable: titlethis on line 75
Notice: Undefined variable: id on line 87
etc etc etc...
Last edited by Boby Dimitrov (2009-06-05 12:26:38)
Offline
Re: Strange form problem - part of the page not parsing/rendering
txp:message
has been replaced by txp:comment_message
; make that change in your comments form (Presentation->Forms)
Code is topiary
Offline
Re: Strange form problem - part of the page not parsing/rendering
Boby Dimitrov wrote:
Although it IS weird how did that happen by itself, as I haven’t edited the forms/pages in a long time…
You have updated the TXP install. Well, that is the reason. The new parser is more strict. The errors have most likely always been there, silently waiting for the day ;)
Boby Dimitrov wrote:
First one is repeated for every comment:
The <txp:message />
tag is deprecated. Replace it with <txp:comment_message />
Boby Dimitrov wrote:
And the other is complex and obviously related to a plugin, but I’ll be grateful if any advice is offered:
It’s really old plugin with some errorsishes. You could try to fix it by adding those undefined variables as attributes to the tag:
<txp:spc_section_alias namethis="" titlethis="" id=""
Edit. jsoo faster with the comment_message thingy.
Last edited by Gocom (2009-06-05 13:18:52)
Offline
Re: Strange form problem - part of the page not parsing/rendering
Or, if the plugin is producing the output you want, you could ignore the “undefined variable” notices (notices not being in the same class as errors/warnings).
Code is topiary
Offline
Re: Strange form problem - part of the page not parsing/rendering
Oh, I see… Thanks a lot! I’ve replaced the :message with :comment_message and that sorted the error.
Regarding spc_section_alias – I’ve searched and searched and couldn’t find an alternative, something more recent (that one being currently unsupported). Would you happen to know anything suitable? I’ll ignore the notices until I find something to replace the plugin.
ps: Just when I thought everything went back to normal, out popped some mysql errors when I put the blog in Testing mode:
Tag error: <txp:comments_form /> -> Textpattern Warning: MySQL server has gone away
select ip from txp_txp_discuss_ipban where `ip` = '(my ip)' limit 1 on line 82
Tag error: <txp:comments_form /> -> Textpattern Warning: MySQL server has gone away
select Form from txp_txp_form where `name` = 'comment_form' limit 1 on line 82
Tag error: <txp:output_form form="footer" /> -> Textpattern Warning: MySQL server has gone away
select Form from txp_txp_form as txp_form where name='footer' on line 82
Tag error: <txp:output_form form="footer" /> -> Textpattern Notice: Form not found: footer on line 1517
Seems like that might have been the original reason for the problem? As this looks like a server side problem, it could explain why the comment field and footer disappeared and are not showing when this error is present…
Last edited by Boby Dimitrov (2009-06-05 13:53:28)
Offline
Re: Strange form problem - part of the page not parsing/rendering
No, but what aspects of it are you using? In general, Txp has picked up a lot of section-related functionality over the years.
Code is topiary
Offline
Re: Strange form problem - part of the page not parsing/rendering
I’m using it to define custom title, short and long descriptions of each site section. For example, I have a “mind” named section that has a corresponding URL of domain.com/mind/ and shows all posts in that section. For it, I’ve defined a title of (translated) “What’s in my head” and a description of “A collection of random thoughts, personal opinions, rants, etc…”. The title and description show at the top of the category page (domain.com/mind/) and the title is used as a link text in the navigation.
Offline
Re: Strange form problem - part of the page not parsing/rendering
I think you could do all this without a plugin. <txp:section />
takes a title
attribute to display the section title (as distinct from its name). The descriptions you could hard code into an if_category
block, perhaps.
Code is topiary
Offline
Re: Strange form problem - part of the page not parsing/rendering
The problem seems to be different (not tag structure errors): http://forum.textpattern.com/viewtopic.php?id=30943
Offline