[Meta] FreeGameDev changes NEW: https://freegamedev.net

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » 10 Jun 2021, 15:58

Still another issue it seems. I added the extra ")" though.
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby bzt » 10 Jun 2021, 23:37

Huh? What version of Flarum are you running?
{l Code}: {l Select All Code}
Unable to query the database: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'b.hidden_at' in 'where clause'
According to the official site's sql dump, both the discussions table (line 74) and the posts table (line 228) should have a "hidden_at" field. If there isn't then I really honestly don't now what you meant by "private tag" if not the "is_private" fields.

Anyway, here's a fix, hidden_at removed, use this sql:
{l Code}: {l Select All Code}
   $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.";";
Hope this will finally work.

Cheers,
bzt
User avatar
bzt
 
Posts: 32
Joined: 23 May 2021, 21:46

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » 11 Jun 2021, 12:32

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.

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.
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 :-/
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby bzt » 11 Jun 2021, 13:19

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.
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}: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.
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}: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 :-/
Ok, absolutely no "tags" table...

To get this solved in short time, may I ask for an sql dump of your current DB? You can remove all sensitive information if there's any, I'm only interested in the schema. With that I can create a sql query which filters everything out that you want filtered out in no time. It is very strange that your schema differs to the official one, not just you have more tables for the modules, but some fields in core tables are missing too.

Cheers,
bzt
User avatar
bzt
 
Posts: 32
Joined: 23 May 2021, 21:46

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » 11 Jun 2021, 13:38

The "is_private" column definitely exist my my database under "posts".

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.
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby bzt » 11 Jun 2021, 14:08

Julius {l Wrote}:The "is_private" column definitely exist my my database under "posts".
Then that sql error makes no sense.

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.
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.

Cheers,
bzt
User avatar
bzt
 
Posts: 32
Joined: 23 May 2021, 21:46

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » 11 Jun 2021, 18:54

Please test the syndication feeds (it is limited to the last 20 entries as well):
https://freegamedev.net/d/1-welcome-to- ... -forums/22
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby bzt » 11 Jun 2021, 21:16

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
It is terribly slow, but probably this hurts you (and your server) much more than me. I can wait after all...
{l Code}: {l Select All Code}
$ time curl https://freegamedev.net/atom -s -o /dev/null
real   0m1.008s
user   0m0.033s
sys   0m0.015s
$
I've repeated the download several times, the best was 0.47 sec.

It is not refreshing (the same nginx expire configuration issue as with rss.php):
{l Code}: {l Select All Code}
$ 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
(See that "max-age=3600"?)

About the atom feed:
- there are no dates. Neither absolute nor relative, so I cannot see when the posts were made.
- incorrect charset is specified ("utf-8" vs. "utf8")
- there's a validation error because it does not remove all tags?
- does not pass the validation: https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Ffreegamedev.net%2Fatom

About the rss feed:
- for some reason there are no links, so I can't go to the discussion
- I can't see who made the post (username is missing)
- same charset issue as with the atom
- does not pass the validation: https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Ffreegamedev.net%2Frss

I hope this helps.

Cheers,
bzt
Attachments
fgdrss.png
fgdatom.png
User avatar
bzt
 
Posts: 32
Joined: 23 May 2021, 21:46

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » 11 Jun 2021, 22:07

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?

Indeed this looks like a more heavy weight solution, I'll have to see what the impact on the server is.
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby bzt » 12 Jun 2021, 17:16

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?
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}:Indeed this looks light a more heavy weight solution, I'll have to see what the impact on the server is.
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 :-)

Cheers,
bzt
User avatar
bzt
 
Posts: 32
Joined: 23 May 2021, 21:46

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby drummyfish » Yesterday, 09:06

Ummm... how did we end up with the horrible Flarum forum? Last time I've read this topic everyone hated it and a usable no JS fallback seemed to also at least have been a requirement. Have you just given up on that? Because I am not going to use a forum that requires JS. Really sad to see one of the last freedom caring communities fall.
socialist anarcho-pacifist
Abolish all IP laws. Use CC0. Let's write less retarded software.
http://www.tastyfish.cz
User avatar
drummyfish
 
Posts: 361
Joined: 29 Jul 2018, 20:30
Location: Moravia

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby Julius » Yesterday, 12:40

As I wrote elsewhere, I have applied three main criteria:

1. User-friendly / modern looking with good mobile browser support (only way to attract new users, and lets be honest: this forum is dying)
2. Stable code-base with good moderation features / anti-spam and which can be hosted in a way that will not cause headaches in a few years
3. Accessible / usable from noJS browsers etc. (but note: Javascript use is fully compatible with "freedom" as defined by the FSF)

Additional minimum criteria: no 3rd party user tracking, fully FOSS, easily GDPR compliant

Nice to have: federation, integration with other systems (chat etc.)

Looking at these criteria, Flarum is IMHO the best fit, even though 3. is not very good with it... and I have searched and tested a lot of options in the last 3 years :(

@Drummyfish: at least join us on IRC :)
“Reality is that which, when you stop believing in it, doesn’t go away.” - Philip K. Dick
User avatar
Julius
Community Moderator
 
Posts: 3118
Joined: 06 Dec 2009, 14:02

Re: [Meta] FreeGameDev changes NEW: https://freegamedev.net

Postby drummyfish » Yesterday, 19:22

I understand @Julius. I know you're an admin and do this work in free time, I am very grateful for it, and I know these features will make the work easier for you. I am just really sad as I will have to leave this community, it really hit me hard. I see one of the last communities that have resisted the evils of toxic mainstream technology finally being devoured by it. You will get new users but lose some of the old ones, the ones that truly believed in the ideas.

I try to care about freedom that goes further than a license. Even if JavaScript and Flarum technically pass as legally free software, they may still discriminate against users, they may still pose greater security risks and they may still be a bad technology.

Anyway that's it, I don't know what more to say. See you... somewhere.

Thank you for the invitation to IRC, I'll try to connect sometimes, even though I don't do much realtime chatting.
socialist anarcho-pacifist
Abolish all IP laws. Use CC0. Let's write less retarded software.
http://www.tastyfish.cz
User avatar
drummyfish
 
Posts: 361
Joined: 29 Jul 2018, 20:30
Location: Moravia

Who is online

Users browsing this forum: No registered users and 1 guest

cron