Welcome! Please Login or Register!
April 24, 2024, 09:57:35 PM
Home Login Register
pftq Forums  |  Software and Scripts  |  SMF Mods and Add-Ons  |  SQL error on install of both mailing list mod and notify mod 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] Print
Author Topic: SQL error on install of both mailing list mod and notify mod  (Read 1580 times)
rayarachelian
Member
*****
Offline Offline

Posts: 2

« on: March 23, 2019, 09:16:24 AM »

Hi, I've got SMF 2.0.15 setup and would like to use the mailing list mod and see that the notify mod should go with it.

However, when I attempt to install either of these two mods, I get a similar error on the ignore:

From mailing list mod:
ERROR: syntax error at or near "IGNORE"
LINE 1: INSERT IGNORE INTO smf_settings (variable, value) values('ma...
^
File: /var/www/html/Packages/temp/mailinglist_smf2/emailpost_setup.php
Line: 21


From notify:

Database Error
ERROR: syntax error at or near "IGNORE"
LINE 1: INSERT IGNORE INTO smf_notifygroup (id_group, id_topic, id_b...
^
File: /var/www/html/Packages/temp/notifygroup_setup.php
Line: 3

I'm using SMF with Postgresql 11, so perhaps that might be an issue. Any suggestions?

Thanks.
Logged
rayarachelian
Member
*****
Offline Offline

Posts: 2

« Reply #1 on: March 23, 2019, 04:40:49 PM »

So looks like this worked: I replaced all the lines that have "INSERT IGNORE" in both mods with "INSERT ... ON CONFLICT DO NOTHING"

I then ran into issues with SMF not recognizing the new zip files created from Ubuntu 18.04, not sure why, possibly because php zip class isn't fully compatible with the newest zip packages - it created a bunch of zero byte files inside of html/Packages/temp and threw an error, but using tar.gz instead worked.

Both packages are installed on my forum, though I need to test functionality. So if anyone runs into the same issue, I'd suggest trying doing that.

Might be best to have some more code around that detects what the SQL engine is and sends the right commands, but I'll leave that as an exercise for the reader. (That's code for I'm too lazy to do it myself  Grin )

Here's the code for both: https://github.com/rayarachelian/smf_mailinglist_notifygroups_pgsql
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #2 on: March 24, 2019, 12:49:04 PM »

Thanks for the update.
Logged
Pages: [1] Print 
pftq Forums  |  Software and Scripts  |  SMF Mods and Add-Ons  |  SQL error on install of both mailing list mod and notify mod « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.104 seconds with 21 queries.