Support » Plugin: CommentPress Core » AJAX Error when commenting on academic servers

  • Plugin Author Christian Wach

    (@needle)


    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/

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

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

    Plugin Author Christian Wach

    (@needle)

    ALTER

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

    Plugin Author Christian Wach

    (@needle)

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

    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.

    Plugin Author Christian Wach

    (@needle)

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

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

    Plugin Author Christian Wach

    (@needle)

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

    Plugin Author Christian Wach

    (@needle)

    @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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘AJAX Error when commenting on academic servers’ is closed to new replies.