Posted on: 11/23/03 05:58pm
By: amckay
Hey folks,
I just (finally) upgrade to the latest 1.3.8 from 1.3.7, and my plugins do not work quite right. When you view comments it only shows the comment title but not the body. When you hit "refresh" is switches from /myplugin/index.php?myView to /article.php and displays correctly.
Checking my code, I call : COM_userComments and this seems to be where it is broken.
Pointers?
Re:my plugin (comments) broke after upgrade
Posted on: 11/23/03 06:32pm
By: amckay
Hmmm, and it only seems to be one of my plugins. The other seems to be just fine ...
Re:my plugin (comments) broke after upgrade
Posted on: 11/23/03 06:51pm
By: amckay
Is it normal for COM_comment to have 2 parameters both called "mode"?
Anyway, in lib-common.php at line 2902 I insert a debugging statement to echo A['comment'] and it is indeed empty before hitting 'refresh' and set afterwards.
Strange...
Re:my plugin (comments) broke after upgrade
Posted on: 11/23/03 07:01pm
By: amckay
Looks like the preg_replace in COM_comment is wiping out my comment. The first echo here before that code segment echos the comment, while the echo statement just below it is empty.
echo "[" . $A['comment'] . "]";
if( !empty( $query ))
{
$mywords = explode( ' ', $query );
foreach( $mywords as $searchword )
{
$A['comment'] = preg_replace( "/(>(((?>[^><]+)|(?R))*)</ie", "preg_replace('/(?>$searc
hword+)/i','<span class="highlight">$searchword</span>','')", "<x>" . $A['comment'] . "<x>" );
}
}
echo "[" . $A['comment'] . "]";