Locations Plugin 🌍

|||
-|-|-|
:information_source: | 概要 | トピックにジオコーディングされた場所を関連付け、美しいマップ上に表示できます。また、ユーザーが自分の位置情報を記録し、サイト上の中心的なユーザーマップにまとめて表示することもできます。
:hammer_and_wrench: | リポジトリリンク | GitHub - merefield/discourse-locations: Tools for handling locations in Discourse · GitHub
:open_book: | インストールガイド | Discourseでプラグインをインストールする方法
:heart: | スポンサーシップ | このプラグインが当然受けるべきメンテナンスを受け、将来にわたってサイトで機能し続けるために、ご自身または組織のリソースとニーズに合ったレベルで、私のオープンソース活動の継続的なスポンサーになることをご検討ください。

このプラグインを楽しんでいますか?GitHub で:star:をお願いします

ドキュメント

リポジトリでREADMEをご覧ください。

サポート

無料でのサポート提供は保証しておりません。私のGOLDまたはPLATINUMの月額スポンサーシップティアのいずれかに登録された企業や機関にはサポートを提供できます。

一時的なバグ調査オプションもあります。

そして、ユーザーマップの改善に関連する現在のスポンサーシップの機会があります。

「いいね!」 110
OpenStreet maps embedding
Events Plugin :calendar:
Learn how to build Discourse plugins by helping me
Suitability of Discourse for Discussion on Page
Locations dropdown (Google maybe?)
Enable tagging only in some categories
My 2nd Discourse forum, 2 years after the first one
How to add custom fields to models
2020: The Year in Review
Events Plugin :calendar:
Listing users by group - ERROR: missing FROM-clause entry for table "groups"
2021: The Year in Review
A "Votes" option for the top menu in main page
Forum Completely Broken 2.8.5
It's Time We Talked About Tags
Who use event plugin in their discourse community?
Automated map
Configure plugin Custom Wizard for autoposting
2022: The Year in Review
Show a modal dialog after clicking toolbar button via a plugin
Must have plugins and components for Discourse?
Getting a 500 error on the mobile for bookmark and some category pages
Get aggregate user location data from IP addresses?
Could a List of Recommended Topics Be Added to the Top Menu?
2023: The Year in Review
¿Cómo encuentro a una persona en Discourse?
New Theme: Tag-Pages Navigation
Is it possible to add a location and display them on a map?
Generating an ical to use with a custom map
Remove overriding of cmd/ctrl-f
Locate a feature like the one shown in the photo
Usercard Redesign Experiment
2024: The Year in Review
Migrated my old custom-built trail-journal/blog to Discourse
Newly created topic shown location based on device
Alternative post templates
What happens next?
Discourse-events 'this.router' error
National Flags
How minimal is your forum?
Layouts Plugin
Suggestions on how I can have hundreds of small groups (e.g. streets in a town)?
Problème accès aux onglets des paramètres des catégories
Discourse.fontawesome-6-upgrade needs updating
Locations plugin modifications
Traditional multi level hierarchy vs flat discourse hierarchy
More options to filter users on users page
Project ideas for Google Summer of Code 2018
Traditional multi level hierarchy vs flat discourse hierarchy
Any way to display Location below the name in posts?
Topic List Previews (legacy)
Developing with Discourse
Calendar plugin features to make it really useful for us
Learn how to build Discourse plugins by helping me
Developing
Discourse-common asset availability: difference between development and production?
2018: The Year in Review
Object instead of users due to locations plugin
Inserting a date with Paris timezone gives me Berlin
Failed building stable due to 3rd party plugin
Events Plugin :calendar:
How to make a topic filter based on current user group and topic location
2019: The Year in Review
United states map
Fig - Native Discourse client for iOS
Loading slider issues
Job exception: undefined method `name' for
A plugin to "check" a portion of a post before it can be posted

このテクノロジーは初心者です。プラグインをインストールしました(ハンバーガーメニューに「Map」コマンドが表示され、ユーザープロフィールページに位置フィールドがあり、nominatim とのジオリファレンスが機能しています)が…

エディタに「Add location」ボタンが表示されません。

私の設定は以下の通りです:

そして、エディタウィンドウは以下の通りです:

最後に、プラグインのインストール方法は以下の通りです:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-math.git
          - git clone https://github.com/paviliondev/discourse-events.git
          - git clone https://github.com/paviliondev/discourse-locations.git
          - git clone https://github.com/davidtaylorhq/discourse-whos-online.git
          - git clone https://github.com/discourse/twitter-profile-link.git
          - git clone https://github.com/discourse/discourse-tooltips.git

locale=en で試しましたが、結果は同じでした。

「いいね!」 2

さて、訂正します。このプラグインはユーザープロフィールでは期待通りに動作しています。

地図によると、私は「故人」です。地図上ではモントリオール最大の墓地の真ん中にポイントが表示されているためです。

「いいね!」 13

使用したい各カテゴリについても、これを有効にする必要があります。

「いいね!」 6

ありがとうございます!動作しました。

ところで、チェックボックスはデフォルトで「オン」になっていましたが、機能を実際に動作させるには、設定パネルを表示して、チェックを外してから再度チェックを入れる必要があります。

「いいね!」 4

動作したようで嬉しいです。プラグインを使うのは久しぶりだったので、推測で対応しました。

「いいね!」 3

@angus 最近、プロフィールに所在地が記入されていないユーザーでこの問題が発生していることに気づきました。

ただし、すべてのユーザーで発生しているわけではなく、パターンを特定できていません。

もしかすると、プロフィールから所在地を削除したユーザーでしょうか?あるいは、NULL ではなく空文字列(例:“”)が原因かもしれませんね:thinking:

「いいね!」 3

最近のアップデートにより、ユーザーカードから位置情報が完全に削除されたようです。

ユーザーカード:
user-card

ユーザープロフィール:

「いいね!」 3

これは、コアのこの変更が原因である可能性が非常に高いです:

「いいね!」 5

@omarfilip @david ご意見ありがとうございます :+1:t2:

@angus これを修正することは可能ですか?

「いいね!」 4

@david @Richie ご協力ありがとうございます。このプラグインは変更に対応するように更新されました。

なお、このプラグインはまもなく Pavilion の主要プラグインと同じ更新スケジュールに移行します。つまり、毎月の第 1 週に最新の Discourse コアと整合が取られるようになります。このプラグインに固有の詳細は後日お知らせしますが、参考までに以下のリンクをご覧ください:

「いいね!」 5

迅速な対応をありがとう、アングス。

「いいね!」 4

@angus さん、こんにちは。場所がユーザーカードに表示されることは確認できましたが、場所が入力されていないユーザーでもマップピンとマップアイコンが表示されるという問題がまだ発生しています:

また、フルプロフィールページでも同様の表示が見られます:

「いいね!」 4

現在、locations プラグインの影響で Discourse アプリを起動できません。ログを以下に添付します。app.yml で locations をコメントアウトすると動作します。この件を優先して対応していただけませんか?

また、メインの Discourse アプリのように、プラグインの「tests-passed」バージョンのみをアップグレードする方法はありますか(そのようなものがある場合)。そうすれば、今後このような問題に遭遇しないようにできます。

Log
5: from /var/www/discourse/plugins/discourse-layouts/plugin.rb:49:in `block in activate!'
4: from /var/www/discourse/lib/discourse_event.rb:13:in `trigger'
3: from /usr/local/lib/ruby/2.6.0/set.rb:338:in `each'
2: from /usr/local/lib/ruby/2.6.0/set.rb:338:in `each_key'
1: from /var/www/discourse/lib/discourse_event.rb:14:in `block in trigger'
/var/www/discourse/plugins/discourse-locations/plugin.rb:234:in `block in activate!': uninitialized constant DiscourseLayouts::WidgetHelper
Did you mean?  DiscourseLayouts::WidgetSerializer (NameError)

** INCOMPATIBLE PLUGIN **

You are unable to build Discourse due to errors in the plugin at
/var/www/discourse/plugins/discourse-locations

Please try removing this plugin and rebuilding again!
I, [2020-04-25T20:32:06.399307 #1]  INFO -- : gem install icalendar -v 2.4.1 -i /var/www/discourse/plugins/discourse-events/gems/2.6.5 --no-document --ignore-dependencies --no-user-install
HEADS UP! iCalendar 2.0 is not backwards-compatible with 1.x. Please see the README for the new syntax

HEADS UP! icalendar 2.2.0 switches to non-strict parsing as default. Please see the README if you
rely on strict parsing for information on how to enable it.

ActiveSupport is required for TimeWithZone support, but not required for general use.
Successfully installed icalendar-2.4.1
1 gem installed
gem install geocoder -v 1.4.4 -i /var/www/discourse/plugins/discourse-locations/gems/2.6.5 --no-document --ignore-dependencies --no-user-install
Successfully installed geocoder-1.4.4
1 gem installed

I, [2020-04-25T20:32:06.400580 #1]  INFO -- : Terminating async processes
I, [2020-04-25T20:32:06.400773 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 50
I, [2020-04-25T20:32:06.400979 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 167
167:signal-handler (1587846726) Received SIGTERM scheduling shutdown...
2020-04-25 20:32:06.401 UTC [50] LOG:  received fast shutdown request
2020-04-25 20:32:06.403 UTC [50] LOG:  aborting any active transactions
2020-04-25 20:32:06.406 UTC [50] LOG:  worker process: logical replication launcher (PID 59) exited with exit code 1
167:M 25 Apr 2020 20:32:06.406 # User requested shutdown...
167:M 25 Apr 2020 20:32:06.406 * Saving the final RDB snapshot before exiting.
2020-04-25 20:32:06.409 UTC [54] LOG:  shutting down
2020-04-25 20:32:06.439 UTC [50] LOG:  database system is shut down
167:M 25 Apr 2020 20:32:06.502 * DB saved on disk
167:M 25 Apr 2020 20:32:06.502 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 13098 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
b5a02d7f9df6b6a9dc160e269de30eef49bb0aeaf5dcb1b712bab5e6edad4030
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
root@discuss:/var/discourse#
「いいね!」 3

@k4rtik ご報告ありがとうございます。また、ご迷惑をおかけして申し訳ございません。この問題は以下の理由で発生しました:

  1. layouts プラグインが 2 日前に更新されました。
  2. locations プラグインは、既存の layouts プラグインのバージョンをサポートしていました。
  3. 両方のプラグインを使用されていました。
  4. layouts プラグインの初期更新と、locations プラグインによるサポート追加の間に、Discourse の更新を行われました。

locations プラグインを新しい layouts プラグインのバージョンに対応するように更新しました:https://github.com/paviliondev/discourse-locations/commit/52aec30461f8439c6658fdc401127cb52881ab49。現在、両方のプラグインをインストールした状態で更新すれば、問題なく動作します。@Richie こちらであなたの問題も解決します:Add include? to geo_json in user_card serializer · merefield/discourse-locations@5185063 · GitHub

プラグインに tests-passed ブランチを設けても、残念ながらこの特定の状況や、他の多くのプラグイン非互換性の状況では大きな助けにはなりません。ユーザーは更新頻度が様々で、カスタマイズの組み合わせも多岐にわたります。

とはいえ、この問題に対処するための一歩を踏み出し始めました。Pavilion の主要なオープンソースプラグイン(このプラグイン、Events、Topic List Previews など)が、毎月 5 月 1 日から 5 日の最初の 5 日間に、Discourse の最新バージョンと同期されるようスケジュールを移行しています。

これにより、try.thepavilion.io 上のすべてのプラグインと Discourse 自体を、以下の確実性を持って更新できる安全なウィンドウが提供されます:

  1. プラグインと Discourse の間で競合が発生しない、または発生しても 24 時間以内に解消されます。

  2. プラグイン自体の変更による問題が発生しません。プラグイン自体に潜在的な破壊的変更を加える場合は、このウィンドウ外で行われます。

これは、以下にリストされているすべてのプラグインに適用されます:

このリストは将来的に拡張される可能性があります。詳細はこちらをご覧ください:https://try.thepavilion.io

これについてご質問がございましたら、PM でご連絡いただくか、thepavilion.io までお問い合わせください。

「いいね!」 8

ありがとうございます。はい、前のアップデートでカスタムレイアウトが表示されない理由を調べていたんです。まだ表示されていないようですが、Pavilion でプラグインの変更に関する更新されたドキュメントをリリースする準備を進めていると伺いましたので、少し待ってみます。

「いいね!」 2

@angus 確認しました - 問題は解決しました :clap:t2:

このプラグインに対する継続的なサポートに改めて感謝します :smiley:

「いいね!」 4

こんにちは、@angus さん。このスレッドの最初の投稿が編集されたという通知を受け取りました。

リポジトリの場所が移動したようです。

みなさんはディスコースの設定を新しい場所に更新すべきでしょうか、それとも既存の(古い)場所からも引き続き更新されるのでしょうか?

プラグインのソース場所を変更した後、何かを再構築する必要がありますか?

「いいね!」 3

こんにちは @Richie さん、古い URL の GitHub - merefield/discourse-locations: Tools for handling locations in Discourse · GitHub を引き続きお使いいただけます。更新は、例えばサイトを再構築する必要があるなど、自然な機会を待って行ってください。

このプラグインは、以前に私の個人の GitHub から Pavilion のアカウントへ移行されました。リポジトリが移行されると、GitHub は自動的に古い場所へのすべてのリンクを新しい場所へリダイレクトします。

最初の投稿は、今後数週間でさらに変更される予定です。詳細なドキュメントは thepavilion.io に作成し、ここ meta にはより短い説明を記載する予定です。

「いいね!」 4

素晴らしい、それは知りませんでした :+1:t2:

またしてもサポートいただきありがとうございます!

「いいね!」 3