Quantcast
Channel: Discourse Meta - Latest topics

Listen to revoked User API Key via MessageBus?

$
0
0

I am creating a mobile application using React Native powered by Discourse (Communicating via REST Api).

I use the User API Keys flow to make authenticated requests and the MessageBus to listen to different events (Implemented successfully fortunately)

At the moment I am implementing the case where the API Key is revoked, and thus tell the user something similar to “Your session has expired”.

For that I tried to subscribe to /logout/${current_user.id} (It seems to be what Discourse uses in the frontend), without any success

Is it possible that I should subscribe to another channel or is that kind of information not currently transmitted via MessageBus?

Relevant code:

const messageBus = MessageBus.getInstance();
/* Add the User-Api-Key header to message bus */
messageBus.setToken(currentAccount.apiKey);

messageBus.subscribe(`/logout/${currentAccount.id}`, () => {
  console.log(`Logging out account ${currentAccount.username}`);
  alert("Your session has expired. Please log in again.");
  signOut({ reason: REASON_SESSION_EXPIRED });
  /* When Revoken, only delete the account data from the storage */
});

Thanks! :slight_smile:

1 post - 1 participant

Read full topic


Category topic count incorrectly displaying number of posts

$
0
0

Hi everyone,

I’m having a problem where on the main page of my Discourse instance, the categories are displayed with the number of topics. However, after permanently deleting a post, the number still does not go down - is there a way to resolve this? The number of posts is 5 even though there are 3 topics open and 2 have been permanently deleted.

Thanks!

7 posts - 3 participants

Read full topic

Wrong number of user notes

Host a PDF

category is not returned when searching for categories.json

$
0
0

I’m using the api and passing the username to return the categories.
But I noticed that when accessing the discourse this user also does not have category visibility in some places. As shown in the photo below, it appears in the side menu but does not appear in the category search.

And if I press ‘Graduation’ on my side, it works normally, because the user has the necessary permission.

[image]

6 posts - 3 participants

Read full topic

Where do I set the email domain?

Entirely disable post deletion

$
0
0

Hi,

I’ve tried to find an option for disabling post deletion, I saw this article, but it doesn’t exactly resolve my issue - is there way to prevent users from, once having posted a topic or reply, deleting any sort of post?

Thanks!

10 posts - 6 participants

Read full topic

Increase Amazon translate limit to ~10,000 characters

$
0
0

Why have you limited the Amazon translation text size to 5,000 characters in the plug-in’s amazon.rb?

According to Amazon their API supports text that is up to 10,000 characters.

Is there any chance you can modify the MAXLENGTH in your amazon.rb to 10000 anytime soon, and modify values in any related code files? I suspect my translations are truncated unnecessarily.

4 posts - 3 participants

Read full topic


Update or remove highlight.js demo link

$
0
0

In highlighted languages in Settings, if you click on the link https://highlightjs.org/static/demo, it takes you to https://highlightjs.org/not-a-cdn which says…

Do not use us as a CDN. You should not be linking to any assets that are hosted on our website. We are getting million of garbage requests due to this misuse of our assets.

Perhaps the link should be https://highlightjs.org/demo

I believe the relevant string to be changed here (but will need changing in other languages).

1 post - 1 participant

Read full topic

Understanding client_id in the message bus

$
0
0

Hello :wave: ,

I’ve try to dive into the codebase recently, to figure out the client id in /message-bus/{client-id}/poll endpoint. Could someone please provide some guidance or direct me to the relevant code or documentation that explains what exactly this client ID represents and how it’s set?

Thanks in advance for your help!

2 posts - 2 participants

Read full topic

Remember to include body in bounce email

$
0
0

When a user responds by email to a thread that has been closed in the meantime, he receives an email stating his post could not be posted.

However, unlike SMTP bounces, the body of his post is discarded.

He might have spent hours composing it, but now he cannot even access it.

Sure, he should have saved a copy, but it might be on the desktop back at his mother’s house, and now he is on an airplane.

And he might not have been using Gmail, etc., so there is no online “Sent” folder to check.

Just like when one does a bank transfer and

Sorry, your transfer failed

Well, OK, but can I at least have my money back? You can keep the service fee, fine with me.

Sorry.

Just like today, when I’m typing this into the Discourse web interface. I shouldn’t need to always make my own copy of what I wrote before I click “+ Create Topic”…

So, what might a user want to do with his failed post?

Well, he might want to take some lines from the song he composed and integrate them into a new song and post it somewhere else.

Or that nice proof of e=mc2, he might not be in the mood to type it all over again when posting it to a different thread, etc.

Edit: wow I started tying to update the gender non-neutrality of my post, and found it was no simple job. Even with query replace!

2 posts - 2 participants

Read full topic

Replying by emails to topics that have been changed in the meantime go into black holes

$
0
0

We know that when a user replies by email to a thread that was in the meantime subsequently closed, he will get a Sorry email response. All well and good.

But let’s examine the cases where the thread he is replying via email has not been exactly closed, but the topic has been redirected or whatever various other combinations moderators might do.

