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

New vdom rendering missing inbound/outbound CSS classes in gutter


Intemittent 400 errors

$
0
0

@Jus wrote:

I have recently installed Discourse on a VPS with Vultr using their docker image and all went well with the install and setup. However I've noticed since installing that as I browser the domain/website where I installed it that I am getting intermittent 400 errors which seem to last for about 300 seconds and then I'm able to refresh and not get a 400 error. Is this likely to be a server issue or something with my install of Discourse?

Posts: 1

Participants: 1

Read full topic

Discourse + Mail Easy Script

$
0
0

@webeindustry wrote:

I've run out of time and need to get back to life, making monies, and chasing women. I'm gifting the community this simple script I wrote which is solid for it's intended purpose. When I get a couple of hours this weekend I'll make a step-by-step how-to for simple send-only mail with Discourse.

The following is intended for a FRESH install single discourse instance on your VPS from DigitalOcean.

Requirements

  • FRESH Install of Ubuntu 14.04
  • DO Droplet
  • Droplet name set to your Discourse hostname
  • Handy Email
  • Cerveza or Bubble Gum

This works! It's magic, okay? Not really. Digital Ocean sets the name you give your droplet as a PTR record automatically. I use nslookup to extract this PTR record and fill in a lot of the blanks to setup your Discourse/Mail configuration.

I set this up with exim4, and set the smtp addy to the docker IP, which is magically figured for you as well. Anyone is free to clean this up, add on, or do whatever else. I'm simply out of time and need to move onto other projects.

Useage

  • Login via SSH to download and execute the script

wget https://raw.githubusercontent.com/webeindustry/discourse-mail/master/install.sh; chmod +x install.sh; sudo ./install.sh

  • When prompted enter your Email Address

...that's it, folks.

Posts: 1

Participants: 1

Read full topic

Not found when embedding

$
0
0

@ajimix wrote:

Hello,

I just did a clean install of Discourse and tried to embed it into a page. I followed all the steps in the setup instructions and managed to get the discourse site appear embed in the site (the discourse is configured to be private, logged in only) so if I'm logged out, I see the "Please login message" so embedding works. However when I login in discourse I get a 403 error in the browser console.
Taking a log into rails logs I can see this:

Started GET "/embed/comments?embed_url=https%3A%2F%2Fwww.xxxxxxxxxxxx.com%2Fpages%2Ftest" for 111.111.111.111 at 2016-02-25 18:56:37 +0000
Processing by EmbedController#comments as HTML
  Parameters: {"embed_url"=>"https://www.xxxxxxxxxxxx.com/pages/test"}
  Rendered exceptions/not_found.html.erb within layouts/application (12.7ms)
  Rendered layouts/_head.html.erb (0.3ms)
  Rendered common/_special_font_face.html.erb (0.5ms)
  Rendered common/_discourse_stylesheet.html.erb (0.4ms)
  Rendered application/_header.html.erb (0.2ms)
  Rendered common/_discourse_javascript.html.erb (1.2ms)
  Rendered text template (0.0ms)
Completed 403 Forbidden in 60ms (Views: 0.5ms | ActiveRecord: 29.2ms)

Why is this happening? Again being logged out the embed works but logged in it doesn't.
If I make the discourse public (so available even for logged out) then it doesn't work ever :frowning:

Thanks

Posts: 1

Participants: 1

Read full topic

Footer text in email messages can't be translated

$
0
0

@jacotec wrote:

Hi,

I'm running my installation in German language. So far I have translated all messages which are not already translated system messages to German, but I have an issue with the email notifications sent out to the user.

The links inside the email are still in English Language ("Visit Topic to respond") and the footer is also in English:

I went through the email templates several times, but I can't find this template to change. I'd be happy if anyone can point me to the right place :sunglasses:

Posts: 5

Participants: 3

Read full topic

[SOLVED] Unable to upgrade discourse with separate data container

$
0
0

@dlynch158 wrote:

Continuing the discussion from Connectivity/Configuration issue with separate data container:

I have a working discourse install and I tried to perform an upgrade by going to /admin/upgrade and got the following error:

$ bundle exec rake multisite:migrate
URGENT: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Failed to initialize site squadwars

And as I explained before I don't understand why it is trying to connect to a local database when the web_only.yml file clearly indicates it is a separate database, here is my web_only.yml:

# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
# TODO: change SOME_SECRET in this template

templates:
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

expose:
  - "80:80"
  - "2222:22"

# Use 'links' key to link containers together, aka use Docker --link flag.
links:
  - link:
      name: data
      alias: data

# any extra arguments for Docker?
# docker_args:

params:
  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  ## TODO: How many concurrent web requests are supported?
  ## With 2GB we recommend 3-4 workers, with 1GB only 2
  ## If you have lots of memory, use one or two workers per logical CPU core
  #UNICORN_WORKERS: 3

  ## TODO: configure connectivity to the databases
  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_USERNAME: discourse
  DISCOURSE_DB_PASSWORD: REDACTED
  PGHOST: data
  PGPASSWORD: REDACTED
  DISCOURSE_DB_HOST: data
  DISCOURSE_REDIS_HOST: data
  ##
  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'REDACTED@example.com'
  ##
  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: 'despicable.squadwars.org'
  ##
  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org         # (mandatory)
  #DISCOURSE_SMTP_PORT: 587                        # (optional)
  DISCOURSE_SMTP_USER_NAME: discourse@mg.squadwars.org      # (optional)
  DISCOURSE_SMTP_PASSWORD: REDACTED               # (optional)
  ##
  ## The CDN address for this Discourse instance (configured to pull)
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

volumes:
  - volume:
      host: /var/discourse/shared/web-only
      guest: /shared
  - volume:
      host: /var/discourse/shared/web-only/log/var-log
      guest: /var/log

## The docker manager plugin allows you to one-click upgrade Discouse
## http://discourse.example.com/admin/docker
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
  before_bundle_exec:
    - file:
        path: $home/config/multisite.yml
        contents: |
         squadwars:
           adapter: postgresql
           database: squadwars
           pool: 25
           timeout: 5000
           db_id: 2
           host_names:
             - discourse.squadwars.org

  after_bundle_exec:
    - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
## Remember, this is YAML syntax - you can only have one block with a name
run:
  - exec: echo "Beginning of custom commands"

  ## If you want to configure password login for root, uncomment and change:
  ## Use only one of the following lines:
  #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
  #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root

  ## If you want to authorized additional users, uncomment and change:
  #- exec: ssh-import-id username
  #- exec: ssh-import-id anotherusername

  - exec: echo "End of custom commands"
  - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'

I was getting the same error during installation until I added the PGHOST and PGPASSWORD variables into my web_only.yml file -- but perhaps these variables aren't being picked up for the upgrade?

Thanks for any help!

Posts: 3

Participants: 1

Read full topic

User Experience on Discourse with optional touch-input

$
0
0

@jomaxro wrote:

Continuing the discussion from here, here, here, and here...

All the topics linked above have in common that there are issues with Discourse, generally related to UX, when a using Discourse on a system that has touch, but primarily is interacted with via keyboard and mouse. First, it is my understanding (according to @codinghorror) that it is not possible with JS and HTML to detect this type of system, separately from any other system that has a touch input.

With that out of the way, I would like to suggest that this issue as a whole needs to be looked at seeing how the PC market is moving in recent years. When Discourse was first started, you could generally see two types of devices: mobile - like iPads, iPhones, Android phones/tablets, etc. - and desktop, like laptops, workstations, full-size PCs, etc. Today, the device landscape is very different. Thanks in part to a much better adoption of Windows 10 vs Windows 8, more "desktop" devices are coming with touch as an option. Now, touch is an option on most devices purchased from major manufacturers, even in their "business" models, and devices like Microsoft's Surface, Lenovo's Yoga, and similar 2-1/convertible designs are becoming much more popular in the marketplace.

Given that there is no reliable way to detect these devices, whether the user has a mouse and keyboard attached, or reliably guess what type of UX the user prefers, I would like to suggest a user setting "toggle" for Discourse. The closest analogous feature I can think of is Windows 10's Tablet mode, that is user toggleable and makes changes to the UI to make Windows more (or less) friendly to touch. I understand that might not be ideal, as currently Discourse has a fully responsive design, and has purposefully avoided distinguishing "mobile mode" from "desktop mode", but for users who use a laptop with an attached touch-enabled monitor, or multiple laptops some with and some without touch, it is jarring to have Discourse react differently depending on if the external monitor is connected, or if the device has touch or not.

Posts: 1

Participants: 1

Read full topic

Phonegap SPA app for Apple and Google store


The AV Club tries out a competitor to Disqus with comic results

$
0
0

@ABillionSuns wrote:

Outcome of the experiment here

I still think the AV Club would be a good get for Discourse as a conversation platform, but I wonder the extent to which it can handle the brutal load the site would put on it. In any case it might be interesting to scan that thread and look at pain points the users found when trying to use spot.im.

Posts: 3

Participants: 3

Read full topic

How to edit a post via api?

$
0
0

@warblesync wrote:

I have a ruby script that generates the html I want to place in a post. So I need to create the topic and then be able to update it with the new data replacing the old post and the lock so it isn't editable. Is that possible via api / automation?

Posts: 4

Participants: 2

Read full topic

Analytics page views gone down 65% the last to days

$
0
0

@daath wrote:

I'm curious - Has anything happened that would cause the page views to go down by 65% in the last two days? My visitor count is still the same, only page views has gone drastically down...

This is the first time this has happened, and otherwise everything seems to run normally...

Oh, I am still so happy with Discourse! It's the most amazing forum software in existence! :smiley:

Posts: 2

Participants: 2

Read full topic

About importing videos when you are under 13

$
0
0

@Huggingfluffybear wrote:

So when I try to import a video on to a post using the image object it won't let me is there any way to import videos without the being uploaded to a sight straight to the forum? Thanks! Also if not can you maybe but that on your to-do list? From the fluffy bear

Posts: 17

Participants: 3

Read full topic

Consider Random Topic backfill as background task?

$
0
0

@DeanMarkTaylor wrote:

Whenever the random topic list backfill is executed page load time is dramatically hit.

In this example here an additional 301.9 ms for the single query.

If the "random topic" plays any part of a new users experience to a site...
...perhaps it would be best to not make the query immediately and only return / update the results via the message bus once available?

Executing action: show
T+493.1 ms
Reader
301.9 ms
lib/freedom_patches/fast_pluck.rb:41:in `select_raw'
lib/freedom_patches/fast_pluck.rb:79:in `pluck'
lib/freedom_patches/fast_pluck.rb:71:in `pluck'
app/services/random_topic_selector.rb:27:in `backfill'
app/services/random_topic_selector.rb:57:in `next'
lib/topic_query.rb:657:in `random_suggested'
lib/topic_query.rb:111:in `list_suggested_for'
lib/topic_view.rb:298:in `suggested_topics'
app/serializers/topic_view_serializer.rb:90:in `details'
app/controllers/application_controller.rb:262:in `render_json_dump'
app/controllers/topics_controller.rb:580:in `block (2 levels) in perform_show_response'
app/controllers/topics_controller.rb:572:in `perform_show_response'
app/controllers/topics_controller.rb:89:in `show'
lib/middleware/anonymous_cache.rb:129:in `call'
config/initializers/100-quiet_logger.rb:10:in `call_with_quiet_assets'
config/initializers/100-silence_logger.rb:26:in `call'
lib/middleware/request_tracker.rb:73:in `call'
lib/scheduler/defer.rb:85:in `process_client'
lib/middleware/unicorn_oobgc.rb:95:in `process_client'

SELECT  "topics"."id" FROM "topics" LEFT OUTER JOIN "categories" ON "categories"."id" = "topics"."category_id" LEFT OUTER JOIN topic_users AS tu ON (topics.id = tu.topic_id AND tu.user_id = -1) WHERE (categories.id = 114 OR (categories.parent_category_id = 114 AND categories.topic_id <> topics.id)) AND (topics.archetype <> 'private_message') AND (COALESCE(categories.topic_id, 0) <> topics.id) AND "topics"."visible" = 't' AND ("topics"."id" != 67459) AND (topics.deleted_at IS NULL) AND (COALESCE(tu.notification_level,1) > 0) AND (
          NOT EXISTS (
            SELECT 1
              FROM category_users cu
             WHERE cu.user_id = -1
               AND cu.category_id = topics.category_id
               AND cu.notification_level = 0
               AND cu.category_id <> 114
               AND (tu.notification_level IS NULL OR tu.notification_level < 2)
          )) AND "topics"."closed" = 'f' AND "topics"."archived" = 'f'  ORDER BY RANDOM() LIMIT 3000

For information that is perhaps rarely seen on initial render (bottom of page), just may be this is a good optimisation?

Posts: 1

Participants: 1

Read full topic

Notification received when editing topic title and user mentioned in OP

$
0
0

@jomaxro wrote:

Steps to reproduce:

  1. User A creates topic, and mentions users in first post
  2. Mod/Admin changes the topic's category, without opening the post editor

Expected Results:

Topic is recategorized

Actual Results:

Topic is recategorized, all users mentioned in first post receive notification

Version:

Discourse 1.5.0.beta11 (discourse.stonehearth.net)

System Information:

Windows 10 Pro, Chrome Stable 48

Posts: 1

Participants: 1

Read full topic

Possible SQL optimisation getting posts, index miss

$
0
0

@DeanMarkTaylor wrote:

Noted the following query took a long time (51.6 ms)

Executing action: show
T+67.1 ms
Reader
51.6 ms
lib/topic_view.rb:71:in `initialize'
app/controllers/topics_controller.rb:59:in `new'
app/controllers/topics_controller.rb:59:in `show'
lib/middleware/anonymous_cache.rb:129:in `call'
config/initializers/100-quiet_logger.rb:10:in `call_with_quiet_assets'
config/initializers/100-silence_logger.rb:26:in `call'
lib/middleware/request_tracker.rb:73:in `call'
lib/scheduler/defer.rb:85:in `process_client'
lib/middleware/unicorn_oobgc.rb:95:in `process_client'

