Hello....
when the posts need to be approved by an administrator, no messages appear because published is 0. This fact causes posting to fail with this error appearing in the text area:
<br />
<b>Notice</b>: Undefined index: id in <b>F:Web SitesPHPHagaloUstedMismoWebcomponentscom_commentjoscommentcomment.class.php</b> on line <b>1205</b><br />
<?xml version="1.0" standalone="yes"?><post><id></id><published></published><noerror>1</noerror><debug></debug><captcha><![CDATA[<a title="clic para recargar una nueva imagen" href='javascript:JOSC_reloadCaptcha()'><img src="http://hagaloustedmismo//components/com_comment/joscomment/captcha.php?refid=7066633b2c8559175caa7758efa61049" alt="Security Image" />
<input type="hidden" name="security_refid" value="7066633b2c8559175caa7758efa61049" /></a>]]></captcha></post>
This is due to the following code:
if ($ajax) {
$data = $this->getComments(true);
$after = -1;
/* look for the right place */
foreach($data as $item) {
if ($item['id'] == $this->_comment_id) {
$item['after'] = $after;
$item['view'] = $published;
$item['debug'] = $debug;
$item['noerror'] = 1;
return $item;
}
$after = $item['id'];
}
$data[0]['view'] = $published;
$data[0]['debug'] = $debug;
$data[0]['noerror'] = 1;
return $data[0];
} else return $published;
Since there is no comment published, $data variable is empty, so that $data[0] doesn't contain the id index.
To solve it, I added an
if sentence at line 1204 of comment.class.php:
if (isset($item['id']))
$xml .= '<id>' . $item['id'] . '</id>';
I don't know if this is the right solution, but it works
Cheers