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

Setup issue: dig command not found

$
0
0

@cbhp wrote:

Console output during setup:

Checking your domain name . . .
./discourse-setup: line 32: dig: command not found

Installing dnsutils fixed it, but discource could check the dependency :slight_smile:

Posts: 8

Participants: 3

Read full topic


SSO with non-unique email addresses?

$
0
0

@cbhp wrote:

Is it possible to use Discourse with SSO and email addresses which are not unique?
That means users have multiple accounts with different usernames but same email addresses.

Posts: 5

Participants: 3

Read full topic

Plugin: add a menu icon (next to search)

Badges not being granted for restricted categories

$
0
0

@schungx wrote:

I have a strange behavior on my forum. Basic badges (such as first like, first emoji etc.) that should be grated to users are not granted. Only admin users are granted these badges, while normal users are not.

So for example, I can login as a normal user, and like as many posts as I want, and use as many emoji’s as I like, but I still won’t see the “First Like” and “First Emoji” badges.

Thing is, there are certain early users that successfully got these badges. But recently all new users won’t get them.

I wonder if it has something to do with some settings that I’ve changed. Can somebody point me to a direction to check?

Posts: 13

Participants: 4

Read full topic

Override global Sass variables from theme

$
0
0

@LeoMcA wrote:

Continuing the discussion from Cleaning up our color palette :art::

Themes already have the ability to define sass variables:

However, from personal testing, these seem to be local to the theme’s stylesheets, and won’t globally override a variable.

If they did it would prove incredibly useful for theme development, as it would allow the theme to specify exactly what colour should be used as $primary-medium, $tertiary-low and so on - rather than have it automagically calculated off of the colour scheme.

Perhaps there should be a scope option, something like this:

"fields": {
  "primary-medium": {
    "value": "#012345",
    "type": "color",
    "scope": "global"
  }
}

Posts: 3

Participants: 2

Read full topic

HTML tags in plaintext digest when missing a translation

$
0
0

@Phyks wrote:

Hi,

I subscribed to digests on Discourse instances and read my emails in plaintext. Huge :+1: for having a really usable and readable plaintext version!

However, I recently discovered that some HTML tags were present in the digests when server lacks some translations. For instance, consider the unsubscribe link from the digest, translation is here, but is not available in the French locale.

Resulting email has following content in plaintext:

<span class="translation_missing" title="translation missing: fr.user_notifications.digest.unsubscribe">Unsubscribe</span>

with the unsubscribe link reference below. I would have expected it to be something like

Unsubscribe [3]

(where [3] is the reference of the unsubscribe link at the bottom of the email body).

Thanks!

Posts: 4

Participants: 2

Read full topic

Hide Details applies separately

$
0
0

@SidV wrote:

This bug has to be re-open: Hide Details applies separately to each paragraph.

Reproduction

  1. Write several lines of text (separate with linebreak)
  2. Choose all the lines.
  3. Click Hide Details.
  4. PROFIT

Tested here, right now:

Summary

Paragraph 1: text text and more text

Summary

Paragraph 2: text text and more text

Summary

Paragraph 3: text text and more text

Summary

Paragraph 4: text text and more text


I checked the PR that solved this bug before, and I think it’s a regression.
Check this out: https://github.com/discourse/discourse/pull/4499/files cc. @tgxworld

Posts: 2

Participants: 2

Read full topic

Adding a new provider to discourse-chat-integration

$
0
0

@David_Taylor wrote:

discourse-chat-integration abstracts away the boilerplate for integrating Discourse with external chatroom systems. There are three features which a provider implementation can support: Notifications, Slash Commands and Transcripts.

There are two ways you can add a provider: in your own plugin, or by submitting a pull request to discourse-chat-integration. This post will detail the latter, but most of the information will work in either scenario.