SELECT "posts".* FROM "posts" WHERE "posts"."topic_id" = 67458 AND "posts"."id" IN (452571, 452627, 452652, 452721, 452777, 452804, 452847, 452902, 452960, 452993, 453027, 453071, 453107, 453146, 453183, 453219, 453247, 453328, 453395, 453611) AND (user_id = 1 OR post_type IN (1,2,3,4))  ORDER BY sort_order

Ran an "EXPLAIN" to find that index optimisation looks a little "off":

 Sort  (cost=98.84..98.84 rows=1 width=836) (actual time=1.314..1.340 rows=20 loops=1)
   Sort Key: sort_order
   Sort Method: quicksort  Memory: 30kB
   ->  Bitmap Heap Scan on posts  (cost=94.78..98.83 rows=1 width=836) (actual time=0.682..1.147 rows=20 loops=1)
         Recheck Cond: ((topic_id = 67458) AND (id = ANY ('{452571,452627,452652,452721,452777,452804,452847,452902,452960,452993,453027,453071,453107,453146,453183,453219,453247,453328,453395,453611}'::integer[])))
         Filter: ((user_id = 1) OR (post_type = ANY ('{1,2,3,4}'::integer[])))
         ->  BitmapAnd  (cost=94.78..94.78 rows=1 width=0) (actual time=0.601..0.601 rows=0 loops=1)
               ->  Bitmap Index Scan on index_posts_on_topic_id_and_post_number  (cost=0.00..5.91 rows=198 width=0) (actual time=0.231..0.231 rows=244 loops=1)
                     Index Cond: (topic_id = 67458)
               ->  Bitmap Index Scan on posts_pkey  (cost=0.00..88.62 rows=20 width=0) (actual time=0.285..0.285 rows=20 loops=1)
                     Index Cond: (id = ANY ('{452571,452627,452652,452721,452777,452804,452847,452902,452960,452993,453027,453071,453107,453146,453183,453219,453247,453328,453395,453611}'::integer[]))
 Total runtime: 1.789 ms
(12 rows)

Simple removal of the `topic_id` check would allow an single index hit:

EXPLAIN ANALYZE SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (452571, 452627, 452652, 452721, 452777, 452804, 452847, 452902, 452960, 452993, 453027, 453071, 453107, 453146, 453183, 453219, 453247, 453328, 453395, 453611) AND (user_id = 1 OR post_type IN (1,2,3,4))  ORDER BY sort_order;


 Sort  (cost=169.30..169.35 rows=20 width=836) (actual time=0.790..0.803 rows=20 loops=1)
   Sort Key: sort_order
   Sort Method: quicksort  Memory: 30kB
   ->  Index Scan using posts_pkey on posts  (cost=0.45..168.87 rows=20 width=836) (actual time=0.172..0.695 rows=20 loops=1)
         Index Cond: (id = ANY ('{452571,452627,452652,452721,452777,452804,452847,452902,452960,452993,453027,453071,453107,453146,453183,453219,453247,453328,453395,453611}'::integer[]))
         Filter: ((user_id = 1) OR (post_type = ANY ('{1,2,3,4}'::integer[])))
 Total runtime: 0.922 ms
