Phantom feed?

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Not a robot
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Oct 2016, 13:53

Phantom feed?

Postby Not a robot » 04 Oct 2016, 14:43

Hi,

I'm using Tiny Tiny RSS v16.8 (6687cb9), MariaDB 10.0.27 on Centos 6.8.

I don't remember exactly what I did, but a while back I deleted a whole Category of feeds via the Preferences and all seemed well.

Today, I clicked on Fresh Articles (which I don't often use) and noticed a post / article from one of the feeds that should have been deleted. Clicking on the post works, brings up all of the posts in that feed, but the feed name doesn't appear in the list in the left hand side.

An OPML export doesn't list the phantom feed.

I can hack the database to fix this, but have I found a bug, or did I do something stupid? If the latter, I'll take probation...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Phantom feed?

Postby fox » 04 Oct 2016, 15:13

when you delete the category feeds are placed into uncategorized (your database does this using an on delete trigger)

unless you managed to run on myisam which would mean you're pretty much screwed

e:

Code: Select all

select table_name, engine from information_schema.tables where table_schema = 'your_ttrss_db' and engine != 'InnoDB';

Not a robot
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Oct 2016, 13:53

Re: Phantom feed?

Postby Not a robot » 04 Oct 2016, 15:31

Hmm, I actually have 2 Uncategorized categories (I forget why), neither contain the feed. Although, wouldn't the feed still show on an OPML export?

All Innodb here, so no worries there.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Phantom feed?

Postby fox » 04 Oct 2016, 16:23

it won't show if it doesn't have a valid parent category (or NULL)

look for the feed in question in the ttrss_feeds database, find the value of cat_id and see where it points

also you can try deleting one of the uncategorized, if it works fine, if not your database is probably somehow borked

Not a robot
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Oct 2016, 13:53

Re: Phantom feed?

Postby Not a robot » 04 Oct 2016, 22:20

I've only got one Uncategorized listed in ttrss_feed_categories which has an id of 4. The other Uncategorized contains feeds with a cat_id of NULL, which makes sense. The problem feed and its 7 friends, all had a cat_id of 1, which isn't listed in ttrss_feed_categories, and I guess 1 was the original category name. Changing the cat_id made the feeds reappear.

So, does deleting a category hide feeds for other people, or do they correctly appear in Uncategorized, meaning that the cat_id has been changed to Null?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Phantom feed?

Postby fox » 04 Oct 2016, 22:38

since it is impossible to have an invalid cat_id in this table without violating foreign key constraints it means your database seemingly got into an inconsistent (and, for obvious reasons, no longer supported) state.

i can only recommend exporting/importing OPML and reimporting the schema, preferably on a real database server i.e. postgresql.

you can also try fixing missing foreign keys (however many there might be) but i'm not going to help you with this and am generally washing my hands of your case at this point, sorry.

>So, does deleting a category hide feeds for other people, or do they correctly appear in Uncategorized, meaning that the cat_id has been changed to Null?

this is handled by an ON DELETE SET NULL constraint in the feeds table.

Not a robot
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Oct 2016, 13:53

Re: Phantom feed?

Postby Not a robot » 05 Oct 2016, 00:05

> it means your database seemingly got into an inconsistent state
Yeah, it has been through a lot of feeds, upgrades and server moves, so it wouldn't surprise me if I broke something along the way.

Should anyone else manage to get into this state, the quick fix is to just recreate the missing category in ttrss_feed_categories and delete or move the feeds before deleting the category again. I'll check the constraints later.

> "preferably on a real database server"
I can get you a regular spot in a comedy club if you're interested?

nameless
Bear Rating Master
Bear Rating Master
Posts: 126
Joined: 28 Aug 2013, 20:33

Re: Phantom feed?

Postby nameless » 05 Oct 2016, 00:35

Not a robot wrote:
> "preferably on a real database server"
I can get you a regular spot in a comedy club if you're interested?

I would actually love see this happening.
I am willing to pay for fox roasting me, good thing is he does it for free around here on a regular basis.
This is basically the single reason I am still subscribed to the forums RSS feed.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Phantom feed?

Postby sleeper_service » 05 Oct 2016, 00:49

nameless wrote:This is basically the single reason I am still subscribed to the forums RSS feed.

there's another reason?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Phantom feed?

Postby sleeper_service » 05 Oct 2016, 00:51

Not a robot wrote:> "preferably on a real database server"
I can get you a regular spot in a comedy club if you're interested?

as much as I hate to puff up his nibs ego, he's got a point.

I started out on mysql, and after a while, bit the bullet and switched to postgres... and it does work better.

JustAMacUser
Bear Rating Overlord
Bear Rating Overlord
Posts: 373
Joined: 20 Aug 2013, 23:13

Re: Phantom feed?

Postby JustAMacUser » 05 Oct 2016, 03:50

sleeper_service wrote:I started out on mysql, and after a while, bit the bullet and switched to postgres... and it does work better.


I started out on PostgreSQL, and after a while, switched to MySQL because I needed it for another application and didn't want to run two database servers on one machine.

... and PostgreSQL does work better.

nameless
Bear Rating Master
Bear Rating Master
Posts: 126
Joined: 28 Aug 2013, 20:33

Re: Phantom feed?

Postby nameless » 05 Oct 2016, 22:38

So did I. Mysql get the job done mostly fine.
I miss postgres full text search though.
Than again I can't be bothered to maintain to database servers on one machine.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 9 guests