Adding Notification Support :bell:

  1. In the Provider folder, create a new folder with the name of your chatroom system: e.g. hipchat
  2. Create a new ruby file, following the format hipchat_provider.rb
  3. Within that, define a new module inside DiscourseChat::Provider. The name of the module must end in Provider for it to be loaded correctly. Your module must define three constants:
    • PROVIDER_NAME: A string used to reference your provider internally. It shouldn’t contain any whitespace. It will likely be the same as the folder name
    • PROVIDER_ENABLED_SETTING: A symbol referencing a site setting used to enable/disable this provider. Make sure you define it in the plugin’s settings.yml file.
    • CHANNEL_PARAMETERS: An array of hashes defining what data your provider needs about each channel. This might be a URL, a username, or some kind of ‘Channel ID’. Each hash should specify the parameters
      • key: the key you will use to reference the data later
      • regex: the regular expression used to validate the user-provided value. This is checked both on the client and the server. For example, to only allow non-whitespace characters, you could use ^\S+$
      • unique: (optional) set this to true to stop users creating more than one channel with the same value for this parameter
      • hidden: (optional) set this to true to hide this parameter from the list of channels. It will always be shown in the “Edit Channel” modal.
  1. Your module must also define the function self.trigger_notification(post, channel). Inside this function you should write code to actually send the notification to your chat system. This will vary based on the provider, but will generally consist of sending a RESTful request to their API. Try looking at the implementations of existing providers to help you.
  2. Make sure to handle errors returned by your provider’s API. You should raise a DiscourseChat::ProviderError, and optionally specify a (client side) translation key which gives information about the error. This will be displayed in the admin user interface against the current channel. You can specify additional objects in the info hash, which will be included in the site’s logs.
  3. To make sure Discourse loads your ruby file, you should add a require_relative line to the bottom of provider.rb.

You should end up with something that looks like this:

module DiscourseChat::Provider::HipchatProvider

  # This should be unique, and without whitespace
  PROVIDER_NAME = "hipchat".freeze

  # Make sure the referenced setting has been added to settings.yml as a boolean
  PROVIDER_ENABLED_SETTING = :chat_integration_hipchat_enabled

  CHANNEL_PARAMETERS = [
                        { key: "name", regex: '^\S+' }, # Must not start with a space
                        { key: "webhook_url", regex: 'hipchat\.com', unique: true, hidden: true }, # Must contain hipchat.com
                        { key: "color", regex: '^(yellow|green|red|purple|gray|random)$' } # Must be one of these colours
                       ]

  def self.trigger_notification(post, channel)

    # Access the user-defined channel parameters like this
    webhook_url = channel.data['webhook_url']
    color = channel.data['color']

    # The "post" object can be used to get the information to send
    title = post.topic.title
    link_url = post.full_url

    # Post.excerpt has a number of options you can use to format nicely before sending to your chat system
    # Most of the time, you'll want remap_emojis to convert discourse emojis to unicode
    excerpt = post.excerpt(400, text_entities: true, strip_links: true, remap_emoji: true)

    # Make an API request to your API provider
    # This might be useful: http://www.rubyinside.com/nethttp-cheat-sheet-2940.html

    # Parse the response to your API request, and raise any errors using the DiscourseChat::ProviderError
    error_key = 'chat_integration.provider.hipchat.invalid_color'
    raise ::DiscourseChat::ProviderError.new info: {error_key: error_key}

  end
end

Translation keys

In client.en.yml, you should specify a title for your provider, titles & help information for any parameters, and any error keys that you’re using when raising a DiscourseChat::ProviderError. For example:

en:
  js:
    chat_integration:
      provider:
        hipchat:
          title: "HipChat"
          param:
            name:
              title: "Name"
              help: "A name to describe the channel. It is not used for the connection to HipChat."
            webhook_url:
              title: "Webhook URL"
              help: "The webhook URL created in your HipChat integration"
            color:
              title: "Color"
              help: "The colour of the message in HipChat. Must be one of yellow,green,red,purple,gray,random"
          errors:
            invalid_color: "The API rejected the color you selected"

You should make sure to also provide translations for any site settings you have created. There is no need to define any server-side translations, unless you’re using them in your self.trigger_notification implementation

