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

Does Discourse Docker automatically configure firewall too?

0
0

Aahan Krish wrote:

Does Discourse Docker automatically configure firewall too? If yes, what does it configure, iptables or ufw?

If no, which is recommended, iptables or ufw?

Posts: 1

Participants: 1

Read full topic


Discourse Docker forum installation inconsistent

0
0

Aahan Krish wrote:

Discourse Docker is acting weird. I follow the same Docker setup instructions to install Discourse each and everytime, but sometimes (post installation) the forum loads fine, sometimes it shows up blank--problem CORS.

I tried modifying app.yml like this:

[...]

env:

  [...]

  ##
  ## Cross-Origin Resource Sharing
  DISCOURSE_ENABLE_CORS: true
  DISCOURSE_CORS_ORIGIN: '*'

[...]

Still the same white screen. Looks like the CORS variables are not among current env variables for Discourse.

At the rist of repeating myself, the problem is, sometimes the installation is proper and the forum loads fine; most of the time the installation completes, but all I see is the white/blank screen (with CDN enabled, that is).

This seems to be the fix (see below -- credit to @sam), but then again, the problem is why do I need to take this route only sometimes? Why the inconsistency?

And oh, with CDN and SSL both enabled, it's pretty consistent. I always get to see the white/blank screen (unless the enable cdn js debugging option is unchecked).

Can these inconsistencies be fixed?


You may ask, Why are you installing Discourse so many times?

I am practicing; not in a dev environment or VirtualBox; but on a real 1GB VPS @ DigitalOcean.

Posts: 7

Participants: 2

Read full topic

Updating software resets Lounge security?

0
0

ampburner wrote:

Pretty simple:
- I changed the lounge security to 'everyone' can see, reply,etc.
- install discourse update via admin docker panel
- permissions for the lounge are reset to 'level 3'

Is the lounge some kind of built in system category that is defined inside the container? (and hence reset upon rebuild)

Posts: 4

Participants: 3

Read full topic

Design rationale document

0
0

Soviut wrote:

Discourse looks considerably different from the old PHPBB forums a lot of people are used to. When old forums are migrated to Discourse there's often grumbling from old users as they're subjected to change. This post, for example.

In order to mitigate as many of those potential complaints as possible, it might be worth creating a document or post that outlines the reasons for many of the design decisions made in Discourse. That way whenever anyone complains about, say, posts not being 100% width there's a place they can be directed to that explains why a fixed line length was chosen.

Some of these explanations are already outlined on @codinghorror's blog, but they're scattered and its unlikely that a user would read multiple articles when they're already irked.

Some points that could be addressed are:

  • Why a fixed line length?
  • Why use flat design?
  • Why no signatures?
  • Why is the avatar format the way it is?

Posts: 1

Participants: 1

Read full topic

PrettyText::JavaScriptError - horizRule when post text contains horizontal rule sequence

0
0

Dean Taylor wrote:

During an import I noted the following error when posts contained a sequence which could be interpreted as a horizontal rule.

e.g.

_____________

Or

>> -------

Full example post and backtrace can be found here:
https://gist.github.com/DeanMarkTaylor/a5aca089a0b56a819968

#<PrettyText::JavaScriptError: PrettyText::JavaScriptError>
at horizRule (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:785:46)
at Gruber.block.lists (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:1048:43)
at processBlock (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:246:31)
at toTree (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:281:22)
at blockquote (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:1115:35)
...

Posts: 2

Participants: 1

Read full topic

Easy way to change preformatted text (code) button?

0
0

BDub wrote:

On forums that are pretty software intensive, i.e., people posting lots of code... the preformatted text ctrl+k thing doesn't cut it. I'm constantly having to edit posts and do this technique:

Is there an easy way to just change this button to be the CODE button and default it to whatever makes sense for your community?

There is no amount of tutorials that can fix this problem... the problem is people look at the tools in front of them and the pick the one with CODE in it. Which turns out to be terrible for code unless you use it in a non-intuitive way.

For example... here's some code using preformatted text. Well, I say using it because the way people use it is they go and copy their code... then they click the preformatted text button. Then they paste their code. And it blows up like this:

// virtual members

include

using namespace std;

class Polygon {
protected:
int width, height;
public:
void set_values (int a, int b)
{ width=a; height=b; }
virtual int area ()
{ return 0; }
};

class Rectangle: public Polygon {
public:
int area ()
{ return width * height; }
};

class Triangle: public Polygon {
public:
int area ()
{ return (width * height / 2); }
};