OK, so there he is, replying blindly to an hours old email in his Gmail etc., without knowing that indeed, if he would just have a look at the website, was now part of a whole other thread or whatever.

OK, off goes his email. But when it hits the Discourse server, what happens?

Well it doesn’t generate a Sorry email reply.

But it also doesn’t get posted anywhere.

Maybe a few weeks later the user, back on the website, swears he did mention something, but cannot find it now.

No, I don’t have an exact case. All I know is I lazily just replied to several threads I found on my email account, and most got posted, but I’m certain that one didn’t. But the threads got changed around by the moderators, so the only way to find where my email went would be to “open up the drain cover on meta.discourse.com’s mailbox, and look for items that didn’t generate a reply nor a Sorry message.”

I’m saying the easiest way to debug this would be for “root” to check all the emails that Meta.discourse.com got. Each one should have generated an action. For those where no action was generated, there should be some error log. Maybe in the error log you will see: “Could not find valid thread to append reply to. Discarding.” or something.

So to fix the bug, the email should be returned to the user, (with the body too please!), saying “We’re sorry. The thread you were replying to got altered. It would be best if you examined your post and perhaps make any adjustments you see fit, before perhaps reposting your valuable viewpoints to the new thread. Yours Truly, Discourse Software Corporation Ltd. (or, OK, local site name.)”

1 post - 1 participant

Read full topic

How do I view total views on the forum?

$
0
0

Is there a way to see the total number of views on the forum? I want to track the total views, but it seems like I can only see the number of views for each individual topic, and it is tedious to manually add up.

5 posts - 3 participants

Read full topic

Get current user locale

$
0
0

Hello!

Is there a way to get the current user locale? I see that discourse/models/user has an attribute for the locale, but it is not populated when the app starts. Wondering why is that the case. Is it possible to get the user locale without making an API call?

Thanks for the help.

1 post - 1 participant

Read full topic

User posts by email domain over last 7 days

$
0
0

Query to count posts by email domain for the past 7 days, excluding automatic groups (bots, system)

SELECT
  split_part(ue.email, '@', 2) AS email_domain, -- Extracts the domain part of the email
  COUNT(p.id) AS post_count
FROM
  posts p
  JOIN users u ON p.user_id = u.id
  JOIN user_emails ue ON u.id = ue.user_id
    AND ue.primary = TRUE -- Ensures we're using the primary email
  LEFT JOIN group_users gu ON gu.user_id = u.id
  LEFT JOIN GROUPS g ON gu.group_id = g.id
    AND g.automatic = TRUE
WHERE
  p.created_at >= CURRENT_DATE - INTERVAL '7 days' -- Filters posts from the last 7 days
  AND g.id IS NULL -- Ensures that users are not part of any automatic groups
GROUP BY
  email_domain
ORDER BY
  post_count DESC -- Sorts results by the count of posts in descending order

4 posts - 2 participants

Read full topic


I have a problem

$
0
0

How can the user view the post, i.e. the value of last_read_post_number is changed through which interface

3 posts - 2 participants

Read full topic

[PAID] Need someone to migrate a PHPBB forum to Discourse and ensure we do proper redirects for SEO

$
0
0

What would you like done? Set up Discourse and migrate a PHPBB forum to it.

When do you need it done? 1-4 weeks

What is your budget, in $ USD that you can offer for this task? Open

3 posts - 3 participants

Read full topic

Random sort order for house ads (advertising plugin)

$
0
0

First of all thank you for developing and maintaining the advertising plugin. The plugin helped us a lot in increasing the revenue of our website TFF Forum.

Currently we use house ads for our internal cooperation partners and external ads from a marketing company.

We recognized during our tests that the house ads are always shown in the same sort oder. The sort order is defined by the sequence the ads were created and are shown on the left side of the administration screen of the advertising plugin.

In our case this results in two blocks of ads: the user first sees 40 house ads from our internal partners and than 40 house ads from the marketing company.

I think that it would better if the sort order would be chosen randomly. This would result in different sort orders every time a user scrolls through a longer thread.

An other alternative would be if we can define the sort order in the administration screen of the advertising plugin.

Would this be a possible feature in the future? Or do you have any other ideas how to achieve different sort orders for the house ads?

1 post - 1 participant

Read full topic

Logged In User Data

$
0
0

Hello Discourse,

Can anyone help me to figure it out how can I get the logged in users data either in plugin or theme-component?

Thank you!

4 posts - 3 participants

Read full topic

Can user's customer profile checked before use?

$
0
0

Hi
It is allowed in discourse to change to the custom profile and attach some files to do a post, I would like to know is there a setting or is it possible to check and approve the profiles or files by Admin before they are displayed in the forum?
thank you!

2 posts - 2 participants

Read full topic

Add query replace in the editor

$
0
0

Let’s say you have a lot of "33"s that you want to change into "44"s.

Well on GitHub when we’re editing source code they’ve got a nice query replace function right there in the web based editor.

So there’s “no reason” why Discourse couldn’t have the same! (Worldwide.)

That way we wouldn’t need to copy our text into some other editor, do the replacements, and then paste it back in.

2 posts - 2 participants

Read full topic

Ports 443/80 show as closed after installation

