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

Trying to resize the image in the comments
Hey everyone, Basically I am trying to make the images in the comments smalle...
9 Replies
Posted on Wednesday, 12 August 2009
J5 compatibility for Hotspots
Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
2 Replies
Posted on Monday, 24 February 2025
  • #Hotspots
  • #hotspots Joomla 5
error message when adding/cofiguring email address
When configuring the email plugin that send a email message to admin when a new ...
0 Replies
Posted on Friday, 09 May 2025
CMigrator: Path from Drupal 6 to J5?
(Category s/b CMigrator, but didn't see it on the list) I'm interested in usi...
0 Replies
Posted on Monday, 28 April 2025
Dowload all Hotspots entries
Hi there, I'm looking for a way to dowload all the Hotspots entries. I've got t...
0 Replies
Posted on Sunday, 06 April 2025
  • #kml
  • #download