fox
66
preferences - system - open log and looks for an actual SQL error which precedes this one
e: i’m 90% sure it’s a misbehaving plugin
Yogi43
67
Many thanks, you were right. It was caused by the plugin 'api_newsplus` I added some years ago.
Yogi43
68
Unfortunately now I’m getting a new error:
Uncaught exception ‘PDOException’ with message ‘There is no active transaction’ in /var/www/html/tt-rss/classes/rssutils.php:1159 Stack trace: #0 /var/www/html/tt-rss/classes/rssutils.php(1159): PDO->commit() #1 /var/www/html/tt-rss/classes/rssutils.php(185): RSSUtils::update_rss_feed(‘16’, true, false) #2 /var/www/html/tt-rss/update.php(168): RSSUtils::update_daemon_common() #3 {main} thrown
PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ttrss.ttrss_tags, CONSTRAINT ttrss_tags_ibfk_1 FOREIGN KEY (post_int_id) REFERENCES ttrss_user_entries (int_id) ON DELETE CASCADE)
Is an update of the DB sheme required for the new version ? In contrast to other updates I didn’t see any.
fox
69
if this happens sometimes this could mean you run into concurrent feed updates, if its all the time then idk, could be a bug with tag inserting logic, could be something else
e: i’m yet to run into this problem on my instances but this has been reported before and its not pdo related
Yogi43
70
Ok, and what can I do to solve the problem? I tried to delete all feeds and to create them again. But the same error appears again.
fox
71
try reading what i have wrote to you above
Hello, sorry if my question is stupid 
I just did update and error log is flooded with this message.
E_USER_NOTICE (1024) classes/db.php:22 Legacy connect requested to pgsql
1. classes/db.php(22): user_error(Legacy connect requested to pgsql, 1024)
2. classes/db.php(89): legacy_connect()
3. classes/pluginhost.php(93): get()
4. plugins/api_newsplus/init.php(36): get_dbh()
5. classes/pluginhost.php(207): init([PluginHost])
6. include/functions.php(1948): load(auth_internal, note, updater, api_newsplus, 1)
7. backend.php(51): init_plugins()
E_USER_NOTICE (1024) classes/db.php:22 Legacy connect requested to pgsql
Does that mean, I should “nag” all creators of plugins I use? In my case api_newsplus? Thanks
wn_name
73
Yes, the plugins should be updated.
Yogi43
74
It is a third-party plugin - I don’t think it will be updated. I have removed it - and newsplus also works without the update.
j_d
75
When I try to update my feeds via a cron job, I get the following error:
PHP Fatal error: Uncaught PDOException: There is no active transaction in /[...]/tt-rss/classes/rssutils.php:1159
Stack trace:
#0 /[...]/tt-rss/classes/rssutils.php(1159): PDO->commit()
#1 /[...]/tt-rss/classes/rssutils.php(185): RSSUtils::update_rss_feed('67', true, false)
#2 /[...]tt-rss/update.php(168): RSSUtils::update_daemon_common()
#3 {main}
In the error log there is this additional entry:
PDOStatement::execute(): SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'NOW()' for column 'last_read' at row 1
It seems to an SQL error. My schema is already updated:
update.php --update-schema
Lock: update.lock
checking for updates (mysql)...
update not required.
I’m on commit commit 6fb5f17be69f9ff3a0e1379e64a3c7bd71ab3271 and use the following plugins:
define('PLUGINS', 'auth_internal, updater, api_newsplus');
Does anyone know how to solve this?
fox
76
post the stack trace for the NOW() error; also you will likely need to either update or remove the newsplus plugin (search the forum this has been just discussed)
e: also it’s probably this https://git.tt-rss.org/git/tt-rss/commit/d4c05d0be2c0e865d06b24d334afeeeebadcfd58
Yogi43
77
In my case it was caused by the newsplus plugin and I had to reset the database.
fox
78
yeah i need to take a look at the tags, maybe tomorrow
j_d
79
Thats all I get from the error log:
PDOStatement::execute(): SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'NOW()' for column 'last_read' at row 1
1. classes/rssutils.php(959): execute(Array)
2. classes/rssutils.php(185): update_rss_feed(67, 1, )
3. update.php(168): update_daemon_common()
I removed the newsplus plugin and now the update fetches some feeds and then stops with this error:
PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`ttdb`.`ttrss_tags`, CONSTRAINT `ttrss_tags_ibfk_1` FOREIGN KEY (`post_int_id`) REFERENCES `ttrss_user_entries` (`int_id`) ON DELETE CASCADE)
1. classes/rssutils.php(1139): execute(Array)
2. classes/rssutils.php(185): update_rss_feed(37, 1, )
3. update.php(168): update_daemon_common()
fox
80
first one should be fixed now. have you updated to latest trunk?
post feed url with the tag problems (unless it’s all feeds)
fox
81
well i did look at the tag code and i’m not sure what could be the problem there. post feed debugger logs (f D) for affected feeds.
if that would not be conclusive someone with tag errors will have to send me a database dump i’m afraid.
j_d
82
I’ve updated to the latest master and it works now
Thanks!
hrk
84
newsplus plugin author here. Since I’m not running anymore on git and I haven’t been following discourse, I am caught off-guard by the PDO switch 
@fox as I can’t (currently) switch to git, could you recommend me a way to change the plugin so that it works both pre-PDO and with PDO? FYI the plugin was basically a copy paste of the “queryFeedHeadlines” function with a tiny wrapper around. I’ll probably look at the new code for such function, so I’m more interested in the “how to make it work in both enviromments”.
(“Go screw yourself” in 3… 2… 1…)
fox
85
well for example you can check if DB::pdo is a method and choose accordingly
unless you need to change something inside it you’d be better off just calling the stock one
Yogi43
86
Are there any news about the api_newsplus plugin?