int main () {
Rectangle rect;
Triangle trgl;
Polygon poly;
Polygon ppoly1 = &rect;
Polygon
ppoly2 = &trgl;
Polygon * ppoly3 = &poly;
ppoly1->set_values (4,5);
ppoly2->set_values (4,5);
ppoly3->set_values (4,5);
cout << ppoly1->area() << '\n';
cout << ppoly2->area() << '\n';
cout << ppoly3->area() << '\n';
return 0;
}


Now if you paste your code first... highlight it, and then click the preformatted text button it's much nicer:

// virtual members
#include <iostream>
using namespace std;

class Polygon {
  protected:
    int width, height;
  public:
    void set_values (int a, int b)
      { width=a; height=b; }
    virtual int area ()
      { return 0; }
};

class Rectangle: public Polygon {
  public:
    int area ()
      { return width * height; }
};

class Triangle: public Polygon {
  public:
    int area ()
      { return (width * height / 2); }
};

int main () {
  Rectangle rect;
  Triangle trgl;
  Polygon poly;
  Polygon * ppoly1 = &rect;
  Polygon * ppoly2 = &trgl;
  Polygon * ppoly3 = &poly;
  ppoly1->set_values (4,5);
  ppoly2->set_values (4,5);
  ppoly3->set_values (4,5);
  cout << ppoly1->area() << '\n';
  cout << ppoly2->area() << '\n';
  cout << ppoly3->area() << '\n';
  return 0;
}

However that's not intuitive either... so if you click the code button and get:

```cpp
// paste code here
```

Then it will look like this:

// virtual members
#include <iostream>
using namespace std;

class Polygon {
  protected:
    int width, height;
  public:
    void set_values (int a, int b)
      { width=a; height=b; }
    virtual int area ()
      { return 0; }
};

class Rectangle: public Polygon {
  public:
    int area ()
      { return width * height; }
};

class Triangle: public Polygon {
  public:
    int area ()
      { return (width * height / 2); }
};

int main () {
  Rectangle rect;
  Triangle trgl;
  Polygon poly;
  Polygon * ppoly1 = &rect;
  Polygon * ppoly2 = &trgl;
  Polygon * ppoly3 = &poly;
  ppoly1->set_values (4,5);
  ppoly2->set_values (4,5);
  ppoly3->set_values (4,5);
  cout << ppoly1->area() << '\n';
  cout << ppoly2->area() << '\n';
  cout << ppoly3->area() << '\n';
  return 0;
}

Ahh, so nice.

How can we make life easier for coders ? smile Thanks!!

Posts: 18

Participants: 4

Read full topic

Discourse on Packager.io repository

0
0

Aizan Fahri wrote:

Has anyone ever seen or bumped into this Packager.io before? When I was wandering around on the internet I found a project called Packager. What it does is that it packages the apps, for example, Discourse and GitLab, pre-compiling it and then it is readily available on the Packager's repository (in the sense that you can just install it with sudo apt-get install command). For example:

sudo apt-get install discourse

Isn't that cool?

I wonder if Discourse team has plan to simplify the install process as easy as this, I mean by having a PPA for Ubuntu users specifically to install Discourse without relying on Docker image. It would be a killer feature, no doubt.

Here's link to Discourse on Packager.io. By the way, the author of Packager.io did mention why he made Packager. Bet you wanna give it a read.

Posts: 7

Participants: 4

Read full topic

Some static content not being served by CDN

0
0

Aahan Krish wrote:

Some static content/files are not being served by CDN, these include (but maybe not only):

/images/default-favicon.ico
forum.example.com/uploads/default/*/*.ico (custom favicon)
forum.example.com/uploads/default/*/*.png (custom apple-touch-icon)
/images/default-apple-touch-icon.png
/uploads/stylesheet-cache/desktop_*.css
/uploads/stylesheet-cache/*.css?abcdefghijklmnopqrst (custom css)
/images/d-logo-sketch.png

These should be served by the CDN too, shouldn't they?

Posts: 1

Participants: 1

Read full topic


Processing hotlinked images error for constraint

0
0

Dean Taylor wrote:

I'm seeing the following error in the error logs after import:

PG::Error: ERROR: duplicate key value violates unique constraint "index_draft_sequences_on_user_id_and_draft_key"

Backtrace:
https://gist.github.com/DeanMarkTaylor/cf17366a160df00b8cc6

and this related exception:

exception: PG::Error: ERROR:  duplicate key value violates unique constraint "index_draft_sequences_on_user_id_and_draft_key"
DETAIL:  Key (user_id, draft_key)=(-1, topic_38679) already exists.
: INSERT INTO "draft_sequences" ("draft_key", "sequence", "user_id") VALUES ($1, $2, $3) RETURNING "id"
context: {"retry"=>true, "queue"=>"default", "class"=>"Sidekiq::Extensions::DelayedClass", "args"=>["---\n- !ruby/class 'Jobs::PullHotlinkedImages'\n- :delayed_perform\n- - :post_id: 311856\n    :bypass_bump: false\n    :current_site_id: default\n"], "jid"=>"a26e279dba6c645dc9c1fe32", "enqueued_at"=>1403402457.223576, "error_message"=>"PG::Error: ERROR:  duplicate key value violates unique constraint \"index_draft_sequences_on_user_id_and_draft_key\"\nDETAIL:  Key (user_id, draft_key)=(-1, topic_38679) already exists.\n: INSERT INTO \"draft_sequences\" (\"draft_key\", \"sequence\", \"user_id\") VALUES ($1, $2, $3) RETURNING \"id\"", "error_class"=>"ActiveRecord::RecordNotUnique", "failed_at"=>1403402760.840269, "retry_count"=>0}
backtrace: /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:827:in `get_last_result'

Backtrace:
https://gist.github.com/DeanMarkTaylor/0ee86cafd262fce926a5

Posts: 1

Participants: 1

Read full topic

Improved Group Members Management

0
0

Benjamin Kampmann wrote:

Following up on the bug that our Admin UI only shows up to 201 members for groups, I'd like to propose the following changes to Group-Admin interface.

allow group editing on user

First, allow direct editing of Groups on User-Admin-Interface (seriously, how is that still missing?):

Replacing the "primary group" feature with the select2-autosuggest for existing groups. I am still unsure about whether or not show the trust groups here, too (as they are not actually editable). And move the primary selection as a two-click select over the pre-selected groups in the into the controls area:


2. filter user list by group

This second part I am a little unsure about, but I am thinking that it makes more sense to separate Group-Management from Member-Management. And we already have a great area for showing lists of users (inclusive endless-loading), which is the users area. I'd just simply suggest making the search a little "smarter", by using something like document clouds virtualsearch approach for "filtering in the box". Technically I think we could also make those current existing filters ("new", "active", etc) part of that, but that can be a second step. Anyway, so using something like it, you'd be able to filter for groups, too:

With that in place, you'd drop the list of members from the group edit an only link to that search:


3. Handy actions for list

Now we can do something handy here, if we are in this filter mode. Like adding another "quick-remove-action"

Or add a "quick user add field" on top:

But I am not entirely sure this is the best way of handling that, here. I feel like this extends way beyond the scope of what the list is intended to be doing here. But I'd personally not like to add the list into the group view – I think the separation of members and group management makes a hell lot of sense and shouldn't be bound to the same "save" button.

Any suggestions?

Posts: 2

Participants: 2

Read full topic

Changing another users trust level from 0 to 3 causes theme customization to be lost

0
0

Dean Taylor wrote:

Changing another users trust level from 0 to 3 causes theme customization to be lost for that session.

Steps to reproduce:

  1. Log in as admin in site from the front page
  2. Note that the customized theme (custom CSS & header) are displaying
  3. Goto /admin/users/
  4. Select another user to change
  5. Note that the custom CSS & header is displayed.
  6. Change Trust Level from "0 - basic" to "3 - leader"
  7. Select the "green tick".

Actual Result:

  • No custom CSS & header displayed.

Expected Result:

  • Custom CSS & header changes to be displayed.

Posts: 6

Participants: 4

Read full topic

Number of schedule jobs not going down after backup / restore

0
0

Dean Taylor wrote:

Hi

I can confirm that this resolves the issue of the number of schedule jobs not going down after backup / restore.

This is still a bug.

Continuing the discussion from Number of scheduled jobs is near 2,000:

Posts: 1

Participants: 1

Read full topic

FB oauth -- not using the right SDK

Not all thin sockets being created

0
0

Brendan wrote:

I was looking at my nginx logs, and it was complaining about thin.2.sock and thin.3.sock not being available. I checked and they're not in discourse/tmp/sockets/ ... only thin.0.sock and thin.1.sock were created.

Yet, in the nginx config file, upstream defines 4 sockets (0-3). Is there somewhere else that I need to tell discourse to create the other sockets?

Posts: 4

Participants: 2

Read full topic

NoMethodError undefined method `>' check_reviving_old_topic

0
0

Dean Taylor wrote:

Seeing the following error in logs, looks like its from composing a reply.

NoMethodError (undefined method `>' for nil:NilClass)

Backtrace:

/var/www/discourse/lib/composer_messages_finder.rb:136:in `check_reviving_old_topic'
/var/www/discourse/lib/composer_messages_finder.rb:9:in `find'
/var/www/discourse/app/controllers/composer_messages_controller.rb:9:in `index'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.1/lib/abstract_controller/base.rb:189:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.1/lib/action_controller/metal/rendering.rb:10:in `process_action'

More backtrace and more detail
https://gist.github.com/DeanMarkTaylor/1990cab615a821e6f535

Posts: 1

Participants: 1

Read full topic


Bookmarks menu item not updated

0
0

Jarrod Mosen wrote:

Not a big deal in the slightest, but when I add a bookmark I don't have the "Bookmarks" option under my user menu (click on avatar) until I refresh the page.

Same goes for when I remove my last bookmark - the menu item isn't removed.

Is this even worth caring about?

Posts: 4

Participants: 3

Read full topic

Discourse Logging Improvements

0
0

Sam Saffron wrote:

Discourse ships with Logster a component that allows us to view logs in the /logs route.

It gathers server side errors and client side errors and logs them in redis.

Current Issues

  • The fact we ship with this component is a "secret", we do not surface any information in our admin screens
  • We have no way of sharing errors (between team members or publicly)
  • We have no way of clearing the error log
  • There is no mechanism for collapsing similar errors

The above heavily limits the usefulness of logster in production.

This week @riking will be working on improving Logster, I wanted to lay out the work that I would like done.

If anyone else wants to work on any of the bits here, please reply here so there is no overlap.

Sharing error messages

We need a simple way to share errors between team members, this work should compose of 2 distinct pieces.

  1. Allow users to "protect" and "unprotect" an error. Out-of-the-box logster will only log the 1000 most recent incidents in redis, we need a way to ensure that an error is never removed so you don't share dead links.

  2. Add an endpoint for sharing error messages. /logs/message/MESSAGE_GUID. This URL should share all the information about the error (backtrace, info, env). This is not meant for public consumption only as a link to share between admins.

  3. Add a little link at the bottom to view error as text so people can copy paste error info, do not worry about sanitizing for the first go. People will have to do that manually.

Expose top errors in the dashboard

We need a simple way to expose the current hot problems and teach people about logster's existence.

  1. Add two new sections to /admin
    • Top server errors today, this week (more link links to logster)
    • Top client errors today, this week
  2. You will need to do some work in https://github.com/discourse/logster/blob/master/lib/logster/redis_store.rb to handle deduping and aggregating.

Add a clear errors button

Not much to say here, except that you need a "are you sure?" for this as it needs some friction. It would also be nice to have a delete button for any single error, in case you want to just remove it.

Add a "collapsed" mode to logster UI

At the moment if you get the same error 1000 times we log 1000 rows, it makes it very hard to tell which errors are extra problematic and which not. Instead there should be a "production mode" that does its best to aggregate rows. Instead of displaying the same row, over and over again, show the count and first error. (you may allow people to iterate through the various instances of the error if you wish.


Tips:

  • Logster was built with TDD, be sure to work through the server model first, run bundle exec guard to execute the tests. A solid object model will make changing the client trivial.

  • Logster ships with lodash,ember,handlebars,moment ... use them

  • Logster is very light weight rack application, it ships with its own asset pipeline.

  • To report server side errors use Rails.logger.warn (or info or debug etc)

  • To report client side errors use window.onerror ...

Posts: 5

Participants: 3

Read full topic

and are busted

0
0

Jeff Atwood wrote:

One huge departure we have from Stack Overflow once you enable the "highlight all code blocks option"

  • PRE and PRE CODE tags are bust for us when entered direct.
  • bbcode is the only way left to enter preformatted code that is not highlighted.
  • We support GitHub fences whereas Stack Overflow does not.

So, we have a proliferation of choice with 2 options that are broken.

Compared to say the way StackExchange would render the same thing (without even supporting GitHub fences or bbcode):

cc @eviltrout

Posts: 3

Participants: 3

Read full topic

Polls don't work if you forget to add "Poll:" when first creating the topic and add it in later

0
0

Tobias Eigen wrote:

Repro steps:

  1. Create a new topic that works with "Poll: title for poll" in the subject and a list of poll options. It will work properly.
  2. Create new topic for the poll and leave out "Poll:" and create the list of poll options as usual. It will, as expected, not work properly as a poll but just display a list.
  3. Go back and edit the poll topic title to add "Poll:" at the beginning. It will, unexpectedly, not work as a poll and just display a list.

Posts: 1

Participants: 1

Read full topic

Text not appearing in new topics

Viewing all 60279 articles
Browse latest View live




Latest Images