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

Any way to suppress INVITE button on posts?

$
0
0

@tobiaseigen wrote:

We don't like the INVITE functionality and have been encouraging members to use the :link: feature to invite people by grabbing the link and share it via message or email or social media or whatever. It's not possible to disable the INVITE feature for staff/moderators, unfortunately, and some forget to not use it. Is there a way to suppress it, perhaps using a css customization? Would be grateful for guidance if so.

Another solution would be to disable the button also for staff/moderators if max invites per day is 0.

Posts: 9

Participants: 2

Read full topic


Question about a community with sub cohort groups

$
0
0

@ShelleyWebb wrote:

Hi,

I am the R.N.and community manager for the Discourse diabetes community that we are just beginning. Within the community, we would like to have cohort groups which will consist of individuals joining the 16-week long diabetes prevention program at different times. So there will always be new cohort groups being added.

I imagine that each of these cohort groups will be a separate category. But then, will the topics (which will actually be the same for each group, just offered at separate times) need to be added separately to each cohort group? We will have general topics in the lobby as well.

Also, I am concerned that this platform may be too techy for the general public. Does anyone have any feedback about that?

Thanks very much,

Posts: 2

Participants: 2

Read full topic

Watching categories is not trigering emails

$
0
0

@zavala wrote:

We just launched our instance of Discourse on June 1st. Although we have asked members to Watch certain topics and can confirm that they have done so, many of them are not receiving emails for new topics.

In testing:

  • we have activated the Mailing list function but this sends emails for categories they are not watching.
  • I can confirm they have the "Send emails even when I visit" option checked
  • There is some indication that if we enable Mailing list mode, get emails, and then disable mailing list mode, things start working as expected. It's hard to test thoroughly enough without spamming our users.

Any suggestions?

What else can we do to make sure members are getting emails for new topics in categories they are watching?

Posts: 7

Participants: 3

Read full topic

How to use application route actions in template/components?

$
0
0

@stevenpslade wrote:

:wave: In discourse/app/assets/javascripts/discourse/routes/application.js.es6 there is this action:

composePrivateMessage is the action that triggers the composer to write a private message. I am trying to access this action from a component template:

{{action "composePrivateMessage" user}}

In the js for this component I am trying something like this:

