Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60721 articles
Browse latest View live

Set the top menu in the mobile view independently of the desktop view

$
0
0

@Lutz wrote:

Set the top menu in the mobile view independently of the desktop view.

Reason: many users want the familiar view of their categories for their desktop browsers as default. But they want the "latest" look for the mobile phone, so they can simply scroll infinitely.

We already use an ugly nginx-hack to realize this. However, the users are clicking on the the logo to return to the beginning of the page.The logo links to "/", which is again the category view rather than the "latest" view. So you need an other hack to make this happen.

(Look here for the "hacks" https://meta.discourse.org/t/how-to-default-to-latest-on-mobile-and-categories-latest-on-desktop/55716/5)

Perhaps this could be implemented in a future version Discourse, so that we can stop using the workarounds.

Posts: 1

Participants: 1

Read full topic


Embedding quote outside of Discourse

$
0
0

@joebuhlig wrote:

I have a blog (Jekyll) which uses a Discourse instance for commenting. It's becoming more and more common that I want to quote someone from Discourse in a blog post. Essentially, this would be a copy/paste of the current quote styling but in an external system. There may need to be other pieces added to the quote to give it context, but you get the idea.

I could write a Jekyll plugin for myself to use but it would be really handy to use an embeddable code snippet for the quote instead. We get embed snippets all the time from other services already. I'd love to see Discourse do the same. But I also recognize that this may be a power user feature and may be plugin-worthy as opposed to making it into core.

Posts: 3

Participants: 2

Read full topic

Common event system for chatrooms - a specification

$
0
0

@David_Taylor wrote:

One of the GSOC ideas on GitHub is creating a "Common Event System for Chatrooms"

I like the sound of this idea, so this is an attempt at a more comprehensive description of how it could be implemented. Hopefully this will give a starting point for some discussion about what people would like to get out of a feature like this.


What we already have

The Discourse-Slack plugin is a great way of getting real-time notifications of Discourse posts. It can post to 'group chats' in Slack, or post to individuals. Notifications can be setup for specific categories (tags coming soon), either for "new topics", or "all replies".

Common event system

The idea

Creating plugins which provide similar functionality to the slack plugin, but for other communication platforms, is totally possible right now. However, this will result in a massive amount of code duplication, as a lot of the logic will be the same between different chat systems. Therefore a 'shared' chat system (either in core, or as a plugin), would be an efficient & maintainable way to expand to multiple platforms.

Scope

As an initial implementation, I wouldn't expect functionality to go much further than the current functionality of the Slack plugin, however there is scope to add more functionality such as actually making posts on Discourse from your chosen messaging platform, but that's material for a future discussion.

Structure

The "Common event system" would take care of managing permissions, and "subscriptions" (which categories/tags to subscribe to for a given "chat"). At its simplest level, it would maintain a table with rows like this. Yes, it would need to be more complicated than 3 text fields, but hopefully this illustrates the functionality.

| CHAT_SYSTEM |     CHAT_ID     |          SUBSCRIPTIONS          |
|-------------|-----------------|---------------------------------|
|  telegram   | @davidtaylorhq  |  c/meta,c/plugins,t/pr-welcome  |
|  facebook   | group_75462363  |             c/lounge            |
|   slack     |     #general    |        c/support, c/bugs        |

Each of the chat_systems would be an independent plugin, which deals with the platform-specific stuff. These plugins would receive information from the "common event system" using similar systems as the current event hooks. So you'd end up with something like:

DiscourseEvent.on(:notify_chat, :telegram) do |information|
    # Send a message to the specified telegram chat using the information provided
end

Permissions

It is critical that this system be very careful about permissions. Users should only be able to subscribe to categories that they are allowed to view. This requires some thought for group chats. Ideally, every user in the chat should be matched to a Discourse user, and checks should be made that every single user in the chat has appropriate permissions.

Authenticating

We need some way of users "associating" their chat system accounts with their Discourse accounts, so that the correct permissions can be used. As a simple idea, the user could simply be sent a "unique link" via the chat system, which they can then visit while logged into Discourse. This would then record the association between their chat account and their Discourse account. Ideally most of this would implemented by the "common event system". A list of all of the authenticated accounts should be shown in the User's profile settings, with the option to "disconnect" accounts if required.

User Interface

The "common event system" should have its own pane in the admin interface, listing all current subscriptions for all users (effectively each of the rows in the pseudo-table above). I imagine the UI to be very similar to the current slack plugin:

Each user should also have a list of all of their current subscriptions somewhere in their profile settings, from here they should be able to edit/remove existing subscriptions.

Providers could also implement something like "slash commands" for changing subscription settings, like the slack plugin does right now:

/discourse [watch|follow|mute|help|status] [category|all]

For most providers, initially creating an subscription with a chat would be done by simply "adding" the bot to the group chat.

Possible providers

Each of these could be implemented in separate plugins, keeping things modular & maintainable:

Slack - the slack plugin already exists, making use of the api
Telegram - Mature REST bot API, which I have used in the past.
Facebook Messenger - Bot API available
Gitter - Can add things to 'activity stream' using the services library. @jafeth.diazc has more info here
HipChat (thread) - API available, see discourse-akismet-hipchat
Mattermost (thread) - API available

[others] - Hopefully having a central system for managing the complicated user/permissions logic would enable plugin developers to easily create plugins for any service with an API.

Extending beyond chatrooms

The kind of permission-centric approach here would be an ideal way to let users have "personal webhooks". The current webhook system is great for administrators to integrate their site with things, but having user-specific webhooks would allow users to set up their own integrations with services like IFTTT and Zapier without risk of leaking information they're not allowed access to.



I'd love to hear people's thoughts on this spec, if there's anything that's not clear please let me know and I'll do my best to improve the description.

Posts: 6

Participants: 5

Read full topic

If starting with a quote, email begins with ellipses "***"

$
0
0

@sjmscott wrote:

On my installation it seems that if I begin a message by quoting someone the email begins with an ellipses which hides my response. If you click on the three dots then the message is expanded.

Is this expected behavior? Is it possible to avoid this or should I tell users not to begin with a quote?

Thanks!

Posts: 2

Participants: 2

Read full topic

Should the email address of a new user be included in the webhook?

$
0
0

@watchmanmonitor wrote:

Continuing the discussion from Testing the new-user webhook?:

I too would like the email in the webhook. I understand the desire for privacy, but this is a forum I manage, and I can be much more effective if I can send the email to our SaaS for validation, and auto-apply the right Groups if we have a match.

I can't use SSO because there are people in our forum who do not have an account in our SaaS, and despite the "sign in via sso" option we offer, we regularly have users signup with email/password. Getting that email in automated fashion allows me to automate more.

Including the email in the webhook payload doesn't tell me anything I can't find out on my own, and does allow more functionality.

Posts: 2

Participants: 2

Read full topic

User TL3 Requirements page missing on refresh

$
0
0

@joebuhlig wrote:

I was working to adjust the TL3 settings for one of my sites and pulled up the TL3 requirements page for a few TL2 users to use as a gauge. That worked fine but when I refreshed the page to see the edits I had made to the TL3 settings it gave me a 404.

My first thought was that the client side had the route (which is why it worked initially) but that the Rails side was missing the route. Creating the Rails route on local worked. Which leads me to this:

Posts: 3

Participants: 2

Read full topic

/admin/users/list does not indicate which columns are sortable

$
0
0

@jomaxro wrote:

Very excited to see @oblakeerickson and @designbygio's work in making the user lists in Admin sortable. One small critique is that there is no indication that the columns are clickable. On a similar table that can be sorted (like /users), when hovering on a clickable (sortable) column, the mouse becomes a pointer, and the header - button - gains a grey color.

For clarity, as well as consistency, it'd be very nice if similar visual queues were used on the Admin lists.

Posts: 2

Participants: 2

Read full topic

Bug when composing topic while viewing PM - incorrect "mentioned user will not be notified" warning

$
0
0

@jomaxro wrote:

Had a feature request related to a closed topic. Flagged it to reopen. Asked to instead make a new topic. Typed c to open composer and started typing. After mentioning a non-admin user, I was warned that they would not be notified because it was a personal message. However, I was writing a public topic, not a PM. I was simply looking at a PM.

I think the logic from this PR is not working for some reason. Is it somehow checking the current view instead of the composer type @cpradio?

Screenshots:

Edit: just happened for this topic as well.

Repro:

  1. Navigate to Messages.
  2. Open a message.
  3. Type c to open new topic composer.
  4. Mention a non-admin user not a participant in message that was opened in step 2.

Posts: 5

Participants: 3

Read full topic


Bad link on Plugin Author badge here on Meta

Are mp4 files intentionally no longer approved for upload?

$
0
0

@jomaxro wrote:

In the past I've been able to upload mp4 files to demonstrate a UI issue in Discourse. However, now only jpg, png, gif, pdf, and csv are allowed. Was the change intentional? Did Meta get reset to the default?

Edit: converted the video to gif. For reference, doing this with the default settings in the program increased the file size by over 1400%.

Posts: 6

Participants: 3

Read full topic

Embed issue with HTTPS, Ruby log shows no errors but comments won't load

$
0
0

@ebadgley wrote:

I have a development instance of Discourse running on Cloud9, and a parallel web server that I am using to test out embedding comments. I have run into persistent issues with the notorious (and previously observed) "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided does not match the recipient window's origin" message, but nothing seems to match the previous topics posted.

The Setup:

I have a test page with the following HTML:

<body>
<h1>Discuss Embedding Test</h1>

<div id='discourse-comments'></div>

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: 'https://eb.c9.testserver.org:3000/',
                     discourseEmbedUrl: 'https://eb.c9.testserver.org:8081/eb-test.html' };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>


