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

Separating Plugin Settings from Site Settings

$
0
0

Corey Robertson wrote:

So any plugin client settings get jammed into a big object amongst all of the other site settings. Every plugin will have to use unique setting names if this is to be the case.

Instead, what if we move plugin settings out of site settings completely, and instead register PluginSettings? Add a Plugin top level nav item in the admin settings that will be similar to Site Settings, but only list all of the plugins there. Bonus is that the site settings Left Nav won't get any longer as you add plugins.

Then, instead of asking for your plugin settings like

Discourse.SiteSettings.mySettings

you could do

Discourse.PluginSettings[:myPlugin].mySetting.

Any thoughts on this? I'd love to work on it if it's a direction we want to go.

Posts: 1

Participants: 1

Read full topic


Batch Delete topics in a category?

$
0
0

Scott Schaffter wrote:

How feasible would it be to have a "select all" or check box for each topic in a category to run some action on - ie move, or delete?

The problem comes if you need to delete a bunch of posts or re-categorize them, it gets complicated / time consuming to do it for each topic.

Am I missing some bulk action? Is this on the road map?

Posts: 7

Participants: 5

Read full topic

Facebook|Google|Twitter login broken with ssl - return to port 80

$
0
0

Michael Jonker wrote:

Version 0.9.8.4 'Master' - This other post was left due to the then 'experimental' status of SSL, but sums up my problem.

Continuing the discussion from Cannot log in with google|twitter|github after adding SSL:

I am experiencing exactly the same problem.

  • I followed the standard Ubuntu install instructions, so Ruby does not have Passenger compiled.
  • I have forced port 443 in 'developers' settings.
  • I have tried too many permeatations in Nginx settings to keep track of smile

Here is my present discourse.conf:

types {
    text/csv                    csv;
}

upstream discourse {
  server unix:/var/www/discourse/tmp/sockets/thin.0.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.1.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.2.sock;
  server unix:/var/www/discourse/tmp/sockets/thin.3.sock;
}


map $http_x_forwarded_proto $thescheme {
  default $scheme;
  https https;
}
server {
	listen 80;
	server_name forum.limerickspring.com;
	return 301 https://$host$request_uri;
}
server {

  listen 80 default_server;
  listen 443 default_server default ssl;
  ssl_certificate /etc/nginx/ssl/ssl-unified.crt;
  ssl_certificate_key /etc/nginx/ssl/server.key;
  gzip on;
  gzip_min_length 1000;
  gzip_types application/json text/css application/x-javascript;

  server_name server_name_;

  sendfile on;

  keepalive_timeout 65;

  client_max_body_size 2m;

  set $public /var/www/discourse/public;

  location / {
    root $public;

    location ~* \.(eot|ttf|woff|ico)$ {
	    add_header Access-Control-Allow-Origin *;
	    expires 1y;
        add_header Cache-Control public;
	}

    location ~ ^/assets/ {
      expires 1y;
      add_header Cache-Control public;
      add_header ETag "";
      break;
    }

    location ~ ^/uploads/ {
      expires 1y;
      add_header Cache-Control public;
      add_header ETag "";
      location ~ /stylesheet-cache/ { try_files $uri =404; }
      location ~* \.(gif|png|jpg|jpeg|bmp|tif|tiff)$ { try_files $uri =404; }
      location ~ /_optimized/ { try_files $uri =404; }
      proxy_set_header X-Sendfile-Type X-Accel-Redirect;
      proxy_set_header X-Accel-Mapping $public/=/downloads/;
      proxy_pass http://discourse;
      break;
    }

    try_files $uri @discourse;
  }

  location /downloads/ {
    internal;
    alias $public/;
  }

  location @discourse {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


    proxy_set_header X-Forwarded-Proto $thescheme;
    proxy_set_header Host $http_host;

    proxy_pass http://discourse;
  }

}

The initial call to FB|Google|Twiiter works and I can enter my login - it is the callback that is always going to port 80:

Any help please, or should I go back to an unsecure forum on port 80 for the immediate?

Posts: 5

Participants: 2

Read full topic

Rebooted Digital Ocean Server, then couldn't restart bluepill and all all hell broke loose

$
0
0

thepractice wrote:

Continuing the discussion from Problem during initialization:

OK, here's the background. I wanted to change some words in the client.en.yml file. So I edited that file and the changes didn't appear on my site. Then I read that rebooting the server (VPS) would help show changes so I rebooted my Digital Ocean VPS with "sudo reboot". In retrospect this was very dumb.

