Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-21 23:05:22

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Using related_articles call meshes comments adding and output

Site’s article with id="86"uromax.ru

Just try to preview comment – you will see, that articles title will change, but url stays previous:

  1. Look at last random articles title (rounded by red), add some words…
  2. preview comment…

    The same title as in #1!

My default form, which is used to output articles:

<txp:if_article_list>
...no matter...
<txp:else /> 

<div class="article">
	<h1>
		<txp:title />
		<txp:rss_article_edit>*</txp:rss_article_edit>
	</h1>	

	<txp:body />

</div>

	<!-- Output related articles in table  -->
	<txp:if_article_id id="86"> <!-- conditional is used for debugging this strange bug -->
		<txp:output_form form="call_box_related_articles" />
	</txp:if_article_id>

	<div class="comments">
		<txp:comments_invite wraptag="p" />
	</div>

</txp:if_article_list>

form call_box_related_articles:

<txp:if_individual_article>
<div class="article">
<h2>Похожие статьи:</h2>
<table id="related-articles">
<tr>
	<txp:rss_uc_related section="*"
		sortdir=""
		sortby="rand()"
		form="related_articles_box"
		limit="4" />
</tr>
</table>
</div>	
</txp:if_individual_article>

form related_articles_box:

<td class="box-of-4" onclick="javascript:location.href='<txp:permlink />'">
	<div class="box-title">
		<txp:permlink title="Открыть статью"><txp:title /></txp:permlink><br />
	</div>
	<div class="box-preview">
		<txp:rss_auto_excerpt overrideexcerpt="1" striptags="1" words="15" showlinkwithexcerpt="1" linkwraptag="span" linktext="Открыть полностью &rarr;"/>
	</div>
</td>

BUT!

If i hide <txp:output_form form="call_box_related_articles" /> comments work nice :) Try any other article – it works good.

Result of this bug:

  1. Comment is adding to last “random” article from call_box_related_articles form
  2. If last “random” article from call_box_related_articles form has comment – it’s shown, instead inspite of has current individual article commetns or not

P.S. tagtrace and status debug are currently switched on


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2008-04-22 05:38:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Using related_articles call meshes comments adding and output

What you’re using is a plugin. If you use the standard related_articles tag, does the problem still exist?

Offline

#3 2008-04-22 05:55:17

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Using related_articles call meshes comments adding and output

Mary – you can see, that i’m using rss_unlimited categories, because i use more than 2 categories per article

I assigned equal categores to some articles and tried to use related_articles – it works good.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

Board footer

Powered by FluxBB