I'm getting the following type of event pretty regularly in my log:
E_WARNING (2) include/rssfuncs.php:1007 Invalid argument supplied for foreach() 9:17
E_WARNING (2) include/rssfuncs.php:1375 Invalid argument supplied for foreach() 9:17
E_USER_ERROR (256) classes/db/pgsql.php:46 Query INSERT INTO ttrss_entries (title, guid, link, updated, content, content_hash, no_orig_date, date_updated, date_entered, comments, num_comments, plugin_data, lang, author) VALUES ('2013-11-12 16:11:35', 'SHA1:cebc80d1294aab1a70420dc2bf077abe4898e8a7', 'https://www.google.com/url?q=http://www.rafflecopter.com/rafl/display/a0730f5/&ct=ga&cd=&cad=CAI&usg=AFQjCNGctwXFN2bvnDmDK_vF7QzrennPtQ', '2013/11/12 16:11:35', '', 'SHA1:da39a3ee5e6b4b0d3255bfef95601890afd80709', false, NOW(), '2013-11-13 14:17', '', '0', '', 'Array', '') failed: ERROR: value too long for type character varying(2) 9:17
near as I can tell, the only character varying(2) in ttrss_entries is the last field in the table, lang. Based on this SQL call though, it is trying to stuff "Array" into lang, which will naturally fail. Is there a problem in how this INSERT was formatted, that it's trying to put "Array" into the lang column of ttrss_entries?
[trunk] pgsql: ERROR: value too long for type character
-
- Bear Rating Trainee
- Posts: 22
- Joined: 15 Jun 2013, 16:43
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [trunk] pgsql: ERROR: value too long for type character
"Hello something happens with this feed but I'm not going to post the feed URL"
-
- Bear Rating Trainee
- Posts: 22
- Joined: 15 Jun 2013, 16:43
Re: [trunk] pgsql: ERROR: value too long for type character
I don't know which one of the feeds it is.. I can run updates through console and suss out the offending feed.
-
- Bear Rating Trainee
- Posts: 22
- Joined: 15 Jun 2013, 16:43
Re: [trunk] pgsql: ERROR: value too long for type character
http://www.google.com/alerts/feeds/0794 ... 8801171827 is the feed. Contents below:
event log follows:
E_WARNING (2) include/rssfuncs.php:1020 Invalid argument supplied for foreach() 10:16
E_WARNING (2) include/rssfuncs.php:1388 Invalid argument supplied for foreach() 10:16
E_USER_ERROR (256) classes/db/pgsql.php:46 Query INSERT INTO ttrss_entries (title, guid, link, updated, content, content_hash, no_orig_date, date_updated, date_entered, comments, num_comments, plugin_data, lang, author) VALUES ('2013-11-12 12:09:11', 'SHA1:09b5f338bae1024d3b73c4b6b1f8b3983492697e', 'https://www.google.com/url?q=http://www.rafflecopter.com/rafl/display/0937d1113/&ct=ga&cd=&cad=CAI&usg=AFQjCNGxxt2_XAI5SLXJ2XDzeShVhcyl4g', '2013/11/12 12:09:11', '', 'SHA1:da39a3ee5e6b4b0d3255bfef95601890afd80709', false, NOW(), '2013-11-13 15:16', '', '0', '', 'Array', '') failed: ERROR: value too long for type character varying(2) 10:16
Code: Select all
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:idx="urn:atom-extension:indexing">
<id>
tag:google.com,2005:reader/user/07949102769975590568/state/com.google/alerts/6600137508801171827
</id>
<title>
Google Alert - http://www.rafflecopter.com/rafl/display/
</title>
<link href="http://www.google.com/alerts/feeds/07949102769975590568/6600137508801171827" rel="self"/>
<updated>2013-11-12T12:09:11Z</updated>
<entry>
<id>
tag:google.com,2013:googlealerts/feed:13437766075172695266
</id>
<title type="html"/>
<link href="https://www.google.com/url?q=http://www.rafflecopter.com/rafl/display/0937d1113/&ct=ga&cd=&cad=CAI&usg=AFQjCNGxxt2_XAI5SLXJ2XDzeShVhcyl4g"/>
<published>2013-11-12T12:09:11Z</published>
<updated>2013-11-12T12:09:11Z</updated>
<content type="html"/>
<author/>
</entry>
</feed>
event log follows:
E_WARNING (2) include/rssfuncs.php:1020 Invalid argument supplied for foreach() 10:16
E_WARNING (2) include/rssfuncs.php:1388 Invalid argument supplied for foreach() 10:16
E_USER_ERROR (256) classes/db/pgsql.php:46 Query INSERT INTO ttrss_entries (title, guid, link, updated, content, content_hash, no_orig_date, date_updated, date_entered, comments, num_comments, plugin_data, lang, author) VALUES ('2013-11-12 12:09:11', 'SHA1:09b5f338bae1024d3b73c4b6b1f8b3983492697e', 'https://www.google.com/url?q=http://www.rafflecopter.com/rafl/display/0937d1113/&ct=ga&cd=&cad=CAI&usg=AFQjCNGxxt2_XAI5SLXJ2XDzeShVhcyl4g', '2013/11/12 12:09:11', '', 'SHA1:da39a3ee5e6b4b0d3255bfef95601890afd80709', false, NOW(), '2013-11-13 15:16', '', '0', '', 'Array', '') failed: ERROR: value too long for type character varying(2) 10:16
-
- Bear Rating Master
- Posts: 109
- Joined: 11 Apr 2013, 17:45
Re: [trunk] pgsql: ERROR: value too long for type character
Looks like the problem is the link URL
Why is it using that long ass URL when a much shorter one could be used?
https: //www.google. com/url?q=http://www.rafflecopter.com/rafl/display/0937d1113/&ct=ga&cd=&cad=CAI&usg=AFQjCNGxxt2_XAI5SLXJ2XDzeShVhcyl4g
could be
http: //www.rafflecopter. com/rafl/display/0937d1113/
Why is it using that long ass URL when a much shorter one could be used?
https: //www.google. com/url?q=http://www.rafflecopter.com/rafl/display/0937d1113/&ct=ga&cd=&cad=CAI&usg=AFQjCNGxxt2_XAI5SLXJ2XDzeShVhcyl4g
could be
http: //www.rafflecopter. com/rafl/display/0937d1113/
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [trunk] pgsql: ERROR: value too long for type character
op, the feed url above shows 0 articles for me. Maybe you could save the XML and rehost it somewhere.
-
- Bear Rating Trainee
- Posts: 22
- Joined: 15 Jun 2013, 16:43
Re: [trunk] pgsql: ERROR: value too long for type character
Firefox showed nothing to me either, which was why I viewed in chrome and pasted code in my previous post. The code segment in my previous post was the xml output of the feed.
I can't really control the feed contents. It's a google alert feed for a search of "http://www.rafflecopter.com/rafl/display/". The reason for the longass url is because google's wrapping it with an "are you sure you want to go here, and aren't getting duped by some spammer besmirching our good name" clickthrough. That's a good idea though, doing URL analysis and rewriting it before dumping into ttrss_entries. doing a regex on the google.com/url?q= would let me suck the URL straight out in a plugin.
I can't really control the feed contents. It's a google alert feed for a search of "http://www.rafflecopter.com/rafl/display/". The reason for the longass url is because google's wrapping it with an "are you sure you want to go here, and aren't getting duped by some spammer besmirching our good name" clickthrough. That's a good idea though, doing URL analysis and rewriting it before dumping into ttrss_entries. doing a regex on the google.com/url?q= would let me suck the URL straight out in a plugin.
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [trunk] pgsql: ERROR: value too long for type character
Well the XML you posted is invalid (which is no surprise, anything google does related to rss is again and again shown to be terrible shit), so I'm not sure what else is there to discuss. It doesn't parse with a fatal error which is working as designed.
I was interested why the library which does language detection goes crazy on it, but in all honesty it's not interesting enough to deal with yet another abortion of incompetent google engineers, so I'll just add a workaround and we'll leave it at that.
I was interested why the library which does language detection goes crazy on it, but in all honesty it's not interesting enough to deal with yet another abortion of incompetent google engineers, so I'll just add a workaround and we'll leave it at that.
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [trunk] pgsql: ERROR: value too long for type character
Like I said, neither google terrible shit rss nor possible idiosyncrasies of language detect libraries are particularly compelling to investigate, I hope this helps:
https://github.com/gothfox/Tiny-Tiny-RS ... f005735f56
e: I have no idea how that Array would actually appear there since there's a substr() but PHP is really bad too so I'm sure there's some unconventional idiocy there I'm not aware of.
e2: I tried to replicate this by stuffing some random crap into languagedetect responses and it works like it should. Are you sure your php is not fucked somehow strange? Do the feed debugging thing on that feed (f D) apply this first:
https://github.com/gothfox/Tiny-Tiny-RS ... f005735f56
e: I have no idea how that Array would actually appear there since there's a substr() but PHP is really bad too so I'm sure there's some unconventional idiocy there I'm not aware of.
e2: I tried to replicate this by stuffing some random crap into languagedetect responses and it works like it should. Are you sure your php is not fucked somehow strange? Do the feed debugging thing on that feed (f D) apply this first:
Code: Select all
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 43d931f..2167ec1 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -607,6 +607,7 @@
$entry_language = db_escape_string(substr($entry_language[0], 0, 2));
_debug("detected language: $entry_language", $debug_enabled);
+ if ($debug_enabled) print_r($entry_language);
}
}
Who is online
Users browsing this forum: No registered users and 9 guests