After the server reboot, I reloaded nginx and reloaded bluepill per the instructions in the official ubuntu install guide. This has worked for me in the past when I took a snapshot of my Digital Ocean droplet, which involves shutting down server. However, it did not work for me this time. That is, my 502 Bad Gateway error page remained even after reloaded nginx and typing the commands to reboot bluepill.

I did some investigating. My nginx error log showed "no live upstreams while connecting to upstream". My tmp/sockets directory was empty; I think it should have had some files like thin.0.sock.

So I decided to fix my problems by doing the update process described in the Ubuntu install guide. I checkout the master branch, stash my local changes (client.en.yml, discourse.conf, database.yml), git pull, then "git stash pop" to get my local changes back. Then I enter this command:

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake db:migrate

And I get the "fe_sendauth: no password supplied" error message.

"No problem," I'm thinking because I got this message upon this command before when upgrading from 9.7.9. Back then, I fixed the problem by resetting psql 'discourse' user password and editing config/discourse.conf to look like:

# username accessing database
db_username = discourse

# password used to access the db
db_password = my_password

Also I had changed etc/postgresql/9.1/main/pg_hba.conf so that "all" users use md5 method instead of peer, like so:

local   all             all                                     md5

I had known this approach was working because the error message from running rake changed to FATAL: password authentication failed for user "discourse".

Back to my present problem. In the updating process, when I run the rake:db migrate command, I always get the "fe_sendauth: no password supplied" error message, no matter what I do. My database.yml is stock/default. My config/discourse.conf has the db_username and db_password lines uncommented and properly filled out, as shown above. I tried with and without quotation marks around the password. I tried editing the pg_hba.conf file so that "all" users have "trust" method. I even tried editing production.rb to override global default user_name and password settings.

Nothing works, and I'm stuck with "fe_sendauth: no password supplied" error message upon trying to rake:db migrate.

Any help would be greatly appreciated blush

Posts: 5

Participants: 2

Read full topic

Group activity stream jumps to top when loading more

Pulling persona out of Discourse core

$
0
0

Sam Saffron wrote:

FYI, I am pulling out the code to support persona for a few reasons.

  1. It is unmaintained and broken at the moment.
  2. It uses a different pipeline and series of hacks we don't use in any of the other auth providers
  3. The omniauth gem we use is a fork of omniauth-browserid (should really be called omniauth-persona)

I would love to include it by default if the implementation was not so hacky and did not depend on so many structural changes.

So, instead of adding it to core, lets get it in a self contained plugin first and decide based on that if we add it back to core.

see also:


cc

@mozCallahad @lloydhilaiel

Posts: 2

Participants: 1

Read full topic

CDN used by Discourse is blocked by Websense for Gaming

$
0
0

cpradio wrote:

Jeff (@codinghorror),

You've helped us with our sandbox over at SP, but one thing has come up that will greatly affect my interaction with Discourse, the CDN used for our sandbox is http://scdn-discourse.r.worldssl.net. I understand the purpose behind it, but it is causing a problem with Websense, in that Websense marked it as a Gaming classification and thus the company I work for, blocked it.

This means the page doesn't render at all (well I could probably turn off JS and it would; but that doesn't really help me out too much). Is there a setting that allows us to customize the CDN used with the Discourse installation?

Is there anything that would be beneficial to tell our IT Security department that would place them at ease with reclassifying scdn-discourse.r.worldssl.net? My thoughts are, the CDN by itself shouldn't really release anything malicious to our company as the high level domain is likely also classified as Gaming on those particular sites they want to block.

Your thoughts?

Posts: 3

Participants: 2

Read full topic

Bluepill setup problem

$
0
0

kousps wrote:

Hi,

I'm stuck at a issue here.

I followed both the below links simultaneously to install the software one is a Visual one (Video) of the other:

https://github.com/discourse/discourse/blob/master/docs/INSTALL-ubuntu.md

# Official Discourse Install Guide

## Recommended Server Hardware

- 2 GB of RAM
- 2 GB of swap
- 2 processor cores

With 2 GB of memory and dual cores, you can run two instances of the thin server (`NUM_WEBS=2`), and easily host anything but the largest of forums.

1 GB of memory, 3 GB of swap and a single core CPU are the minimums for a steady state, running Discourse forum – but it's simpler to just throw a bit more hardware at the problem if you can, particularly during the install.

## Install Ubuntu Server 12.04 LTS with the package groups:

Yes, you can in theory pick the distro of your choice, but to keep this guide sane, we're picking one, and it's Ubuntu. Feel free to substitute the distro of your choice, the steps are mostly the same.

![screenshot of package group selection screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20software%20selection.png)

* Basic Ubuntu server
* OpenSSH server
* Mail server
* PostgreSQL database (9.1+)

You may be working on an already-installed or automatically deployed system, in which case you can install them afterwards:

    # Run these commands as your normal login (e.g. "michael")
    sudo apt-get update && sudo apt-get -y upgrade
    sudo tasksel install openssh-server
    sudo tasksel install mail-server
    sudo tasksel install postgresql-server

### Configure the mail server:

![screenshot of mail server type configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_1%20system%20type.png)

In our example setup, we're going to configure as a 'Satellite system', forwarding all mail to our egress servers for delivery. You'll probably want to do that unless you're handling mail on the same machine as the Discourse software.

![screenshot of mail name configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_2%20mailname.png)

You probably want to configure your 'mail name' to be the base name of your domain. Note that this does not affect any email sent out by Discourse itself, just unqualified mail generated by systems programs.

![screenshot of relay host configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_3%20relayconfig.png)

If you have a mail server responsible for handling the egress of email from your network, enter it here. Otherwise, leave it blank.

## Additional system packages

Install necessary packages:

    # Run these commands as your normal login (e.g. "michael")
    sudo apt-get -y install build-essential libssl-dev libyaml-dev git libtool libxslt-dev libxml2-dev libpq-dev gawk curl pngcrush imagemagick python-software-properties

    # If you're on Ubuntu >= 12.10, change:
    # python-software-properties to software-properties-common

## Caching: Redis

Redis is a networked, in memory key-value store cache. Without the Redis caching layer, we'd have to go to the database a lot more often for common information and the site would be slower as a result.

Be sure to install the latest stable Redis, as the package in the distro may be a bit old:

    sudo apt-add-repository -y ppa:rwky/redis
    sudo apt-get update
    sudo apt-get install redis-server

## Web Server: nginx

nginx is used for:

