"headlines_count_obj is undefined"

Support, bug reports, etc. go here.

"headlines_count_obj is undefined"

Postby fox on Wed Jan 27, 2010 11:58

Alright, I'm getting tired of repeating myself, so I'm creating this thread. Any questions about this specific error should go here. Please don't create bugtracker tickets or other forum threads on the subject before you have read and understood this information since they are going to get locked.

To reiterate, this topic is about this error:

headlines_count_obj.png
headlines_count_obj.png (69.47 KiB) Viewed 261 times


Q: What does this error mean?

A: In the nutshell, it means that for some reason tt-rss frontend (the client-side part) couldn't parse the XML object returned by the backend (the server-side part) on the request to load feed headlines.

Q: Why does this error get special treatment?

A: Because I'm tired of explaining how to debug it. Also, loading headlines is one of the most common and, unfortunately, error-prone operations in tt-rss.

Q: So, why does this happen?

A: This could be caused by a variety of reasons. Three most probable are: 1) Server-side problem; 2) Client-side problem; 3) Bug in tt-rss.

1) Server-side problem. Basically, this means that something on the server prevents tt-rss from working properly. This could be caused by wrong settings in tt-rss' config.php, some PHP modules missing, incompatible PHP built options, or something else entirely. We'll get back to debugging this later. I'd like to notice that people seem to go to frightening lengths to break tt-rss. For example, recently I had a "bug report" from a guy who didn't copy all the new files when upgrading to the new version. One would think this sort of thing would be obvious, but alas.

2) Client-side problem. This means your browser. For example, some browser extensions prevents xml-http requests tt-rss makes from completing normally (Hello, Firebug!) or just plainly fucks with the Javascript code (Hello again, Firebug!). Maybe you got cookies disabled because you are afraid of aliens conspiring against you through delicious cookies. To debug this, try loading tt-rss in a blank browser profile and/or browser safe mode of some sort without extensions and plugins.

3) A bug in tt-rss. Usually this causes a server-side problem, so the steps to debug this are the same as 1).

Q: How do I debug a potential server-side problem?

A: Easy. First of all, figure out which feed can't get loaded. That should be written in the error message near the top of the Additional information box. In the attached screenshot, this is feed -3 (Fresh articles).

Then, try loading the feed in the browser (preferably, Firefox) manually, like this:

Code: Select all
http://yourhost.org/path/to/tt-rss/backend.php?op=viewfeed&feed=-3


Then you should see whether the XML received is actually there and valid. If it is valid, then you are experiencing a client-side problem. Most probably, it won't be, so you'll see something like this:

xml_invalid.png
xml_invalid.png (30.01 KiB) Viewed 261 times


Then, you figure out what exactly is broken. You can view source and go manually checking tags, you can try saving the file and loading it in some sort of XML parsing program, or you can just scroll right:

xml_invalid_2.png
xml_invalid_2.png (7.59 KiB) Viewed 261 times


Oh look, what's that "ONOZ <" doing in there? It really shouldn't be there. That's not valid XML, is it? Turns out, I have added this to backend.php to make all the pretty screenshots:

bad_code.png
bad_code.png (19.2 KiB) Viewed 261 times


Let'remove this line and reload the feed:

valid_xml.png
valid_xml.png (54.71 KiB) Viewed 264 times


Well, looks like it's valid now.

This was, naturally, just an example. Usually you will see some sort of SQL query error, parse error, or some other sort of error in the broken XML. Do accordingly or, if you don't know what to do, post your error in this thread and we'll help you figure it out.
User avatar
fox
Site Admin
 
Posts: 1204
Joined: Sat Aug 27, 2005 21:53
Location: Saint-Petersburg, Russia

Re: "headlines_count_obj is undefined"

Postby phq on Tue Apr 20, 2010 13:36

My solution to this problem was to look through my feeds in the settings page and manually edit every feed with invalid characters in their title names.

It might have been initiated by a faulty feed and then after the feed was fixed, the broken name stayed in the local database.

Now it works again :D
phq
 
Posts: 2
Joined: Sat Apr 25, 2009 14:51

Re: "headlines_count_obj is undefined"

Postby AdamW on Mon Jul 19, 2010 21:25

I've just started getting errors of this type in my local tt-rss install. I haven't changed anything manually server or client-side, but it's possible some update that got installed on either side is affecting something (server runs Mandriva Linux 2010 Spring, client is Fedora).

The error I get is a MySQL error:

LIMIT 300 OFFSET 0</i> failed: Incorrect key file for table '/var/tmp/#sql_79dc_0.MYI'; try to repair it

I've tried doing a repair table foobar; in mysql on each table mentioned in the full error output (ttrss_user_entries , ttrss_entries , ttrss_feeds) but that didn't seem to help. The filename listed in the error does not actually exist, so I can't do anything to that.

Any ideas? This affects about half of my feeds, including All Articles but not Fresh Articles.
AdamW
 
Posts: 2
Joined: Mon Jul 19, 2010 21:18

Re: "headlines_count_obj is undefined"

Postby AdamW on Mon Jul 19, 2010 21:31

Hah. Never mind. i think I figured this out. Lesson The First: in case of inexplicably weird errors in previously perfectly-working processes, always remember to check available disk space. =) Server's disk is full.
AdamW
 
Posts: 2
Joined: Mon Jul 19, 2010 21:18


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron