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

Discourse with Nginx proxy | error

$
0
0

@john3 wrote:

Hi,

I followed both the ways:

https://www.digitalocean.com/community/tutorials/how-to-install-discourse-behind-nginx-on-ubuntu-14-04

and

But still it doesn't work. I can't start nginx if app is running because of ports. if I stop app and run nginx, I can't start app.

Docker error:
Handler for POST /v1.24/containers/app/start returned error: driver failed programming external connectivity on endpoint app (ed67a2541b0a12676ee025b661ee166f0de96b62f420007c88ecdc62f15d7302): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use

my APP.YML:

my Nginx configuration file for my domain.

any help?

Posts: 3

Participants: 2

Read full topic


Integrating aweber newsletter signup with forum registration

$
0
0

@alwayslookright wrote:

Is there a way to connect aweber or another emailing service with the forum registration or would I need to develop this myself? Are there any similar plugins or features made for other email services?

Posts: 5

Participants: 2

Read full topic

SSL_connect SYSCALL on e-mail confirmation message

$
0
0

@TDR150 wrote:

Hello!

I am new to Discourse and have just recently installed it on my server. I'm using an external SMTP provider for sending e-mails and have verified to 100% that the input credentials in the configuration file are correct.

However, upon sending the message I get this error in the production log:

Job exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A

I need help pinpointing where it breaks (as google results are difficult to relate to Discourse). Is this something related to the server side regarding SSL or is it an error on the SMTP provider's part? What actions should I take? I have set TLS to true and my SMTP provider supports this.

Thanks for your help!

Posts: 2

Participants: 2

Read full topic

Facebook SSO Restricted Domain

$
0
0

@Richard_Mohorovich wrote:

Hello,

For me to be able to join a first year university facebook group I had to have a verified email with the university domain.

Is there a way to do Facebook SSO such that only facebook users with a verified email of a specific domain can join a forum?

Posts: 5

Participants: 2

Read full topic

Import GitHub image as profile image when authenticating with GitHub

$
0
0

@ossia wrote:

User story: As a new user, when I authenticate with GitHub, my profile image should automatically become whatever my GitHub profile image is.

According to @codinghorror this is not currently on the roadmap. I am not 100% sure whether this should be a plugin or an option in available in Discourse. It sounds like a plugin would be the faster route, unless this is a feature that other admins would benefit from.

previous discussion on this topic

CC @michaelhenderson

Posts: 2

Participants: 2

Read full topic

Lock username to GitHub username when authenticating using GitHub

$
0
0

@ossia wrote:

User story: As a new user, when I authenticate with GitHub, my username is automatically set to whatever my GitHub username is, and I cannot change it unless I change my username on GitHub.

The reason this would be helpful is that our open source community, Free Code Camp, uses GitHub authentication for our website, Gitter chat, and our Discourse. We want to maintain a consistent identity across all three of these services (plus GitHub itself) for convenience and consistency.

This could be rolled into the same package as https://meta.discourse.org/t/import-github-image-as-profile-image-when-authenticating-with-github/49132

CC @michaelhenderson

Posts: 4

Participants: 3

Read full topic

Unable to customize invalid email domain message

Sorting topics in tag intersection pages are not working


Overrule translations for certain words only

$
0
0

@kgish wrote:

I would like to use different translations for certain words only.

Rather than having to edit the default yaml file, is it possible to provide another list which overrules only those words that I include in this list?

Posts: 1

Participants: 1

Read full topic

Oddly high RAM usage with Discourse?

$
0
0

@Cosmopath wrote:

Hi, I'm running a virtual private server with Discourse installed through Ubuntu 16.04 LTS. Right now there's no traffic (there's probably two or three people on the site right now for beta testing) and the RAM usage for the server is already at 1.85GB. I'm running a server with only 2GB of RAM in it and I fear that when the site actually gets traffic the RAM will completely max out and the server will crash or severely slow down. Is this something to be worried about? I only have Discourse and Docker installed.

Posts: 3

Participants: 2

Read full topic

Install on machine with existing Nginx and SSL

$
0
0

@helmi wrote:

Hey there,

I have an existing machine with nginx and SSL running (also for the domain that is supposed to use discourse later).

I found quite some hints about how to proxy to discourse through nginx but none of the approaches this from a fresh installation. As ./discourse-setup basically doesn't even start when port 80 is in use already I'm a bit lost when it comes to changing the app.yml that isn't yet created.

I'm sure I can create it from the bottom up but I don't know how.

Any guide to follow along for this case?

Thanks

Posts: 5

Participants: 2

Read full topic

Broken Discourse

Large Backup Upload to S3 Failing

$
0
0

@dphrag wrote:

Backups are working, but my upload to S3 is failing. It is definitely not an authorization issue, as it is only large backups. When I backup without files (about 42MB) the backup uploads to S3 as expected.

Including files is about 4GB, and I get the following error log:

[2016-08-24 17:19:14] Gzipping archive, this may take a while...
[2016-08-24 17:23:17] Executing the after_create_hook for the backup...
[2016-08-24 17:24:07] **EXCEPTION: multipart upload failed: The provided 'x-amz-content-sha256' header does not match what was computed.**
[2016-08-24 17:24:07] /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.3/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:81:in `abort_upload'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.3/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:70:in `upload_parts'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.3/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb:44:in `upload'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.3/lib/aws-sdk-resources/services/s3/file_uploader.rb:32:in `upload'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.3/lib/aws-sdk-resources/services/s3/object.rb:251:in `upload_file'
/var/www/discourse/lib/s3_helper.rb:30:in `upload'
...

Any ideas what the issue might be? I'm on version v1.7.0.beta2 +137

Thanks!

Posts: 1

Participants: 1

Read full topic

How to filter out staff forum topics from latest.json?

$
0
0

@Webtrend wrote:

When I use the "All Users" API key, the latest.json has all the restricted topics under staff category. Is there a way to filter them out?

I guess I can use an API key created for a standard user but I really don't want the users to have API access at this point.

Posts: 2

Participants: 2

Read full topic

PRs and granularity

$
0
0

@pfaffman wrote:

Say, hypothetically, after several days of ugly hacking, I've made a bunch of elegant changes to mbox.rb . Things like

  • BUG: make topic post be the first message in thread rather than the last
  • FEATURE: replace email addresses in posts with @username
  • UX: made it clearer where the script looks for files
  • UX: improved error checking and reporting
  • FEATURE: added gsubs to "correct" bogus email addresses (to probably wrong, but legal addresses)
  • FEATURE: add optional code to import user bios from external database
  • FIX: remove only [LISTNAME] from Subjects, not all [bracketed text]
  • FEATURE: set default trust_level on imported users

(Whether comments and top-of-file constants are UX is debatable.)

These are all in a separate branch with a bunch of commits, some of which actually have descriptive commit strings and changed something small. I still need to pull back out stuff that doesn't belong in core (e.g., gsubs that fixed address problems in only my data set). All of the changes are in a single file (plus maybe one or two tobase.rb) and this is just an import script, not affecting installed instances.

What do I do now? Return to master and retrace my steps to add in pieces to individual branches as if I knew what I was doing when I started? Submit the whole thing and let someone else sort it out? Something in between? Is there some git magic that would make the process easier?

Posts: 6

Participants: 3

Read full topic


How to reliably identify a troll with suspected multiple user accounts?

$
0
0

@ljpp wrote:

Surprise, surprise, our community has a troll.

Our troll is using a mobile connection, instead of a land line, and thus his IP-address is ever changing, constrained only by the operators IP pool. We have already suspended couple of his user accounts, and now I suspect he is back with a third. Unfortunately I don't have rock solid technical proof that this is the same guy, even though he has similar agenda, writing style and IP-range of the previous accounts.

So if IP is useless, is there any other ways for me to investigate and identify that this new user is the very same we have suspended before, with a reasonable level of certainty?

Could/should Discourse cookie-tag registered users to improve chances of detecting dupe accounts? Cellular 4G broadbands are very popular nowadays, so old school IP-based method does not do the trick anymore.

Posts: 5

Participants: 4

Read full topic

Access-Control-Allow-Origin is there, but isn't working!

$
0
0

@Olivier_Lambert wrote:

Hey, I've submited my post too soon. Here's the full post


Hey guys!

I'm working on a discourse project where I have a discourse install alongside a wordpress install.

So I've got "forum.latranchee.com" and "www.latranchee.com".

Everything works fine.

However, I'd like to have the same top nav on both sites. That way, users could see their notifications whilst reading a blog post per say.

So I'm trying to load the top nav through an ajax load() request. However, I get this error:

XMLHttpRequest cannot load https://forum.latranchee.com/.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://www.olivierlambert.ca' is therefore not allowed access.
The response had HTTP status code 403.

I've added this in my nginx server block:

add_header 'Access-Control-Allow-Origin' https://www.latranchee.com;
add_header 'X-Frame-Options' https://www.latranchee.com;

And I've changed my app.yml file as to include this:

DISCOURSE_ENABLE_CORS: true
DISCOURSE_CORS_ORIGIN: '*'

Here is the complete server block from my nginx.config:

	server {
		listen 80; listen [::]:80;
		listen 443 ssl;
		server_name forum.latranchee.com;

		add_header 'Access-Control-Allow-Origin' https://www.latranchee.com;
		add_header 'X-Frame-Options' https://www.latranchee.com;

		ssl_certificate /etc/nginx/ssl/ssl.crt;
        ssl_certificate_key /etc/nginx/ssl/ssl.key;

        if ($scheme = http) {
        	return 301 https://$server_name$request_uri;
    	}

		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;
		}
	}

Any tips would be greatly appreciated!

Posts: 3

Participants: 2

Read full topic

What drives the "trending posts" list?

$
0
0

@Kate wrote:

Question on the "Trending Topics" list -- the same posts have appeared in the list since our initial implementation of Discourse. There doesn't appear, to the naked eye anyway, to be any correlation with the number of views, the number of likes, or the number of replies. What is driving the posts appearing on that list?

Posts: 2

Participants: 2

Read full topic

Write Ember Acceptance and Component Tests for Discourse

$
0
0

@eviltrout wrote:

Automated tests are a great way to protect your code against future regressions. Many people are familiar with how to do this in our Rails codebase with rspec, but the Javascript side can be somewhat of an enigma to some.

Fortunately, it’s pretty easy these days to add basic tests to your Ember code!

Component Tests

In the previous tutorial in this series we added a component called fancy-snack to display our snack with a fading background. Let’s write a test for it. Create the following file:

test/javascripts/components/snack-test.js.es6

import componentTest from 'helpers/component-test';

moduleForComponent('fancy-snack', {integration: true});

componentTest('test the rendering', {
  template: '{{fancy-snack snack=testSnack}}',

  setup() {
    this.set('testSnack', {
      name: 'Potato Chips',
      description: 'Now with extra trans fat!'
    });
  },

  test(assert) {
    assert.equal(this.$('.fancy-snack-title h1').text(), 'Potato Chips');
    assert.equal(this.$('.fancy-snack-description p').text(), 'Now with extra trans fat!');
  }
});

To run the test, open your browser on your development server to /qunit?module=component%3Afancy-snack. Your browser will them perform the component tests and output something like “2 assertions of 2 passed, 0 failed.”

Note that while on the /qunit page you can run other tests. You can simply select a new test from the Module dropdown box at the top of the screen.

Let’s step through the test to understand how it works.

The template line tells Ember how we’d like to insert our component. It’s the exact same markup you’d use to place the component in a handlebars template so it should be familiar:

template: '{{fancy-snack snack=testSnack}}’,

Note that it is passing testSnack through as the snack parameter. That is defined in the setup() method:

setup() {
  this.set('testSnack', {
    name: 'Potato Chips',
    description: 'Now with extra trans fat!'
  });
},

I’ve just put in some dummy data. That’s all we need to do to have Ember render the component. Finally, we have a couple of assertions in the test() method:

test(assert) {
  assert.equal(this.$('.fancy-snack-title h1').text(), 'Potato Chips');
  assert.equal(this.$('.fancy-snack-description p').text(), 'Now with extra trans fat!');
}

If you use this.$() you get access to a jQuery selector in your template. The assertions here use that selector to grab the value of the snack’s title and snack’s description and compare them with what we expect. If the values match then the assertions will pass and our test is all working.

It’s worth noting that you don’t need to test every little thing in a component like this. You should use some discretion and try to figure out what things in your code are likely to break or cause confusion to other developers down the road. If you test too many things in your template, it will mean it’s a pain for someone else in the future to change it. Just start small, testing the most obvious things, and in time you’ll get the hang of it.

Acceptance Tests

Acceptance tests are often easier to write, and can be more powerful than component tests as they test your application the same way a user would in their browser. I often start with acceptance tests, and then if I am making a complicated component I’ll add tests for it too.

Here’s how we can write an acceptance test that will visit our /admin/snack route and confirm that the snack was rendered:

test/javascripts/acceptance/snack-test.js.es6

import { acceptance } from "helpers/qunit-helpers";
acceptance("Snack");

test("Visit Page", function(assert) {
  visit("/admin/snack");
  andThen(() => {
    assert.ok(exists('.fancy-snack-title'), 'the snack title is present');
  });
});

The test() in this case almost reads like English! The first command says visit the URL of /admin/snack. After that, there is an andThen() method. This method is necessary to make sure that all the background work is finished before the tests continue. Since Javascript and Ember code is asynchronous, we need to make sure Ember is done everything it needs to do before our assertions are executed. Finally, it tests to see if the .fancy-snack-title element is present.

However, if you run this test by visiting /qunit?module=Acceptance%3A%20Snack you’ll find that the test will fail, due to an AJAX error.

If you recall, our code includes both a Rails side and a Javascript side which performed an AJAX request to get its data. The acceptance test ran the Javascript side, but it didn’t know what to do to get its data from Rails.

To fix this, we need to add a fake response, using the excellent pretender library. Open up the test/javascripts/helpers/create-pretender.js.es6 file and look for the line that says:

this.get('/admin/plugins', () => response({ plugins: [] }));

Right below it, add a line to return a fake snack object for our acceptance test to work with:

this.get('/admin/snack.json', () => {
  return response({ name: 'snack name', description: 'snack description' });
});

You can read the above code as "for any request to /admin/snack.json, respond with the following response."

If you refresh the URL /qunit?module=Acceptance%3A%20Snack, your acceptance test should retrieve its data via pretender and the tests should pass.

Where to go from here

You might try building out a small feature, and adding tests to make sure it works. You could even try using TDD by creating your tests before you write any code on the front end. Depending on what you’re working on and your personal preferences, you might find this a more enjoyable way to go about this. Good luck and happy coding :slight_smile:

Posts: 1

Participants: 1

Read full topic

Better Documentation of tabs in Admin > Customize > CSS/HTML?

$
0
0

@mackk wrote:

Hi all -- I'm curious if someone can clarify for me the tabs in Admin > Customize > CSS/HTML?

Here's a screen shot of them:

So there's:
* CSS
* Header
* Top
* Footer
* < /head>
* < /body>
* Embedded CSS

Can someone clarify for me their definitions and usage?

I've successfully added the custom nav bar to my installation that I wanted, but it was mostly through trial and error and I would like to understand what this customize panel is really capable of!

Posts: 5

Participants: 4

Read full topic

Viewing all 60642 articles
Browse latest View live




Latest Images