Hello,
recently I’ve discovered this issue: when I go in preferences and I’m using the default profile of any user (admin, my regular user, a new user created for test), the preferences don’t show any option:
If I create an additional profile for the user, that profile has normal visible options.
Switching back to default profile while the additional profile is in place, still no visible options.
I don’t know when the issue has started because I don’t go into prefs frequently, but of course in the past it was all ok.
I tried different browsers and anonymous browsing options, they made no difference.
tt-rss version (including git commit id):
19.2-234-g9aab6ec87
Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
you can try cranking up mariadb query debugging somehow, other than that i’m afraid the only way is tinkering with stuff manually.
main query that collects user preferences to display is at classes/pref/prefs.php:515 if you’re on latest trunk, you can try poking at it. run it manually in sql console or something.
now that i think about it it’s possible that profile session variable is stuck in some kind of invalid state, you can try adding var_dump($profile); right after $profile = ... at line 503
it should be NULL for default profile but it probably isn’t.
The thing is that the query already returns no rows if executed in mysql client. If I replace the variables in the query executed at line 513 it should be something like:
SELECT DISTINCT
ttrss_user_prefs.pref_name,value,type_name,
ttrss_prefs_sections.order_id,
def_value,section_id,owner_uid
FROM ttrss_prefs,ttrss_prefs_types,ttrss_prefs_sections,ttrss_user_prefs
WHERE type_id = ttrss_prefs_types.id AND
(profile = NULL OR (NULL IS NULL AND profile IS NULL)) AND
section_id = ttrss_prefs_sections.id AND
ttrss_user_prefs.pref_name = ttrss_prefs.pref_name AND
owner_uid = 2
ORDER BY ttrss_prefs_sections.order_id,pref_name;
I’ve added owner_uid to the output for debugging. This doesn’t return anything. But if I remove some of the where clauses I get something that looks reasonable to me and I don’t understand why the full set of clauses doesn’t work. With this query:
SELECT DISTINCT
ttrss_user_prefs.pref_name,value,type_name,
ttrss_prefs_sections.order_id,
def_value,section_id,owner_uid
FROM ttrss_prefs,ttrss_prefs_types,ttrss_prefs_sections,ttrss_user_prefs
WHERE type_id = ttrss_prefs_types.id AND
(profile = NULL OR (NULL IS NULL AND profile IS NULL)) AND
section_id = ttrss_prefs_sections.id AND
ttrss_user_prefs.pref_name = ttrss_prefs.pref_name
ORDER BY ttrss_prefs_sections.order_id,pref_name;
that is returning data for all users though (including uid 2), can you add back missing clauses one by one to see which one breaks it? start with owner_uid = 2.
this is quite curious.
e: oh owner_uid one is the only one removed? try replacing it with ttrss_user_prefs.owner_uid = 2.
i’m using 10.1.38 (debian stretch) and the aforementioned query works as expected.
maybe something syntax-related has changed / got broken in newer versions. in all honesty i’m not sure if i want to jump through more mysql-related hoops.