Results 1 to 7 of 7

Thread: Undefined index on posting blank comment

  1. #1
    Senior Member
    Join Date
    Sep 2009
    Posts
    429
    Thanks
    159
    Thanked 54 Times in 41 Posts

    Default Undefined index on posting blank comment

    This happens when I do not enter anything on the comments box and click the Submit button. Strangely, the opposite happens to a some users. The members get this error when they do the opposite i.e. try to post a comment on a story.

    Notice: Undefined index: exceeded_daily_limit in <serverpath>/html/content/plugins/comments/comments.php on line 281

    Notice: Undefined index: exceeded_url_limit in <serverpath>/html/content/plugins/comments/comments.php on line 283

    Notice: Undefined index: not_enough_comments in <serverpath>/html/content/plugins/comments/comments.php on line 285

    Warning: Cannot modify header information - headers already sent by (output started at <serverpath>/html/content/plugins/comments/comments.php:281) in <serverpath>/html/content/plugins/comments/comments.php on line 305
    Site link -> here

    Hotaru version: 1.2

    List of installed plugins:

    Last edited by nothingman; 06-01-2010 at 12:11 PM.

  2. #2
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,858
    Blog Entries
    88
    Thanks
    482
    Thanked 806 Times in 526 Posts

    Default

    Try replacing that block with this:

    PHP Code:
    if (isset($result['exceeded_daily_limit']) && $result['exceeded_daily_limit']) {
                    
    $h->messages[$h->lang['comment_moderation_exceeded_daily_limit']] = 'green';
                } elseif (isset(
    $result['exceeded_url_limit']) && $result['exceeded_url_limit']) {
                    
    $h->messages[$h->lang['comment_moderation_exceeded_url_limit']] = 'green';
                } elseif (isset(
    $result['not_enough_comments']) && $result['not_enough_comments']) {
                    
    $h->messages[$h->lang['comment_moderation_not_enough_comments']] = 'green';
                } 
    If it works, I'll include it in the next version.

    P.S. In future, could you paste your plugin list from your system report instead of posting a screenshot, thanks.

  3. Thanked by:


  4. #3
    Senior Member
    Join Date
    Sep 2009
    Posts
    429
    Thanks
    159
    Thanked 54 Times in 41 Posts

    Default

    Thanks Nick, I'm not getting the error anymore. BUT, for users who were getting the above error don't get the error message BUT their comment doesn't show up.

    Quote Originally Posted by Nick View Post
    P.S. In future, could you paste your plugin list from your system report instead of posting a screenshot, thanks.
    Sure thing - sorry about that.

  5. #4
    Senior Member
    Join Date
    Sep 2009
    Posts
    429
    Thanks
    159
    Thanked 54 Times in 41 Posts

    Default

    Quote Originally Posted by nothingman View Post
    for users who were getting the above error don't get the error message BUT their comment doesn't show up.
    *BUMP*...anyone?

  6. #5
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,858
    Blog Entries
    88
    Thanks
    482
    Thanked 806 Times in 526 Posts

    Default

    Can you duplicate the problem yourself? If not, find out the roles and permissions of the users having the problem, the number of comments they've previously had approved, the frequency which they are posting comments at, whether they are posting or editing comments.... and check them against your own comments settings. Make a new user for yourself with the same role, permissions, etc. and try to duplicate the problem. Once you are able to repeat the problem, tell us the conditions necessary for us to duplicate it and then we'll fix it.

  7. #6
    Senior Member
    Join Date
    Sep 2009
    Posts
    429
    Thanks
    159
    Thanked 54 Times in 41 Posts

    Default

    As an admin I'm unable to duplicate the problem (i.e I can post comments). I tried logging in with this users' username/password but couldn't post any comments at all.

    I believe it has to do with the Permissions of the user but the radio boxes on the Permissions and Settings page for my site don't show up except for the Update button - this happened after upgrading to 1.2 and I had wanted to post this issue for a some time - my fault, always deferred it for a later time, so sorry about that.

    Settings Page



    Permissions Page


  8. #7
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,858
    Blog Entries
    88
    Thanks
    482
    Thanked 806 Times in 526 Posts

    Default

    That is most likely because of missing database rows. You had this same problem before:
    http://hotarucms.org/showthread.php?...-Update-button

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Before Posting, PLEASE READ THIS FIRST!!!
    By Nick in forum How-To and Troubleshooting
    Replies: 0
    Last Post: 03-25-2010, 03:04 PM
  2. Users are Unable to Edit 'Source URL' when posting video links
    By nothingman in forum How-To and Troubleshooting
    Replies: 2
    Last Post: 03-14-2010, 11:44 AM
  3. Installation page - Step 4 is blank
    By phirex in forum Installation and Upgrading
    Replies: 8
    Last Post: 03-02-2010, 07:48 PM
  4. undefined method error when deleting a comment from the admin page
    By nothingman in forum How-To and Troubleshooting
    Replies: 2
    Last Post: 01-28-2010, 08:39 AM
  5. Undefined index error on the header after upgrading to 1.0.3
    By nothingman in forum How-To and Troubleshooting
    Replies: 1
    Last Post: 01-20-2010, 11:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •