Unable to query the database: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'b.hidden_at' in 'where clause' $sql = "SELECT a.id, a.title, a.slug, a.last_posted_at, a.comment_count, b.username, ".
" TIMESTAMPDIFF(SECOND, a.last_posted_at, NOW()) as t, ".
" DATE_FORMAT(a.last_posted_at, '%a, %d %b %Y %T') as d FROM ".
$config["database"]["prefix"]."discussions as a LEFT JOIN ".
$config["database"]["prefix"]."users as b ON a.last_posted_user_id = b.id ".
"WHERE b.id IS NOT NULL AND a.is_private != 1 AND b.is_private != 1 ".
"ORDER BY a.last_posted_at DESC LIMIT ".$limit.";";
Because I've used the official DB scheme, but it looks like you're having a different one? There's no "is_approved" field at all for example...Julius {l Wrote}:I use the latest stable Flarum release 1.0.2.
The columns "is_private" (and "is_approved", something we probably want to use in the future), exists in the DB, so I am not sure why your new code is still failing.
Actually it is. The problem we're having is that in your DB there's no "is_private" field in the posts table, but it should be. At least in the official sql dump it exists.Julius {l Wrote}:But you are right, the "is_private" seems to refer to another mechanism than the private tags that are used to hid certain posts from non-authorized users. I'll look a bit closer to where that is stored in the database, but it seems odd that this isn't done at the "post" level.
Ok, absolutely no "tags" table...Julius {l Wrote}:Edit: hmm, this looks like it is designed to not store that at "post" level but rather indirectly through the tag association and the "is_restricted" column in the "tags" section. I guess that is due to the modular nature of Flarum with tags not being a core feature :-/
Then that sql error makes no sense.Julius {l Wrote}:The "is_private" column definitely exist my my database under "posts".
Yikes, but does it support non-login, suckless, simple list of new posts? I'd only want to quickly check if there's a new post, without logging in or enabling js, exactly the same that phpBB does out-of-the-box with active topics. I like simple.Julius {l Wrote}:I thin the problem is that the "core" Flarum is intentionally stripped down to the bare minimum and most stuff is managed through extensions that are often bundled with the core, like the "tags" one.
As for debugging this further, let me try the newly updated syndication extension first, maybe that solves the issue anyways and is probably nicer as you can subscribe to specific categories etc.
It is terribly slow, but probably this hurts you (and your server) much more than me. I can wait after all...Julius {l Wrote}:Please test the syndication feeds (it is limited to the last 20 entries as well):
https://freegamedev.net/d/1-welcome-to- ... -forums/22
$ time curl https://freegamedev.net/atom -s -o /dev/null
real 0m1.008s
user 0m0.033s
sys 0m0.015s
$
$ curl -I https://freegamedev.net/atom
HTTP/2 200
server: nginx
date: Fri, 11 Jun 2021 20:05:51 GMT
content-type: application/atom+xml; charset=utf8
x-content-type-options: nosniff
referrer-policy: same-origin
x-powered-by: Flarum
x-csrf-token: sKXkdTBUfrpOAXxGrEsUrKk9OphKud3DLo5RB0Ea
set-cookie: flarum_session=owDg6MblteFheXQYfw0YvnGisIKVwG2cwE32stpn; Path=/; Expires=Fri, 11 Jun 2021 22:05:51 GMT; Max-Age=7200; Secure; HttpOnly; SameSite=Lax
last-modified: Fri, 11 Jun 2021 18:49:53 GMT
cache-control: max-age=3600
expires: Fri, 11 Jun 2021 21:05:51 GMT
Yeah, could be. But if the rss feed would include the poster's name and working links, I wouldn't care. Actually I would be happy with the poster's name, I can copy'n'paste the url to the address bar if I want to.Julius {l Wrote}:Thanks, will report the issues upstream. About the dates/time... my feed reader does show them. Seems maybe an issue of the Firefox plugin you are using?
This is something you have to decide yourself. I don't mind if I have to wait a few secs. Otherwise this looks promising, provides the list of latest posts without logging in or enabling js, so looks good for me :-)Julius {l Wrote}:Indeed this looks light a more heavy weight solution, I'll have to see what the impact on the server is.
Users browsing this forum: No registered users and 1 guest