export default Ember.Component.extend({
  tagName: 'div',
  layoutName: 'components/custom-fields-data',
  classNameBindings: ['custom-fields'],
  actions: {
    composePrivateMessage(user) {
      composePrivateMessage();
    }
  },

This does not work, which does not come as a surprise. :unamused: Do I need to inject the application route or something to have access to the application route's actions?

Posts: 2

Participants: 1

Read full topic

Vertical Timeline problem

$
0
0

@Slowhand wrote:

I'm a Moderator at the www.animenetwork.com, and yesterday we received the update to the Vertical Timeline.

It's all good when there are enough posts to make the timeline appear, however, when there are only 1-2 posts, it isn't there.

Example

My problem is that the wrench icon that appears above the Vertical Timeline only appears below the posts.

Timeline with Wrench Icon

When I use the lower Wrench Icon, the menu opens at the top and I'm unable to select/click on what I want.

Menu misplacement

Any suggestions?

Posts: 5

Participants: 3

Read full topic

Do categories scale?

$
0
0

@cappslock wrote:

Hi! I'm new to Discourse and evaluating it for a client who is interested in using it as the backend for a commenting system (we can't use the front-end, because reasons).

For our use case, we might want to generate a large number of categories (say, in the hundreds of thousands). I'm wondering if, at the API level, this is expected to scale.

Posts: 2

Participants: 2

Read full topic

Upgrading from v1.5 to v1.6

$
0
0

@BerryBlue wrote:

I'm unable to upgrade my discourse. When I try from the website I get this message.

Upgrades via the web UI are disabled until you run the latest image.

To do so log in to your server using SSH and run:

cd /var/discourse
git pull
./launcher rebuild app

When I try that I get this error message.

ERROR: Docker version 1.2.0 not supported, please upgrade to at least 1.8.0, or recommended 1.8.0

Posts: 9

Participants: 4

Read full topic

Importing Xenforo to Discourse

$
0
0

@Cyb3r wrote:

Hey guys so after trying for a week or so I decided to import the database on docker app which I hoped it will succeed without any issues. TBH I got some issues at first but it turned to be all easy to solve.

Now I would recommend doing this only once before you deploy your production site, after importing everything take a Discourse backup, wipe everything out and install new Discourse instance then restore the imported db.

Ok let's begin;

  1. First lets backup your old database from your old server, sign in to your Discourse server then:
    ssh USER@XENFORO_SERVER_IP # Use -p argument to specify custom port
    mysqldump -u XENFORO_DATABASE_USER -p XENFORO_DATABASE_NAME > xen_db.sql
    exit

  2. After installing Discourse start the app:
    ./launcher start app

  3. Now lets pull the database backup from xenforo server:
    scp USER@XENFORO_SERVER_IP:~/xen_db.sql /var/discourse/shared/standalone/xen_db.sql
    # If you changed the ssh port use -P argument
    scp -P 2222 USER@XENFORO_SERVER_IP:~/xen_db.sql /var/discourse/shared/standalone/xen_db.sql

  4. Login to docker machine, install and start mysql:
    docker exec -it app bash
    sudo apt-get update
    sudo apt-get upgrade
    # During the installation you will be asked to set a root password for mysql
    sudo apt-get install mysql-server mysql-client libmysqlclient-dev
    service mysql start

  5. Login to mysql and create new database:
    mysql -u root -p
    # Enter your mysql root password then
    create database xenforo_db;
    exit;

  6. Import your xenforo database into the new one:
    mysql -u root -p xenforo_db < /shared/xen_db.sql
    # Enter your mysql root password and wait until it finish

  7. Install mysql2 gem:
    gem install mysql2

  8. Include the gem in discourse Gemfile:
    echo "gem 'mysql2'" >Gemfile

  9. Run bundle install:
    bundle install --no-deployment

  10. Edit the importer script and change the following:
    vi /var/www/discourse/script/import_scripts/xenforo.rb
    XENFORO_DB = "xenforo_db"
    @client = Mysql2::Client.new(
    host: "localhost",
    username: "root",
    password: "Your mysql root password",
    database: XENFORO_DB
    )

  11. You are set to go now, run the importer:
    bundle exec script/import_scripts/xenforo.rb

  12. If you get the error 'Peer authentication failed for user "discourse"'
    Edit the file /etc/postgresql/9.5/main/pg_hba.conf
    change all 'peer' to 'trust' and save the file
    restart postgres server: service postgresql restart

Run the importer again and this time it should work without any problem, be patient this might take a while based on your database size.

Hope this helps someone. :slight_smile:

Posts: 1

Participants: 1

Read full topic


Search shortcut opens Quick Find on Firefox

$
0
0

@P16 wrote:

Not sure if this has been covered before, but pressing / to open the search box on Discourse also opens Quick Find on Firefox. Can we change the key to something else?

Posts: 4

Participants: 3

Read full topic

Adding an offline page when rebuilding

$
0
0

@fefrei wrote:

When Discourse is rebuilding or starting up, your users will usually either see an error message from their browser...

...or a not-so-nice 502 error message from Nginx:

If you're a perfectionist like me, you'll probably find that unacceptable. Fortunately, fixing this is quite straightforward – so let's dive right in!

In this howto, I'll use discourse.example.com as the domain Discourse is running on – simply replace it with your domain whenever you see it.

If you're already using HTTPS and have it set up inside the container (you are using web.ssl.template.yml and possibly web.letsencrypt.ssl.template.yml), this howto will move your SSL setup out of the Docker container into Nginx running on the host, and request a new certificate from Let's Encrypt. This is necessary because we need SSL to work even when Discourse is rebuilding its Docker container or otherwise unavailable. This will break auto-renewal, so you'll need to manually renew every three months or set up auto-renewal on the host.

Set up nginx

If we want nicer error messages, we'll need to set up a front-end server that usually forwards all requests to Discourse, but injects our error message when it cannot reach Discourse. This howto uses nginx as the front-end server.

:bell: If you've already set up nginx on your host (for example to run other websites on the same machine as Discourse), you can skip this section and continue with the next one.

To clear up ports for nginx, we must first tell Discourse to listen on a socket, not on the normal ports:

cd /var/discourse
nano containers/app.yml

Comment out the lines with web.ssl.template.yml and templates/web.letsencrypt.ssl.template.yml if they are in use (we'll set up HTTPS on the host later on), add

  - "templates/web.socketed.template.yml"

as the last line in the templates: section, and comment out all ports from the expose: section.

Here's how it should look:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"
  - "templates/web.socketed.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  #- "80:80"   # http
  #- "443:443" # https

When you're done, save the file, exit and run this:

./launcher rebuild app

If all went well, Discourse will be unreachable because it is now only listening on the local socket. Don't worry, we'll soon fix that!

Next, install nginx:

apt-get update
apt-get install nginx

Let's add a place to host local web content, and then edit the default Nginx default configuration file:

mkdir /var/www
nano /etc/nginx/sites-available/default

Add HTTPS

While we're here, we'll configure Nginx to redirect all requests to HTTPS, and to allow requesting a free certificate from letsencrypt:

server {
        listen 80; listen [::]:80;
        server_name discourse.example.com;  # <-- change this

        location /.well-known/acme-challenge/ {
                root /var/www;
        }

        location / {
                return 301 https://$host$request_uri;
        }
}

Apply the changes with

service nginx reload

Now we can set up Let's Encrypt and get a certificate. If you are running Ubuntu 16.04 or later, you can use the official package:

apt-get update
apt-get install letsencrypt
letsencrypt certonly --webroot -w /var/www -d discourse.example.com

For other operating systems you'll need to get certbot installed manually and issue the cert that way:

mkdir /var/letsencrypt
cd /var/letsencrypt
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto
certbot-auto certonly --webroot -w /var/www -d discourse.example.com

Any errors? Did you get your certificate? If so, let's proceed!

:alarm_clock: You must set a reminder run to letsencrypt renew before your cert expires in three months. For tips on automating this, see the certbot documentation.

Let's edit the Nginx config again to add HTTPS support:

nano /etc/nginx/sites-available/default

The old server block in the file needs to stay – it redirects all your users to HTTPS. We need to add a new server block:

server {
  listen 443 ssl;  listen [::]:443 ssl;
  server_name discourse.example.com;  # <-- change this

  ssl on;
  ssl_certificate      /etc/letsencrypt/live/discourse.example.com/fullchain.pem;
  ssl_certificate_key  /etc/letsencrypt/live/discourse.example.com/privkey.pem;

  ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:10m;

  add_header Strict-Transport-Security "max-age=63072000;";
  add_header X-Frame-Options DENY;
  add_header X-Content-Type-Options nosniff;
  ssl_stapling on;
  ssl_stapling_verify on;

  client_max_body_size 0;

  location / {
    proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

:warning: Remember to modify the site name and paths as needed above. If you modified the volumes: section of your app.yml, you'll also need to change the proxy_pass line.

Let's reload the config we just changed:

service nginx reload

Your site should now be back up, securely over HTTPS. :tada:

:bell: We recommend that you run https://www.ssllabs.com/ssltest/ on your site to verify that your https settings are secure and safe.

Create an error page

Next, you'll have to design an error page to show when Discourse is offline. Let's create a path for it.

mkdir /var/www/errorpages
  • If you're a talented designer, feel free to build a beautiful page yourself, and share it here!
  • If you need to use external resources like images, load them from /errorpages/.
  • I recommend that you include <meta http-equiv="refresh" content="120"> in your page – this will refresh the page every 120 seconds, which means that Discourse will load automatically once it's available again.
  • Name your main HTML file discourse_offline.html, and place all files in /var/www/errorpages/.

If you're happy with a page made by an untalented designer, you can simply steal my design instead :blush:

discourse_offline.html (1.9 KB)
d-logo-sketch.png (14 KB)
sob.png (1 KB)

Once you're done, edit the Nginx config to serve the page you just created:

nano /etc/nginx/sites-available/default

Simply add

location /errorpages/ {
    alias /var/www/errorpages/;
}

to the HTTPS server section of your nginx config, and then reload.

service nginx reload

Test by visiting https://discourse.example.com/errorpages/discourse_offline.html in your browser – you should see your new error page :no_entry:

Serve your error page

Finally, we'll set up nginx to serve your error page when it cannot reach Discourse, or when Discourse isn't ready yet. Add the following lines to the location / block:

error_page 502 =502 /errorpages/discourse_offline.html;
proxy_intercept_errors on;

Apply your changes, as usual:

service nginx reload

If you want to test your settings, run

cd /var/discourse
./launcher stop app

to take your site offline and try to visit it:

Don't forget to run

cd /var/discourse
./launcher start app

afterwards so your Discourse is available again!

Posts: 11

Participants: 4

Read full topic

Blank Page after Upgrading

$
0
0

@anandm09 wrote:

I tried upgrading to newer version from admin panel. After completion of the process the site is showing only blank page.

I tried upgrading through shh and it shows this message

So I ran the command again, its complete but still the site is not showing anything.

Posts: 8

Participants: 4

Read full topic

Discourse-setup generates malformed YAML if password contains ':'

$
0
0

@csirac2 wrote:

During initial ./discourse-setup using 1475ee4554ba7895cf3410f6181bb96155c7b5b3 the DISCOURSE_SMTP_PASSWORD contained a full-colon character : which resulted in an error after pulling down the docker image:

(): mapping values are not allowed in this context at line 62 column 42 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

That was the final two lines of output from the script. I fixed app.yaml by simply quoting the DISCOURSE_SMTP_PASSWORD value.

./discourse-setup should probably be properly quoting all of these yaml responses anyway.

Posts: 3

Participants: 2

Read full topic

Is it possible to add other like buttons?

$
0
0

@Daonanda wrote:

Hi, I'm very new to Discourse. I have very little coding experience, so have so many questions. I will start with this question. Is it possible to add other "like" buttons. One forum I go to has a Hug and a Thank button and they are very useful to have and add variety.

Posts: 5

Participants: 2

Read full topic

I have dark background (image) I need white box

Accessing to the database from outside the container

$
0
0

@Chopper wrote:

How can i access to the database from ouside the container but in the same server (local)

I open the port in app.yml

expose:
  - "4002:5432" #postgres

Try to connect from outside with

psql -h 127.17.0.1 -p 4002 -d postgres -U postgres -p ''
psql: could not connect to server: Connection refused
        Is the server running on host "127.17.0.1" and accepting
        TCP/IP connections on port 5432?

What i'm missing ?

Posts: 2

Participants: 2

Read full topic


Weird behavior of the topic-progress with a customisation

$
0
0

@Steven wrote:

Since the arrival of the new gutter, the topic-progress has been a bit broken on my forum. It doesn't align well, on a reduced window or on mobile. It's always like that on the last post (and only the last post) :

After an intense 5 minutes investigation I found the source : I've added some ads on the </body> part of the Customize section :

<div align="center"><script type="text/javascript" src="http://tags.clickintext.net/**hidden**" title="Classic (IAB)"></script> <script type="text/javascript" src="http://tags.clickintext.net/**hidden**" title="Classic (IAB)"></script><br />
<a href="https://twitter.com/iunctisFR" class="twitter-follow-button" data-show-count="true" data-size="medium">Suivre @iunctisFR</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script><br />
<span style="color:#9a9a9a; font-size:9px; line-height:10px;">Régie publicitaire : ClickInText - <a href="http://iunctis.ovh" title="Service d'installation de Discourse">Installation de Discourse (service)</a> - <a href="http://iunctis.fr/about" title="À propos">À propos</a> - Ce site participe au Programme Partenaire amazon.fr</span><br />
</div>

The code is pretty simple but the topic progress seems to be impacted by the height of every element. If I add a 60 pixels ads + 12 pixels text line, the topic progress was "pushed up" by 72 pixels.

When I use the Footer part of the customisation, the topic progress is no longer broken. But I can't use scripts there.

Also, It seems kinda out of the forum, before that I think it was inside the box. If you know what I mean :

But I'm not 100% sure about that part. But it makes me think It might not be related to the topic-progress, but more a <body> issue

Posts: 1

Participants: 1

Read full topic

A list of server-side functions for weekend/novice Discourse developers?

$
0
0

@tarek wrote:

Hello friends,

This topic may belong in #dev. Apologies if it is misplaced.

I am trying to develop a patch to core that will allow for certain added functionality. I have found the relevant function in the relevant file to make my changes, however I am unsure of how to access information that is in the function.

What I would like is to access the email address of the user who posted the topic that the function is being accessed on.

Here is the code snipet, found in line 148 of lib/email/message_builder.rb:

      if allow_reply_by_email?
    result['X-Discourse-Reply-Key'] = reply_key
    result['Reply-To'] = "test1@test.com"
    result['CC'] = reply_by_email_address
  else
    result['Reply-To'] = from_value
  end

I want to replace test1@test.com with the email address of the author of the topic.

I have found some documentation on API that seems very relevant, but no "list of functions" as such. I don't believe that what I'm looking for is called a "hook", and the list of hooks doesn't appear relevant.

I understand that my question comes out of an incompetence in Rails programming, and I plan on studying Rails more over time. In PHP programming, which I am familiar with, I am able to access this information using some debugging tool like XDebug for PHP where I can 'stop' the code and see what variables are accessible. I haven't figured out how to use such a tool for Rails yet.

Thank you for any suggestions on how to develop.

Posts: 2

Participants: 2

Read full topic

Plugin repos missing license info

$
0
0

@wolftune wrote:

I'm not sure where to post this, as it seems Discourse doesn't use GitHub issues. I'm sure it's possible to track issues inside Discourse itself.

Anyway, these repos should have a LICENSE file even though the README mentions the license:

And these are missing any reference to a license, so that really should be fixed:

There may be others, but I noticed those mainly.

Posts: 2

Participants: 2

Read full topic

Postgres using 100% of CPU

$
0
0

@MiG wrote:

Hi there, I'm seeing an issue on my docker install. It's on Linode on Ubuntu 14.04.

Postgres is using 100% of the CPU. The forum itself is working just fine, version v1.6.0.beta7 +156. Doesn't seem any slower or anything.

Here's a screen capture from "htop":

Any pointers on how I can diagnose this and remedy it?

I've tried rebuilding with ./launcher rebuild and even cleaning up with ./launcher clean. I've tried rebooting the server as well.

I have plenty of disk space left (10GB free), and Discourse is the only thing running on this server.

Thanks in advance for any pointers.

Posts: 8

Participants: 3

Read full topic

Unlisted/Listed Icon Reversed

Viewing all 60642 articles
Browse latest View live




Latest Images