(7 rows)

Obviously I'm unsure of the exact code path or requirement for the index check, or indeed if a index change is required here.

Possible SQL optimisation getting posts?

Posts: 1

Participants: 1

Read full topic


How to add an Ember js helper?

$
0
0

@pdx wrote:

I'm trying to add an emberjs helper to an existing plugin (discourse-tagging).

According to the ember docs, you should place a helper in app/helpers, and name it helper-name.js.

It can then be used like this: {{ helper-name value }} in templates.

However, no matter where I place the file it I get the error: "Uncaught Error: Assertion Failed: A helper named 'helper-name' could not be found"

I've tried these locations:
app/helpers/
assets/javacripts/discourse/helpers

Where should emberjs helpers be placed in plugins?

Thanks! :slightly_smiling:

Posts: 3

Participants: 2

Read full topic

What would be a good way to deal with duplicate posts?

$
0
0

@Drew_Warwick wrote:

On the Discourse forum I use, we see a lot of duplicate posts, and it really is showing on thread about a new feature.

There are currently 54 posts on the thread. A staff member on post #17 listed all of the known issues regarding the feature. If the topic is summarized, it's only 11 posts and the summary includes #17. After post #17, we've averaged 1 every 6 posts where someone has complained about something listed under "known issues". If we don't include the "That was already mentioned in post #17" replies, it's 1 in every 4 posts. The staff members could (and should) edit post #17 into the original post, but that's not the problem we're looking at here. The problem is that people aren't taking a couple minutes to read the thread before posting, and that results in both a lot of duplicate posts that make the thread hard to follow and circular discussion.

I posted a topic on the forum as sort of a call to action for moderators to start deleting these duplicate posts (maybe by editing them to be [Duplicate Post] so the poster knows why it was deleted and then leaving the poster to delete it themselves), but other users of the forum said "You shouldn't try to program people's behavior" and "People would stop posting because they'd be afraid to risk being moderated". I don't see the deletion of duplicate posts as any different from deleting personal attack posts (in both cases you're just deleting destructive posts), so I'm not sure I follow on the programming behavior point. Regarding the scaring people off because they fear being moderated, my outlook is that they'd have nothing to fear if they read the thread before posting and good riddance to any posts lost due to people not wanting to read the thread because their lack of effort would have likely reflected in their posts.

It'd be one thing if people didn't read a 200 post thread, but the topic in question isn't that long and the Discourse software estimates it'd only take four minutes to read the long version, and it'd be significantly shorter if someone read the summarized version, so there's no excuse for people to not read this particular thread in its entirety before posting.


I'm wondering: are the fears of behavior programming and posting scare off without merit, or are they actually an accurate estimation of what would happen if duplicate posts started being deleted? If those concerns are real, what would be a better way to deal with duplicate posts?

Posts: 6

Participants: 3

Read full topic

Can not rebuild - Configure app.yml I got this error

Deleting a group makes all it's messages "lost"

$
0
0

@carlokok wrote:

When I delete a group it moves it's messages to be private messages with only the one that sent it, effectively making them "lost". (In this case I wanted to see what happened), maybe discourse should warn about this, or not allow without moving them out first?

Posts: 1

Participants: 1

Read full topic

Add path to cookie

$
0
0

@rap1ds wrote:

When Discourse is hosted from a subfolder (e.g. /forum) it seems that the cookie is still set to the root folder /.

To me this sounds like a potential security issue. For example, if a forum is hosted in /forum and a WordPress blog is hosted in /blog, the cookie with Discourse session is sent also to the WordPress site.

This should be pretty easy to fix by changing config/initializer/100-session_store.rb from

Discourse::Application.config.session_store :cookie_store, key: '_forum_session'

to

Discourse::Application.config.session_store(
  :cookie_store,
  key: '_forum_session',
  path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
)

To my understanding this change shouldn't invalidate existing sessions, because cookies for root folder / work also for subdirectory /forum. So the migration path should be ok.

Does this make sense? I could make a PR if you think this makes sense.

Posts: 4

Participants: 3

Read full topic

Viewing all 60613 articles
Browse latest View live




Latest Images