</body>

The <div> and <script> elements are exactly as specified on the Embedding page.

I have eb.c9.testserver.org and eb.c9.testserver.org:8081 set up as Allowed Hosts on the Embedding page, with the Path Whitelist set to "./" for both.

All SSL certificates/paths are set up correctly.

The Problem:

When navigating to https://eb.c9.testserver.org:8081/eb-test.html, I get the following Javascript error (visible on the Chrome console):

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://eb.c9.testserver.org:3000') does not match the recipient window's origin ('https://eb.c9.testserver.org:8081').

However, from the Cloud9/Ruby console everything appears to be working as expected:

I, [2017-03-16T16:53:10.377997 #28998] INFO -- : Started GET "/embed/comments?embed_url=https%3A%2F%2Feb.c9.testserver.org%3A8081%2Feb-test.html" for 172.17.0.2 at 2017-03-16 16:53:10 +0000
I, [2017-03-16T16:53:10.443647 #28998] INFO -- : Processing by EmbedController#comments as HTML
I, [2017-03-16T16:53:10.445753 #28998] INFO -- : Parameters: {"embed_url"=>"https://eb.c9.testserver.org:8081/eb-test.html"}
D, [2017-03-16T16:53:10.449724 #28998] DEBUG -- : UserAuthToken Load (1.0ms) SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((auth_token = 'jXadm/bqoit1hAXTRukqrtUtm4s=' OR
prev_auth_token = 'jXadm/bqoit1hAXTRukqrtUtm4s=' OR
(auth_token = '79d5348aea3bb8ac5959fd7111b6aab2' AND legacy)) AND rotated_at > '2017-01-15 16:53:10.447926') LIMIT 1
D, [2017-03-16T16:53:10.453363 #28998] DEBUG -- : User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 [["id", 2]]
D, [2017-03-16T16:53:10.458535 #28998] DEBUG -- : (0.7ms) SELECT "topic_embeds"."topic_id" FROM "topic_embeds" WHERE (lower(embed_url) = 'https://eb.c9.testserver.org:8081/eb-test.html')
I, [2017-03-16T16:53:10.462791 #28998] INFO -- : Rendered embed/loading.html.erb within layouts/embed (0.4ms)
I, [2017-03-16T16:53:10.465563 #28998] INFO -- : Completed 200 OK in 18ms (Views: 3.8ms | ActiveRecord: 2.6ms)
D, [2017-03-16T16:53:21.394249 #28998] DEBUG -- : Delivering messages [] to client 479de1be9ddd4bfaa056516290c6c3f2 for user 2 (chunked)
D, [2017-03-16T16:53:21.524814 #28998] DEBUG -- : UserAuthToken Load (0.6ms) SELECT "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((auth_token = 'jXadm/bqoit1hAXTRukqrtUtm4s=' OR
prev_auth_token = 'jXadm/bqoit1hAXTRukqrtUtm4s=' OR
(auth_token = '79d5348aea3bb8ac5959fd7111b6aab2' AND legacy)) AND rotated_at > '2017-01-15 16:53:21.522642') LIMIT 1
D, [2017-03-16T16:53:21.528688 #28998] DEBUG -- : User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 [["id", 2]]
D, [2017-03-16T16:53:21.531643 #28998] DEBUG -- : (0.5ms) SELECT "groups"."id" FROM "groups"
D, [2017-03-16T16:53:21.534225 #28998] DEBUG -- : Delivering messages [] to client 479de1be9ddd4bfaa056516290c6c3f2 for user 2 (chunked)

The page stays at "Loading Discussion" and except for the recurrent "Failed to execute postMessage" errors on the JS console, no additional change is visible.

One additional weirdness which may be relevant:
The Discourse logo visible on the page cannot be clicked through, as it links to http://localhost:3000. The JS error that results is:

Mixed Content: The page at 'https://eb.c9.testserver.org:8081/eb-test.html' was loaded over HTTPS, but requested an insecure resource 'http://localhost:3000/'. This request has been blocked; the content must be served over HTTPS.

The message is expected given the http link, but one would think that the link should match the discourseURL parameter in the embed script.

Posts: 3

Participants: 2

Read full topic

My forum is crashing every two hours

$
0
0

@kamcc wrote:

I have a self-hosted Discourse on a DO droplet that has been running smoothly for the past 6 months, and then today has been crashing every two hours or so. Everything is up to date as far as I know, so I'm not really sure how to best go about troubleshooting. Any help would be greatly, greatly appreciated!!

I haven't gotten any errors in my site logs since early this morning, even though the forum has crashed a few times since then.

I did get this early this morning: Job exception: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

with backtrace:

 /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.3/lib/redis/client.rb:121:in `call'
    /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.3/lib/redis.rb:494:in `block in del'
    /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.3/lib/redis.rb:58:in `block in synchronize'
    /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.3/lib/redis.rb:58:in `synchronize'
    /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.3/lib/redis.rb:493:in `del'
    /var/www/discourse/lib/discourse_redis.rb:192:in `block in del'
    /var/www/discourse/lib/discourse_redis.rb:146:in `ignore_readonly'
    /var/www/discourse/lib/discourse_redis.rb:190:in `del'
    /var/www/discourse/lib/distributed_mutex.rb:24:in `ensure in synchronize'
    /var/www/discourse/lib/distributed_mutex.rb:25:in `synchronize'
    /var/www/discourse/lib/scheduler/manager.rb:294:in `lock'
    /var/www/discourse/lib/scheduler/manager.rb:247:in `tick'
    /var/www/discourse/config/initializers/100-sidekiq.rb:35:in `block (2 levels) in <top (required)>

Redis logs:

LOG:  duration: 787.213 ms  execute <unnamed>: SELECT COUNT(*) AS count_all, DATE(created_at) AS date_created_at FROM "email_logs" WHERE "email_logs"."skipped" = 'f' AND (created_at BETWEEN '2017-02-16 00:00:00.000000' AND '2017-03-16 23:59:59.999999') GROUP BY DATE(created_at)  ORDER BY DATE(created_at)
2017-03-16 17:54:20 UTC [397-2] discourse@discourse LOG:  duration: 132.612 ms  execute <unnamed>: SELECT COUNT(*) FROM "email_logs"
2017-03-16 17:56:14 UTC [127-1] discourse@discourse LOG:  duration: 131.163 ms  statement: UPDATE posts
	                SET avg_time = (x.gmean / 1000)
	                FROM (SELECT post_timings.topic_id,
	                             post_timings.post_number,
	                             round(exp(avg(ln(msecs)))) AS gmean
	                      FROM post_timings
	                      INNER JOIN posts AS p2
	                        ON p2.post_number = post_timings.post_number
	                          AND p2.topic_id = post_timings.topic_id
	                          AND p2.user_id <> post_timings.user_id
	                      GROUP BY post_timings.topic_id, post_timings.post_number) AS x
	                WHERE (x.topic_id = posts.topic_id
	                  AND x.post_number = posts.post_number
	                  AND (posts.avg_time <> (x.gmean / 1000)::int OR posts.avg_time IS NULL)) AND (posts.topic_id IN (SELECT id FROM topics where bumped_at > '2017-03-14 17:56:14.249910'))
50:M 16 Mar 17:58:33.081 * 10 changes in 300 seconds. Saving...
50:M 16 Mar 17:58:33.093 * Background saving started by pid 4883
4883:C 16 Mar 17:58:35.217 * DB saved on disk
4883:C 16 Mar 17:58:35.229 * RDB: 44 MB of memory used by copy-on-write
50:M 16 Mar 17:58:35.326 * Background saving terminated with success
50:M 16 Mar 18:03:36.028 * 10 changes in 300 seconds. Saving...
50:M 16 Mar 18:03:36.033 * Background saving started by pid 5220
5220:C 16 Mar 18:03:39.632 * DB saved on disk
5220:C 16 Mar 18:03:39.636 * RDB: 43 MB of memory used by copy-on-write
50:M 16 Mar 18:03:39.736 * Background saving terminated with success

Posts: 7

Participants: 4

Read full topic

Watching and sending notifications for keywords?

$
0
0

@Tyler_Langlois wrote:

I have a use case that I think is pretty common, but haven't been able to find an existing feature either here or in Discourse itself that fits the feature I'll describe.

Essentially I have the need to get notified for new topics that could potentially span more than one category for specific keywords. My use case is the Elastic forums at https://discuss.elastic.co/ wherein I want to get notified about any topic that includes the string puppet, which can come up in the Elasticsearch category, Kibana category, et cetera.

Right now I'm using a script an Elastic employee wrote to capture these, but I've spoken to multiple non-technical people who have a similar need, so it feels like encapsulating this functionality in Discourse proper or a plugin seems like an apt fit.

Is there a feature I'm overlooking that could provide this, is it too specific for native integration, or is this something that would be worth doing?

Posts: 6

Participants: 5

Read full topic

Send e-mail to inactive users

$
0
0

@PatrickH wrote:

Is it possible to automaticly send an email to an inactiv user after 1 month. Then if they have not ben active for 3 months this account (lets say with a minimum of 1 post in 3 months) will be deleted.

Thanks for your help.

Posts: 2

Participants: 2

Read full topic

How to best use Discourse to discuss a very structured document

$
0
0

@WayneGraves wrote:

I have a document that contains a Preamble and 24 principles in 4 sections. People need to be able to comment on the phrasing of the major sections as well as comment on the phrasing of each principle and comment on the paragraphs under each principle.

I am not sure how to structure this within the "Category" and "Topic" model.

Posts: 3

Participants: 3

Read full topic


Staff Whispers - Not Working

$
0
0

@Ralphy wrote:

Hello, I have enabled staff whispers but it doesn't show up when I go to private chat in the topic I click on the "gear" icon and nothing appears reguarding whispers.

Posts: 2

Participants: 2

Read full topic

Should all plugins be cloned as the `discourse` user?

Uploaded emojis lost with last update?

$
0
0

@Steven wrote:

On two forums I host, I've had an issue, all emojis uploaded on admin panel were lost. They were still on the FTP but seemed to have disappeared on the database.

Here is the version where it happened : Discourse 1.8.0.beta7 - https://github.com/discourse/discourse version 61a7162c01daf22d0f759a4c5d4e0974776fab0d

I reuploaded emojis on the two forums and the issue disappeared (for now), and I don't see anything relevant on /logs page

Meta Discourse doesn't seem to be affected, so I should notice that for these two forum use a custom plugin based on this one : https://github.com/discourse/discourse-emoji

(I use it to organize flags, so they are not mixed with gifs or meme)

Is it something you've been aware of ?

Posts: 2

Participants: 2

Read full topic

A question about user_auth_tokens

$
0
0

@eriko wrote:

I see since the last time that I looked that users can have more than one auth token. Is this effectively one token per device/browser combination or is it something else?

Also is it possible to sent this auth token to the SSO service? This would facilitate login out of the central authority triggering a log out of discourse in the device/browser that logged out.

Posts: 5

Participants: 2

Read full topic

Self Link previews not working for private site

Viewing all 60721 articles
Browse latest View live




Latest Images