This topic is in extensibility, but it's clearly a support request. Except it's a support request for a plugin, so it's a little bit different.
I see a few options for categorization:
extensibility
support
new subcategory of support, like wordpress
Off Topic (but then, what site should it be on?)
Keep in mind that the resolution of the topic should not affect your opinion, because that isn't known when you categorize it. (It isn't known whether the problem is with the Discourse configuration or the Google-side configuration.)
I'm running 0.9.7.8 version without docker and now I want to migrate to a new version of discourse with docker technology. I've made backup database and tried to restore it in new discourse, maybe the format of this backup is wrong, it's just did nothing.
So, how to migrate from old discourse to new version of discourse/docker ?
The problem I'm running into is that I don't know what password to use for the admin login. The instructions say:
Sign into your Discourse instance. There should be a reminder visible on the site about which email was used for the DISCOURSE_DEVELOPER_EMAILS address. Be sure you log in with that email, and your account will be made Admin by default.
I see the reminder with the correct email address, but I'm stumped as to what the password can be as at no point did I have to specify one. I thought it'd be without a password, but there's no way of clicking the Login button without typing something in the password field.
I've looked at a few other threads but they all reference seed data and broken github links :/
Did I miss something during the server configuration process?
I follow this exact same docs to install Discourse on Windows 7. It works brilliantly as in no errors occur. It gets my browsers request through port 4000 and prints out it send a 200 status back. But unfortunatley it never sends data back. Only an icon and a page title make its way too the browser, no content is loaded.
Can somebody help me with that, please?
If you need any additional information, just ask. Since I have no clue in what particular scope my problem resides, I did not know what to add here.
I've checked how they do synced scrolling in Ghost and it turns out that it is extremely simple - they just keep the relative position of both panes in sync, i.e. if the source pane is scrolled to 30% of its height, preview pane is also automatically scrolled to 30% of its height.
In most typical cases both source and and preview contain almost only text, so their height is more or less proportional and this approach works quite well. This method also seems to be very performant and scalable, as it chceks only the pane height and scroll position, without parsing the text etc. so it shouldn't be dependent on the amount of content in the pane.
However in cases when the content between panes is very disproportional (e.g. if you embed a link to a tall image, that in the source pane is just a single line of text and in the preview pane is an actual image, several hundreds of pixels high or if you put 30 newlines in the source that get squashed into a single newline in the preview) scrolling in Ghost can go out of sync.
@sam What do You think? Should we give similar simple approach a try? Or do you want to have something exactly accurate?
At the moment, short of using discourse docker plugin there is no place to list the current plugins, install plugins or disable plugins in the admin UI.
It makes diagnosing issues sometimes tricky, staying up to date with plugins and so on.
Version 0
Version 0 of the admin plugin UI will be VERY simple.
Add an extra tab to the admin screen that lists plugins
Allow plugins to be enabled or disabled from the UI
If a plugin is disabled/enabled a restart of Discourse is required. This should be tracked, eg: display "Your plugin was disabled but will not be deactivated till you restart Discourse"
A table needs to be added to track enable / disable state for plugins, by default anything missing from the table is enabled.
UI should display which plugins are out-of-date (same way as discourse docker manager does it)
Disable / Enable option to be suppressed for any multisite installs. (probably via a GlobalSetting)
Version 0 will not cover
Upgrade logic for plugins via UI
Installation of new plugins or plugin discovery.
Since this involves UI, no work to be completed prior to UI mocks
Long term I envisage this deprecating https://github.com/discourse/docker_manager , instead what docker manager will do is simply implement various hooks like "this is how you restart discourse hook" or "this is how you install a plugin hook". Cross machine restarts get tricky, installation in Docker environment is tricky.
To date, most of the communities we have run have had very low levels of "interest segregation". Most users have a similar level of interest in most categories.
However, now that http://discourse.mcneel.com/ is picking up steam, this is changing. Some users are VERY interested in "Rhino for Windows" and not at all interested in "Rhino for Mac".
I have been thinking about how we can better accommodate for different interests within a community. To do this I suggest we add per category user preferences.
Here are the options I think we should consider:
Muted category
Highest level of suppression, muted categories do not appear in the "new" or "latest" tabs (unless you explicitly started tracking a topic in that category)
Untracked category
Medium level of suppression, topics in untracked categories show up in the "latest" list, however don't have the "new" star on them. The do not show up in the "new" tab.
Default category
Default (what we do now)
Tracked category
Raise the volume, topics in these categories will ALWAYS be tracked regardless of the global setting. Topics in these categories will keep the "new" star on them till you read the topic.
Watched category
This is the highest level of volume, same as tracked. ALSO send an email to you whenever a new topic is posted in this category
This leaves 2 questions
Is this too much / too little?
Where will the user enter these settings? UI mocks?
I'm wondering why Discourse uses migrations to set up a new development database, instead of the (more usual) db/schema file.
Rails' standard practice is to have a db/schema.rb (which can also be schema.sql, which Discourse would probably need so that it can export PostgreSQL-stuff) that sets up the schema for the database, and then a db/seeds.rb which sets up initial data.
Instead it seems like we run the history of migrations, which is usually fragile in the long term. And then initial data is either by a dump file, or an initial admin user from script/setup_dev.
It's quite confusing how many different ways of getting going there are, and that it deviates from Rails' defaults makes it doubly so. I'm wondering what the rationale is against using db/schema.sql?
I wanted to re-bootstrap my existing data container.
I ran sudo ./launcher destroy data and then sudo ./launcher bootstrap data, however I eventually ended up with a repeating error message scrolling up my screen: (paraphrased)
[timestamp] FATAL : The database system is shutting down
I eventually resorted to renaming the shared/postgres_data and shared/redis_data and rebuilding from scratch and restoring from backup. I hate doing this because browser caching tends to screw me around badly.
Is there a "correct" way of re-bootstrapping the data container?
I recently dug deeper into the archetype system to figure out how it can, does and should work. In order to not get lost in the task, I decided to try to implement one very specific, narrow use case: Questions. I settled to try to get the following criteria done:
add an archetype discourse core don't have any specific knowledge of
the archetype should show up in searches and listings as a normal topic and otherwise behave like the normal topic (unlike than for e.g. the private message)
the posts for this archetype are not ordered chronologically but by "most likes"
the view shall be adapted to have a more explicit visibility of these likes for answers
In order to be able to get 2) done, I needed to refactor the archetype-system. Until this point the archetypes are referenced directly within the core on various occasion. To make it work I changed that into a capability-driven approach: when a Archetype is registered it provides a list of features it is capable of, for example to be shown publicly or be searchable. Then I replaced all occurrences of direct references with the appropriate capability.
That way I was able to add another Archtype - Question - which is also rendered in the lists because it has the capability of been publicly shown, while delivering it as a plugin and without discourse core having any previous knowledge about it - yay.
Secondly in order to be able to change the UI I did the usual reopening of Ember Views. Unfortunately, as the block relies on spanX-grids I also had to patch that so that it fits in the view after adding my heart-shaped answer-score. But I got it working:
I am writing this post as a case study and in order to open the discussion on how archetype delivery through plugins should work (as I think it makes a whole lot of sense to have custom archetypes coming from plugins – you don't want to ship everything with the core). What I did here is in no way meant as a plugin for production but it shows the main weaknesses in discourse when shipping your own archetypes:
certain Archtypes are currently hard-coded and their usage in core is limited to them even if you'd ship your own archetype (this can be fixed with my capability-focussed patchset)
the core posts-rendering heavily expects the discussion use case to be the way things are supposed to be done and patching that part is nearly impossible
the views (and especially the templates) are currently hard-coded towards the existing archteypes. Unless the plugin overwrites them entirely, the extensibility of rendering for shipped archtypes is very limited.
The same is true for the composer. That part is even more complex and though it looks like it was meant at some point that you should be able to "switch archetypes", there is really no possible way for an archetype to be provider their own extensions or even full blown other editors.
Regard 1 I have the patch-set ready including tests and everything working and I am happy to make it into a pull-request if that is an approach we want to take. As for 2, 3 and 4 I don't have a concrete solution at the moment but from what I feel there is little other possibility than adding explicit hooks in them to allow plugins to ship their own to be called and rendered or – if none found – just render the default one.
Everything up until getting the thing to start is having issues.
Doing ./launcher bootstrap app and ./launcher start app gives the following errors. Cannot connect to the docker daemon - verify it is running and you have access
I previously managed to get Discourse running on a Debian 6 / 32bit VPS using the old ruby-compile process which was a little painful as there were a number of issues with ruby versions and the 32bit userspace/64bit kernel.
As it looked rather involved upgrading my VPS to Debian 7/64bit for the docker requirements, I thought I'd try this on a brand new VM instance elsewhere, and give Discourse its own instance, plus a chance to test Ubuntu 14.04. The default image with this VM starts as Ubuntu 12.04 LTS, but I managed to upgrade this to the recently released 14.04 Beta, as 14.04 seems to come with most of the pre-requisites set up for Docker. There seemed to be a few logs warnings about udev whilst upgrading, but otherwise it's running fine. Installing Docker was straightforward - as was grabbing the Discourse docker repository.
The issues occur when I try to run ./launcher bootstrap app; postgres warns of "could not signal for checkpoint" - logs from the bootstrapping process to follow:
I, [2014-04-07T02:33:23.951159 #37] INFO -- : > sudo -u postgres /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main
I, [2014-04-07T02:33:23.953361 #37] INFO -- : > sleep 5
2014-04-07 02:33:23 UTC LOG: database system was shut down at 2014-04-07 02:33:23 UTC
2014-04-07 02:33:23 UTC LOG: database system is ready to accept connections
2014-04-07 02:33:23 UTC LOG: autovacuum launcher started
I, [2014-04-07T02:33:28.960548 #37] INFO -- :
I, [2014-04-07T02:33:28.961138 #37] INFO -- : > sudo -u postgres createdb discourse || exit 0
2014-04-07 02:33:31 UTC ERROR: could not signal for checkpoint: Permission denied
2014-04-07 02:33:31 UTC STATEMENT: CREATE DATABASE discourse;
createdb: database creation failed: ERROR: could not signal for checkpoint: Permission denied
I, [2014-04-07T02:33:31.026703 #37] INFO -- :
I, [2014-04-07T02:33:31.027565 #37] INFO -- : > sudo -u postgres psql discourse
I, [2014-04-07T02:33:31.030985 #37] INFO -- : create user discourse;
2014-04-07 02:33:31 UTC FATAL: database "discourse" does not exist
psql: FATAL: database "discourse" does not exist
I, [2014-04-07T02:33:31.096923 #37] INFO -- : > sudo -u postgres psql discourse
I, [2014-04-07T02:33:31.099971 #37] INFO -- : grant all privileges on database discourse to discourse;
2014-04-07 02:33:31 UTC FATAL: database "discourse" does not exist
psql: FATAL: database "discourse" does not exist
I, [2014-04-07T02:33:31.164325 #37] INFO -- : > /bin/bash -c 'sudo -u postgres psql discourse <<< "alter schema public owner to discourse;"'
2014-04-07 02:33:31 UTC FATAL: database "discourse" does not exist
psql: FATAL: database "discourse" does not exist
I, [2014-04-07T02:33:31.236806 #37] INFO -- :
2014-04-07 02:35:24 UTC WARNING: worker took too long to start; canceled
The other issue is that I cannot kill running docker instances (launcher has no 'running' cids to operate on):
sysadmin@forum:/var/docker$ sudo ./launcher stop app
WARNING: No swap limit support
No cid found
sysadmin@forum:/var/docker$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a70c0becbdb4 samsaffron/discourse:0.1.2 /bin/bash -c cd /pup 18 minutes ago Up 18 minutes prickly_poincare
a6c87c631617 samsaffron/discourse:0.1.2 /bin/bash -c cd /pup 9 hours ago Up 8 hours agitated_fermat
sysadmin@forum:/var/docker$ sudo docker stop a70c0becbdb4
Error: Cannot stop container a70c0becbdb4: permission denied
2014/04/07 11:58:35 Error: failed to stop one or more containers
sysadmin@forum:/var/docker$ sudo docker kill a6c87c631617
Error: Cannot kill container a6c87c631617: no such process
2014/04/07 11:58:46 Error: failed to kill one or more containers
I'm aware everything is still a WIP. Perhaps this is really a docker issue with 14.04 Beta. For the moment, the live forum site is still ticking along on the Debian 6 VPS.
Anyone managed to get Docker/Discourse running on 14.04?
Just as a note:
docker -v
Docker version 0.9.1, build 3600720
sysadmin@forum:/var/docker$ uname -a
Linux forum.typhoon-dbc.com 3.13.0-23-generic #45-Ubuntu SMP Fri Apr 4 06:58:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
I set up Discourse (using this guide) and embedded comments into my site. For some pages it went well. However, for one page, no forum topic appeared, and in embedded area, Discourse always tells 'Loading Discussion...', and nothing happens. What can I do about it? I tried to reload docker a couple of times, nothing happened.
When you upload a backup file (or when you made one) and want to restore it, Discourse will look for the archive in the default location. That tar command, however, does look in the right place but will fail of course.
One very cool feature Discourse has is "oneboxing". If you include a link to your favourite site, it will try to create a usable snippet for you automatically.
For example: paste the link http://en.wikipedia.org/wiki/Spite_house on a line by itself and you will see a nice onebox from Wikipedia
A spite house is a building constructed or modified to irritate neighbors or other parties with land stakes. Spite houses often serve as obstructions, blocking out light or access to neighboring buildings, or as flamboyant symbols of defiance. Because long-term occupation is at best a secondary consideration, spite houses frequently sport strange and impractical structures. Spite houses are much rarer than spite fences. This is partially attributable to the fact that modern building codes often p...
Glenn Murray, Audrey Colman (Illustrator) William Kotzwinkle
When Walter the Farting Dog is sold for a measly ten pounds, Billy and Betty are distraught. But Walter doesn't realise he's been caught up in a dreadful plan involving a fake clown, litres of his ...
***************************************************V1.4 is here! Now supports "Drag to look" controls as well as dual stick!THE ORIGINAL KING OF ACTION RETURNS!With dozens of Game of the Year awards under his belt, Duke remains the King of Action. Larger than life action is what Duke is all about, mixed with humor and innovative explosive action in this 20+ hour game. Los Angeles. Under attack by aliens intent on stealing our chicks for breeding. Duke Nukem springs into action dealing damage lik
require 'digest/md5'
module Rack
# Automatically sets the ETag header on all String bodies.
#
# The ETag header is skipped if ETag or Last-Modified headers are sent or if
# a sendfile body (body.responds_to :to_path) is given (since such cases
# should be handled by apache/nginx).
#
# On initialization, you can pass two parameters: a Cache-Control directive
# used when Etag is absent and a directive when it is present. The first
# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate"
class ETag
DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate".freeze
def initialize(app, no_cache_control = nil, cache_control = DEFAULT_CACHE_CONTROL)
@app = app
@cache_control = cache_control
@no_cache_control = no_cache_control
end
def call(env)
status, headers, body = @app.call(env)
if etag_status?(status) && etag_body?(body) && !skip_caching?(headers)
original_body = body
digest, new_body = digest_body(body)
body = Rack::BodyProxy.new(new_body) do
original_body.close if original_body.respond_to?(:close)
end
headers['ETag'] = %("#{digest}") if digest
end
unless headers['Cache-Control']
if digest
headers['Cache-Control'] = @cache_control if @cache_control
else
headers['Cache-Control'] = @no_cache_control if @no_cache_control
end
end
[status, headers, body]
end
private
def etag_status?(status)
status == 200 || status == 201
end
def etag_body?(body)
!body.respond_to?(:to_path)
end
def skip_caching?(headers)
(headers['Cache-Control'] && headers['Cache-Control'].include?('no-cache')) ||
headers.key?('ETag') || headers.key?('Last-Modified')
end
def digest_body(body)
parts = []
digest = nil
body.each do |part|
parts << part
(digest ||= Digest::MD5.new) << part unless part.empty?
end
[digest && digest.hexdigest, parts]
end
end
end
Kim Dotcom's story is something out of Hollywood.
The self-proclaimed king of the internet was the founder and operator of file sharing giant Megaupload -- a haven for pirates and ...