Adding Slash Command Support :speech_balloon:

Coming soon…

Adding Transcript Posting Support :scroll:

Coming soon…

Posts: 1

Participants: 1

Read full topic


[PAID-job] Adding buttons in composer toolbar

$
0
0

@nixie wrote:

Hi,

Currently below is what we have in the toolbar:
image

I’d like to add 10 buttons to the composer toolbar.

I can supply:

  1. The code that should be inserted when we press each of the 10 newly added buttons.
  2. The icon for the 10 newly added buttons.

Example:
I’m trying to do exactly what is mentioned here:

But I don’t want to do it myself.
I want someone experienced to help me with this.

Payment:
I don’t have any upper limit.
Experienced members - please let me know - and lets get started immediately.

Posts: 1

Participants: 1

Read full topic

Can't sign in as admin user (undefined method `username' for nil:NilClass)

$
0
0

@almone wrote:

I’m having an issue with logging in as admin user.
I made a clean Vagrant install according to this guide.
Now when I try to log in I’m getting 500 Internal Server Error.

Here are log records:

I, [2017-08-16T13:50:13.258735 #14047]  INFO -- : Started GET "/" for 10.0.2.2 at 2017-08-16 13:50:13 -0400
D, [2017-08-16T13:50:14.494951 #14047] DEBUG -- :   UserAuthToken Load (1.5ms)  SELECT  "user_auth_tokens".* FROM "user_auth_tokens" WHERE ((auth_token = 'St0sllamsnLV2NjCPEschUDeDzQ=' OR
                          prev_auth_token = 'St0sllamsnLV2NjCPEschUDeDzQ=' OR
                          (auth_token = '4716df97e4a99a37b3d9b8a8f34af626' AND legacy)) AND rotated_at > '2017-06-17 17:50:14.492802') LIMIT 1
