1. Jaime
  2. Bug Report
  3. Friday, 31 July 2009
  4.  Subscribe via email
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
Responses (3)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Is Ccomment still alive?
Is Ccomment still being supported? It's time for my Pro renewal but I haven't se...
0 Replies
Posted on Thursday, 14 August 2025
  • New
  • Anzeige von mehrtägigen Events auf Buchungsseite
    We have been using Matukio for quite some time now. Unfortunately, we have been ...
    3 Replies
    Posted on Sunday, 03 August 2025
    Assistance Needed – Error When Posting Comments
    Hello, I’m experiencing an issue when trying to submit a comment on my site u...
    0 Replies
    Posted on Sunday, 10 August 2025
  • New
  • Hotspots Pro 6.0.13 compatability with Joomla 5.3.
    Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
    2 Replies
    Posted on Friday, 04 July 2025
    some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025