Event Log Warning Moving Categories Around

  • [X] I’m using docker compose setup, with modifications (modified .yml files, third party plugins/themes, etc.) - if so, describe your modifications in your post. Before reporting, see if your issue can be reproduced on the unmodified setup.

I’m seeing warning messages in the System Log when I go to Feeds and move a Category with a few feeds inside another Category. It seems to do the job though, just confused about the error and if there’s something I can do. One part of the warning repeats over 9 log pages.

classes/pref/feeds.php:376
Undefined array key "CAT:24"
1. classes/pref/feeds.php(376): ttrss_error_handler(Undefined array key "CAT:24", classes/pref/feeds.php)
2. classes/pref/feeds.php(400): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., CAT:24, CAT:20)
3. classes/pref/feeds.php(400): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., CAT:20, root)
4. classes/pref/feeds.php(451): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., root)
5. backend.php(136): savefeedorder()

- - -

	Undefined array key "CAT:16"
1. classes/pref/feeds.php(376): ttrss_error_handler(Undefined array key "CAT:16", classes/pref/feeds.php)
2. classes/pref/feeds.php(400): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., CAT:16, root)
3. classes/pref/feeds.php(451): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., root)
4. backend.php(136): savefeedorder()

- - - 

Undefined array key "CAT:10"
1. classes/pref/feeds.php(376): ttrss_error_handler(Undefined array key "CAT:10", classes/pref/feeds.php)
2. classes/pref/feeds.php(400): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., CAT:10, root)
3. classes/pref/feeds.php(451): process_category_order([{"root":[{"_reference":"CAT:1"},{"_reference":"CAT:2"},{"_reference":"CAT:3"},{"_reference":"CAT:4"},{"_reference":"CAT:5"},{"_reference":"CAT:6"},{"_reference":"CAT:7"},{"_reference":"CAT:10"},{"_reference":"CAT:11"},{"_reference":"CAT:12"},{"_reference":..., root)
4. backend.php(136): savefeedorder()

- - -

classes/pref/feeds.php:439
Undefined array key "items"
1. classes/pref/feeds.php(439): ttrss_error_handler(Undefined array key "items", classes/pref/feeds.php)
2. backend.php(136): savefeedorder()

The last above then repeats over 9 event log pages.

It’s not an old installation and I used OPML to import around 100 feeds from an older installation (that was very outdates, running MySQL and not docerk etc.), maybe this could be related in some way?! No 3rd Party plugins active, unless Readability counts.

I tried to check if the issue could be replicated on your demo installation, but at glance there’s no error there, so yeah, something local I guess or as I was thinking, could it be somehow related to the settings/feeds having imported or is that unlikely?

  • Tiny Tiny RSS version (including git commit id): v22.09-d47b8c8
  • Platform (i.e. Linux distro, Docker, PHP, PostgreSQL, etc) versions: Synology NAS (Docker, PostgresSQL)

you can try dumping your database and PM-ing me the link, i’ll take a look. something with the category structure, i guess, or a wrong value somewhere.

Sure, I’d be happy to (pm done) don’t stress too much though, might be something local or a 1 out of a 100 rare case due to an older OPML format or something similar.

i’ve poked around at it and it seems like a PHP8 usual warning thing, generated by items missing inside arrays which were never there anyway.

dragging stuff seems to work as intended despite these warnings (and items missing in relevant data structures passed by dijit tree) so i’ve added necessary checks to hide those warnings.

everything seems fine with the database, too.

e: i’ve also fixed a cosmetic issue with feed tree expando node (+) becoming invisible on active tree rows.

Good to hear the DB is not “broken”, I’ll have to update and give it a shot locally soon. I thought I had an issue once or twice with something not showing in the tree and/or resetting position wise (or something like that)… but might have been something else if all that is was “warning” related. Tthanks for taking the tiem to look at the “special case” I’ll report again if needed, but it sounds like things should be fine.