Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Subscriptions plugin: SQL error when topic has an apostrophe
Avatar
Natalya Murphy
Member
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2012 - 7:25 am

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')

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2012 - 10:07 am

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

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2012 - 11:15 am

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

Avatar
Natalya Murphy
Member
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2012 - 1:43 pm

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.

 

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2012 - 1:57 pm

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

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625