$
0
0

Hi,
I have just finished my first Discourse installation on a Ubuntu 22.04.4 server on Proxmox VE (virtual environment).
The installation went fine, with no errors, but after finishing it-- the forum site won’t open saying that the service is not accessible.

When checking from my network I see the ports as closed:

PS C:\Users\mwojt> nmap 192.168.131.211
Nmap scan report for 192.168.131.211

PORT    STATE  SERVICE
22/tcp  open   ssh
80/tcp  closed http
443/tcp closed https

But when running the same for localhost from inside the Ubuntu machine it shows as open:

root@ubuntu-discourse:~# nmap localhost
Nmap scan report for localhost (127.0.0.1)

PORT    STATE SERVICE
22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https

However if I run the check the IP address from the same Ubuntu VM to the I see this:

root@ubuntu-discourse:~# nmap 192.168.131.211
Nmap scan report for ubuntu-discourse (192.168.131.211)

PORT    STATE    SERVICE
22/tcp  open     ssh
80/tcp  filtered http
443/tcp filtered https

So, the ports show up as filtered.
The ports were opened at the firewall:

root@ubuntu-discourse:~# ufw status
Status: active

To                         Action      From
--                         ------      ----
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
22                         ALLOW       Anywhere
80 (v6)                    ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)

And the Docker port forwarding seems to be set correctly:

root@ubuntu-discourse:~# docker port 6922c7802903
80/tcp -> 0.0.0.0:80
80/tcp -> [::]:80
443/tcp -> 0.0.0.0:443
443/tcp -> [::]:443

What do I do wrong? Where is the problem?

1 post - 1 participant

Read full topic


Use AI to make post more gender inclusive

$
0
0

I just tried the AI function to see if it could make my post more gender inclusive.

Alas, it did not detect the 10 to 0 “he” ratio at all.

11 posts - 6 participants

Read full topic

'Like' icon used to represent all emotions is sub-optimal

$
0
0

Here it looks like six people liked this item,

when in fact it could be instead six hates.
Same for the heart symbol seen here on meta.

Maybe a Category:Comedy and tragedy mask icon - Wikimedia Commons would be better?

You know, more “emotion-inclusive”.

Also one cannot get emotion count details, without expressing an emotion oneself. And then there is a limited time to withdraw your emotion before it becomes permanent.

4 posts - 4 participants

Read full topic

Edit categories navigation Menubar

$
0
0

Hello,

We are using Discourse for our site and we have noticed an issue with the “Edit categories navigation”

Once you have a lot of categories, the list no longer updates. It only shows the first set. We an search to bring up new categories but the old ones are always available in the scroll list.

What I would think would happen is that all the categories would be scroll-able and able to be selected. Without having to search for the category.

Board Info:

1 post - 1 participant

Read full topic

Issue with Oneboxing an image from a specific domain

$
0
0

Can anyone shed any light as to what may be going on here? :thinking:

I have two images. They are identical. The only difference is the domain name.

One image refuses to onebox on my Discourse running 3.3.0.beta2-dev (7a083daf27), the other image will onebox just fine with no issues.

Image one: https://dronescene.co.uk/images/uploads/temporiginal/test11.png

Image two: https://dev.dronescene.co.uk/images/uploads/temporiginal/test11.png

While scratching my head and trying to work out what the issue might be, I noticed the onebox url is appending a few extra parameters on the end of the URL:

I think this is a red herring though :thinking:

If I view both images directly in a browser tab and look at the HTTP response headers in the network tab of the browser console, I can’t see any differences between the two.

There are no errors in my Discourse logs.

Might I have applied some domain-specific settings on my Discourse that I’ve long since forgotten about? :thinking:

What else could cause the Onebox to throw a HTTP/404 when the image is actually there? :thinking:

Where might I start in debugging why one url works and the other does not? :thinking:

If relevant, both domains are proxied via Cloudflare - but all identical in the settings there too.

5 posts - 2 participants

Read full topic

Embedding listing topics as 'unlisted' now

$
0
0

Since the last update my embedding code for showing topics on our websites (where the embed generates a new topic in the forum for new content) has started listing all the topics as “Unlisted” vs. being listed (as it had been). We haven’t made any changes to the embed code nor to the setting that controls this in Discourse which is still unchecked and thus to not show them as unlisted.

Thanks for any help.

2 posts - 2 participants

Read full topic

How can I add an image to a subcategory and sizing that image?

$
0
0

Hello,

I did changed ::before CSS codes
background: none and I added background-image: url (…)
But when I resize it, it doesn’t work the way I want.

Like width : 60px and height : 60px or max-width : 60px

Where am I making a mistake?

2 posts - 1 participant

Read full topic

My new site for basketball fans nbachats


Discourse WP plugin - Pull in Featured Image

$
0
0

Is there a way to insert the WP feature image when using the Discourse plugin. It pulls images from the post but when there isn’t an image the category / tag post listing looks empty with text. I am using the Reddit style theme which would be made better with images appearing. It works when I insert manually but not via the plugin. Example below with the Fortnite image added in after being published via the plugin

1 post - 1 participant

Read full topic



Latest Images