* reverse proxy (i.e. load balancer)
* static asset serving (since you don't want to do that from ruby)
* anonymous user cache

At Discourse, we recommend the latest version of nginx (we like the new and
shiny). To install on Ubuntu:

    # Run these commands as your normal login (e.g. "michael")
    # Remove any existing versions of nginx
    sudo apt-get remove '^nginx.*$'

    # Add nginx repo to sources.list
    cat <<'EOF' | sudo tee -a /etc/apt/sources.list

    deb http://nginx.org/packages/ubuntu/ precise nginx
    deb-src http://nginx.org/packages/ubuntu/ precise nginx
    EOF

    # Add nginx key
    curl http://nginx.org/keys/nginx_signing.key | sudo apt-key add -

    # install nginx
    sudo apt-get update && sudo apt-get -y install nginx

## Install Ruby with RVM

### RVM : Single-user installation

We recommend installing RVM isolated to a single user's environment.

## Discourse setup

Create Discourse user:

    # Run these commands as your normal login (e.g. "michael")
    sudo adduser --shell /bin/bash --gecos 'Discourse application' discourse
    sudo install -d -m 755 -o discourse -g discourse /var/www/discourse

Give Postgres database rights to the `discourse` user:

    # Run these commands as your normal login (e.g. "michael")
    sudo -u postgres createuser -s discourse
    # If you will be using password authentication on your database, only
    # necessary if the database will be on a remote host
    sudo -u postgres psql -c "alter user discourse password 'todayisagooddaytovi';"

Change to the 'discourse' user:

    # Run this command as your normal login (e.g. "michael"), f
This file has been truncated. show original

http://blog.discourse.org/2013/06/discourse-on-ubuntu-video-walkthrough/

From the link "https://github.com/discourse/discourse/blob/master/docs/INSTALL-ubuntu.md";, I was able to go on until the step "Bluepill setup", where I was stopped by the following error:

renoqq@server:~$ sudo su - discourse
discourse@server:~$ cd discourse/
discourse@server:~/discourse$ gem install bluepill
Fetching: daemons-1.1.9.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/local/rvm/gems/ruby-2.0.0-p247/cache/daemons-1.1.9.gem

Posts: 2

Participants: 2

Read full topic


Server error with handcrafted mailto: link

$
0
0

Michael Brown wrote:

The following handcrafted link makes Discourse puke and die with a 500 on posting:

Michael Brown [&lt;michael.brown@discourse.org&gt;](mailto:michael.brown@discourse.org?subject=Your%20post%20at%20http://try.discourse.org/t/discussion-happens-so-much/127/1000?u=supermathie)

Posts: 1

Participants: 1

Read full topic

Possible to get a login button on 404 page?

$
0
0

Shiv Kumar wrote:

Also, maybe add to the error message since the page could exist and you may not have been deleted, but you just need to login to view the page because it's a private category. Since this page does not seem to be served via Ember, we can't just override it and customize as needed.

Posts: 5

Participants: 2

Read full topic

What's the best way to add global Javascript code?

$
0
0

Roy Guo wrote:

I found the CUSTOM CSS is super awesome and easy to use. So I wonder if there's any place to add Javascript code in the admin panel ?

If there's not, what the recommended way to add Javascript code ? I want to add some code looks like this:

window.onload = function(){
          // do something cool.
    };

Posts: 2

Participants: 2

Read full topic

Searching for the categories by description

$
0
0

Ronteras wrote:

Current method of category choosing while creating the topic includes two methods: by scrolling down the list or typing in the search field, which is amazing. What about extending the search capability and also include the category descriptions?

If category "hosting" has the words in description like "servers", "cloud" and so on, then typing these words in the search field also will show the hosting category.

This feature could be beneficial for the large forums with lots of categories.

p.s. Discourse fantastic search feature needs more love smiley.

Posts: 1

Participants: 1

Read full topic

Scroll position is no longer being maintained when navigating to a topic

User panel popup could use a border

Introduce w3m theme


Markdown swallowing first leading spaces in preformatted block

Help text on num_flags_to_block_new_user settings seems little ambiguous

Some Ideas for Spam Control

$
0
0

David Kobia wrote:

I'm already getting plenty of spam on a discourse install. Based on experience with running a vB forum with over 100K members, I thought I'd give a few thoughts...

  • Current spam control is slightly naive. It doesn't scale very well when you get into thousands of members. Spammers will often have a whole bunch of accounts, and usually have the time and effort to keep on creating new accounts to spam, even if it's only once per account.
  • A hook to stopforumspam.com and akismet need to be built in by default. They don't catch everything, but at least they reduce the spam. Its easier to deal with 5 spam posts than 500.
  • Spammers originate in a few countries - Vietnam, Pakistan, China, India, Nigeria, Morrocco, etc. That said, it'd be nice to be able to block/moderate/approve posts from specific IP's. Hell, it'd be nice to just be able to ban an ip address. A more advanced ip blocker would allow you to block an ip address range.
  • I get that the forum is javascript, which prevents canned/bot type spam... but like I said before, some spammers have nothing but time to do this over and over every single day.
  • I'm thinking of building GeoIP into my nginx to just block specific countries. To not be too overly heavy handed, I might just block them from posting -- but they'll be able to view posts. This is much, but I'd rather not deal with spam (sorry china). I'll post my nginx (or apache) config for this when I get it done. This reduced the spam on my vB forum quite significantly.
  • A really good method I've found to work is just 'muting' the offenders. This way they can post all they want but no one ever sees their posts except the administrator. This prevents them from creating new accounts. No one wants to play the cat-and-mouse game.
  • One needs to really engage the community to help with flagging -- much of the time though, community members would rather email to complain than click the flag button.

Some of this stuff might already be built in -- but I just couldn't find it.

Posts: 14

Participants: 7

Read full topic

Web Accessibility testing

$
0
0

Ted Strauss wrote:

While attempting to evangelize Discourse I received this response:

Can you tell me how accessible this platform is? The Discourse web
site, as well, as the developer site, does not seem to have any info
about accessibility standards that I can find, and I see it is
optimized for specific browsers and devices, which is always a bit
problematic in general. While these platforms offer great features,
they often present real problems for people with disabilities,
especially those using assistive technologies...

I know that this topic has been raised before, but I decided to run Discourse through a few online tools for accessibility and will report the outcomes here.

Posts: 10

Participants: 3

Read full topic

Download Archive of My Posts Implementation

$
0
0

Duke wrote:

Hey All,

I'm working with an undergraduate software engineering team to implement a function on Discourse. @codinghorror suggested as a starting point to implement the "download archive of my posts" to start by making a post here.

Does anybody have any tips or guidance involving this project?

Posts: 1

Participants: 1

Read full topic

Viewing all 60642 articles
Browse latest View live


Latest Images