D, [2017-08-16T13:50:14.505749 #14047] DEBUG -- :   User Load (2.7ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  [["id", 1]]
I, [2017-08-16T13:50:14.510414 #14047]  INFO -- : Processing by ListController#latest as HTML
D, [2017-08-16T13:50:14.527868 #14047] DEBUG -- :   UserOption Load (1.0ms)  SELECT  "user_options".* FROM "user_options" WHERE "user_options"."user_id" = 1 LIMIT 1  [["user_id", 1]]
D, [2017-08-16T13:50:14.534377 #14047] DEBUG -- :   UserVisit Load (1.3ms)  SELECT  "user_visits".* FROM "user_visits" WHERE "user_visits"."user_id" = 1 AND "user_visits"."visited_at" = '2017-08-16' LIMIT 1  [["user_id", 1], ["visited_at", Wed, 16 Aug 2017]]
D, [2017-08-16T13:50:14.553588 #14047] DEBUG -- :   SQL (3.5ms)  UPDATE "users" SET "last_seen_at" = '2017-08-16 17:50:14.509563' WHERE "users"."id" = 1  [["id", 1]]
D, [2017-08-16T13:50:14.560300 #14047] DEBUG -- :    (3.9ms)  SELECT categories.id FROM "categories" LEFT OUTER JOIN "uploads" ON "uploads"."id" = "categories"."uploaded_logo_id" LEFT OUTER JOIN "uploads" "uploaded_backgrounds_categories" ON "uploaded_backgrounds_categories"."id" = "categories"."uploaded_background_id" WHERE "categories"."read_restricted" = 't'  [["read_restricted", true]]
D, [2017-08-16T13:50:14.569177 #14047] DEBUG -- :   Category Load (4.5ms)  SELECT categories.*, t.slug topic_slug FROM "categories" LEFT JOIN topics t on t.id = categories.topic_id WHERE (NOT categories.read_restricted OR categories.id IN (2,3,4))  ORDER BY "categories"."position" ASC
D, [2017-08-16T13:50:14.580481 #14047] DEBUG -- :    (0.9ms)  SELECT "category_users"."category_id", "category_users"."notification_level" FROM "category_users" WHERE "category_users"."user_id" = 1
D, [2017-08-16T13:50:14.585194 #14047] DEBUG -- :    (1.4ms)  SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM "topics" WHERE ("topics"."deleted_at" IS NULL) LIMIT 16) subquery_for_count
D, [2017-08-16T13:50:14.591761 #14047] DEBUG -- :    (1.6ms)  SELECT "users"."id" FROM "users" INNER JOIN "user_auth_tokens" ON "user_auth_tokens"."user_id" = "users"."id" WHERE "users"."admin" = 't' AND (users.id > 0)  ORDER BY user_auth_tokens.created_at  [["admin", true]]
D, [2017-08-16T13:50:14.597011 #14047] DEBUG -- :   Topic Load (1.5ms)  SELECT  "topics".* FROM "topics" WHERE ("topics"."deleted_at" IS NULL) AND "topics"."slug" = 'welcome-to-discourse'  ORDER BY "topics"."id" ASC LIMIT 1  [["slug", "welcome-to-discourse"]]
D, [2017-08-16T13:50:14.602911 #14047] DEBUG -- :   User Load (1.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = -1 LIMIT 1  [["id", -1]]
D, [2017-08-16T13:50:14.608340 #14047] DEBUG -- :   CACHE (0.0ms)  SELECT COUNT(count_column) FROM (SELECT  1 AS count_column FROM "topics" WHERE ("topics"."deleted_at" IS NULL) LIMIT 16) subquery_for_count
D, [2017-08-16T13:50:14.613361 #14047] DEBUG -- :    (1.8ms)  SELECT "users"."id" FROM "users" INNER JOIN "user_auth_tokens" ON "user_auth_tokens"."user_id" = "users"."id" WHERE "users"."admin" = 't' AND (users.id > 0)  ORDER BY user_auth_tokens.created_at  [["admin", true]]
D, [2017-08-16T13:50:14.616927 #14047] DEBUG -- :   CACHE (0.0ms)  SELECT  "topics".* FROM "topics" WHERE ("topics"."deleted_at" IS NULL) AND "topics"."slug" = 'welcome-to-discourse'  ORDER BY "topics"."id" ASC LIMIT 1  [["slug", "welcome-to-discourse"]]
D, [2017-08-16T13:50:14.620538 #14047] DEBUG -- :   CACHE (0.0ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = -1 LIMIT 1  [["id", -1]]
I, [2017-08-16T13:50:14.624538 #14047]  INFO -- : Completed 500 Internal Server Error in 101ms (ActiveRecord: 26.5ms)
I, [2017-08-16T13:50:14.744330 #14047]  INFO -- :   Rendered /home.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.9/lib/action_dispatch/middleware/templates/rescues/_source.erb (9.6ms)
I, [2017-08-16T13:50:14.755912 #14047]  INFO -- :   Rendered /home.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.9/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (6.0ms)
I, [2017-08-16T13:50:14.765246 #14047]  INFO -- :   Rendered /home.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.9/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.5ms)
I, [2017-08-16T13:50:14.769481 #14047]  INFO -- :   Rendered /home.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.9/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (38.0ms)

And debug info:

Posts: 8

Participants: 2

Read full topic

Multiple cors origins on hosted discourse?

$
0
0

@kvz wrote:

Hi, hope I’m asking at the right place! We want to use a hosted (as in paid) discourse account and embed it on three sites to power their comment sections.

It is my understanding that I would need to whitelist 3 domains as cors origins which I’ve done like so: https://dl.dropboxusercontent.com/s/4zrqarqjln7qj8k/2017-08-16%20at%2020.16.png

It seems however upon some testing that only the first domain is returned: https://dl.dropboxusercontent.com/s/jctq7uejd8lbqbj/2017-08-16%20at%2020.22.png

It is my understanding that it’s not possible to return multiple origins in the cors header. In our company we’ve worked around that by checking the origin, and matching it against a short whitelist. If it occurs, we return that specific origin for the current request. That way multiple origins can indeed be supported.

Could this be something you’d be willing to support/implement or should we go for a self-hosted solution and hack around this? For one thing, I think the way the interface is now, you would expect it allows multiple origins.

Would be awesome if you’d consider this, as I’m looking forward very much to building a community for our open source projects with discourse! <3

Posts: 2

Participants: 2

Read full topic

Long Words not Wrapping in User Activity Page

$
0
0

@xrav3nz wrote:

Reproduction Steps:

  1. Bookmark this topic: Allow for pre-registration of fully activated accounts via API without user interaction

  2. Check your bookmarks page, and you will see something similar to:

Possible Root Cause

This page is styled using a table layout. I found this commit that removes display: table on the parent container but display: table-row / table-cell are still applied to the children. By default, The widths of the table and its cells are adjusted to fit the content, and thus the right side is wider than expected.

Possible Solutions

  1. Revert this commit and add table-layout: fixed, so that the content of the table cells will not affect the width of the table.

  2. Drop the table layout completely, and restyle this page with other CSS techniques. (maybe float? I confess I am no expert in CSS)

I’d be happy to PR this fix once we have decided a general direction.

Posts: 6

Participants: 3

Read full topic

How to automatically add staff color to moderator posts

$
0
0

@maniacalmorgan wrote:

Hi guys! I was just wondering if there was an easy way to auto add staff color to any mod/admin posts. Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Email Newsletter For Forum Members

$
0
0

@SimonNewman wrote:

Hello,

I currently run a fairly popular forum which has been established for quite a few years, I’m considering moving over to Discourse.

I’m wondering if there is an email newsletter function to Discourse? We currently run a weekly email newsletter which covers some of the weeks best topics, forum information, interesting articles ect through our current forum software. I wondered if this is possible through Discourse?

In an ideal world I’d like forum members to be automatically added to an outside email newsletter service such as Mailchimp or Aweber automatically on signup. (importing the email list weekly isn’t a good solution).

Does such a feature or extension exist that can do this?

Thanks in advance!

Posts: 5

Participants: 3

Read full topic

Installation complete but unable to access

$
0
0

@smota wrote:

Hi expert, I’ve follow the oficial method to install discourse.
Docker is ok, but when I type my address is unreachable.

What can I do.
image

Posts: 7

Participants: 3

Read full topic


My emoji icons don't show

$
0
0

@kgreed wrote:

I managed to install discourse. However when I add a topic and select an emoji :slightly_smiling_face: Only the text code for the emoji shows.
What am I doing wrong? Could it be a setting somewhere?
I see that emojis work here on the meta site so it is not something I am doing wrong when composing the message.
Here is my screen
Capture1708

Posts: 16

Participants: 3

Read full topic

The "Discourse as Your First Rails App" page has a broken encoding

Login with Social Media accounts

$
0
0

@needhelp wrote:

Can someone give me a quote how much this would cost?

Need someone to help me set up the forum so that people can login using their social media accounts such as FB, Twitter etc

BTW, is social media login the same thing as SSO?

Thanks

Posts: 3

Participants: 3

Read full topic

Open-Ended Polls?

$
0
0

@schungx wrote:

Currently polls are closed-ended, meaning that the choices are pre-determined.

Is there possible to have “open-ended” polls, with an extra choice allowing the user to add new suggestions? Something like an Others: line with a text-box that the user can enter new texts.

Posts: 1

Participants: 1

Read full topic

Discourse rebuild failed from 1.9.0.beta5 to 1.9.0.beta6

$
0
0

@hnaseri wrote:

I tried to upgrade discourse through admin panel but it failed. Then I tried to rebuild app, but it also failed. this is the error I get:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 472 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
6d40b1da8f558b32265be29c70519b17be3c3474c16f9139fcc329a2e6a6545f
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Posts: 4

Participants: 2

Read full topic

Viewing all 60642 articles
Browse latest View live




Latest Images