Support Forum

Subscriptions plugin: SQL error when topic has an apostrophe

NM Natalya Murphy
Natalya Murphy
Member

Digest entries aren’t getting saved properly in the digest table when the topic title has an apostrophe in it. 

Installed versions:

  • Simple:Press 5.2
  • Subscriptions 1.2

Entries from the error log:

———————————————

file: /problem-with-post-edit-buttonome/chaohome/public_html/wp-content/sp-resources/forum-plugins/subscriptions/sp-subscriptions-plugin.php

line: 363

function: sp_subscriptions_do_digest_entry

error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s Holy Hour’, 42, ‘December 2012 Children’s Holy Hour’, 120, ‘a:7:{i:0;s:3:”294’ at line 1

INSERT INTO wp_sfdigest (forum_id, forum_name, topic_id, topic_name, post_id, subscriptions, permalink) VALUES (27, ‘Children’s Holy Hour’, 42, ‘December 2012 Children’s Holy Hour’, 120, ‘a:7:{i:0;s:3:”294″;i:1;s:2:”90″;i:2;s:2:”73″;i:3;s:2:”78″;i:4;s:3:”417″;i:5;s:3:”415″;i:6;s:2:”56″;}’, ‘http://chaohome.org/forum/childrens-holy-hour/december-2012-childrens-holy-hour/#p120’)

————————————————–

file: /problem-with-post-edit-buttonome/chaohome/public_html/wp-content/sp-resources/forum-plugins/subscriptions/sp-subscriptions-plugin.php

line: 363

function: sp_subscriptions_do_digest_entry

error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s Faith and Fellowship’, 77, ‘January 2013 Mothers’ Faith & Fellowship’, 11′ at line 1

INSERT INTO wp_sfdigest (forum_id, forum_name, topic_id, topic_name, post_id, subscriptions, permalink) VALUES (30, ‘Mother’s Faith and Fellowship’, 77, ‘January 2013 Mothers’ Faith & Fellowship’, 115, ‘a:12:{i:0;s:1:”1″;i:1;s:2:”90″;i:2;s:2:”81″;i:3;s:2:”35″;i:4;s:2:”73″;i:5;s:2:”78″;i:6;s:3:”417″;i:7;s:3:”415″;i:8;s:3:”141″;i:9;s:2:”11″;i:10;s:2:”95″;i:11;s:3:”336″;}’, ‘http://chaohome.org/forum/mothers-faith-and-fellowship/january-2013-mothers-faith-fellowship/#p115’)

4 Answers

New Answer

MP Mr Papa
Mr Papa
Member

okay, thanks for the heads up…

pushing out a core update release this morning, but will look into after that and get a plugin update out if there is an issue…

MP Mr Papa
Mr Papa
Member

Natalya, you should see a subscriptions plugin update available to correct this issue…

NM Natalya Murphy
Natalya Murphy
Member

The update fixed the SQL error but did introduce a small glitch in the digest:  the backslash delimiter is coming through in the e-mail. I tried copy/pasting the excerpt below, but this website is too smart and ignored the delimiter when I tried to post the message. 

But what’s happening is the topic text comes across in the digest with a backslash () right before the apostrophe.  Obviously not a huge deal, but I wanted to make you aware of it.

 

 

MP Mr Papa
Mr Papa
Member

argh…. sorry… what I get for testing the problem and fix… but not the whole suite… harder to test the digest emails… :(

will get this fixed up this afternoon…