WordPress.org

Forums

CommentPress Core
AJAX Error when commenting on academic servers (11 posts)

  1. Christian Wach
    Member
    Plugin Author

    Posted 1 year ago #

    This seems to be something that crops up from time to time and relates to the AJAX Error issue encountered by @sico7 and @MrJKConnor on this support question. I should have updated the thread with the results of what I discovered on the system that @sico7 is running under, but just as I was about to hit reply, the topic was closed by the remarkably vigilant moderator!

    Anyway, it appears that on some hosts (academic ones, for example) where WordPress is not given sufficient privileges to modify the database structure, CommentPress is not able to add a 'comment_signature' column to the comments table of the site it is being activated on. Therefore comments left on paragraphs are never associated with them. One of the symptoms of this is that the AJAX error they report is triggered.

    If this describe the symptoms you're seeing and you're using CommentPress on an academic system, it's likely you will need to talk to your server admin(s) to see what can be done. If there is indeed no 'comment_signature' column, they will have to add one manually. The following should be enough:

    ALTER TABLE '$wpdb->comments' ADD 'comment_signature' VARCHAR(255) NULL;

    Where $wpdb->comments is the full name of the comments table on your site.

    https://wordpress.org/plugins/commentpress-core/

  2. MrJKConnor
    Member
    Posted 1 year ago #

    Thanks for this, sorry about posting it in the wrong place. I fortunately have admin for the virtual machine so I will do this and report back.

  3. MrJKConnor
    Member
    Posted 1 year ago #

    If I were to change the privileges for the SQL database user rather than add in the column, what would the user need?

  4. Christian Wach
    Member
    Plugin Author

    Posted 1 year ago #

    ALTER

  5. MrJKConnor
    Member
    Posted 1 year ago #

    You are a star, thank you for a swift, correct and to the point reply!

  6. Christian Wach
    Member
    Plugin Author

    Posted 1 year ago #

    Glad it's working for you now. I'll leave this open for the time being in case others have anything new to contribute.

  7. MrJKConnor
    Member
    Posted 9 months ago #

    This has worked well for everyone other than one person using a Mac. Is there any reason why a Mac user might get the error :

    "TypeError: Cannot read property 'toString' of undefined"

    whilst commenting when commenting works fine for windows users (and android users actually).

    Thanks for any further help you can offer.

  8. Christian Wach
    Member
    Plugin Author

    Posted 9 months ago #

    @MrJKConnor, that is curious. Without seeing this in action, I can't really offer any guidance, I'm afraid.

  9. yale_itg
    Member
    Posted 9 months ago #

    We're running a multisite instance of WordPress. Will the ALTER need to be done every time a new CommentPress site is set up?

  10. Christian Wach
    Member
    Plugin Author

    Posted 9 months ago #

    @yale_itg, no - only in cases where WordPress is not given sufficient privileges to modify the database structure.

  11. Christian Wach
    Member
    Plugin Author

    Posted 8 months ago #

    @MrJKConnor, there's another support thread which alerted me to the fact that the AJAX error appeared when a comment was marked as spam. This is resolved (as far as I can tell) in version 3.6 of CommentPress and may solve the issue for the Mac user you mention.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CommentPress Core
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.