Locations Plugin


(Sudaraka Jayathilaka) #203

Hello @merefield,
First thank you for using the feature :blush: . Can you please check whether the users you are referring to are shown in the user list which can be seen in http://my-dev-ip/u


#204

Thanks for responding. No results either. No results were found.

Yet as I said http://my-dev-ip/admin/users/list/active has three users … (but only one ‘human’).

NB only other plug-in installed is discourse-plugin-outlet-locations


(Sudaraka Jayathilaka) #205

The issue is with how Discourse updates the users list as per my suspicion. It is explained here.

Are you running sidekiq for the forum? If you do, the users will appear in the users list after some time. When you can see the users on /u list, you will be able to see the user locations on the map as well :slight_smile:. Please let me know if the issue isn’t resolved


#206

aha!

Though I can see the data in the Ember record whilst debugging, but nevertheless you are correct that sidekiq is not running. From the dashboard:

devmode

Any way to cajole it into running the required job from command line without having to have sidekiq fully up?


(Sudaraka Jayathilaka) #207

What is the deployment method you used for deploying the forum? you may have to revisit the tutorial you followed for that and look for how to run sidekiq. If you are on local you can simply use
bundle exec sidekiq in console.
I think this works for other deployments as well. But I have to check :grin:


#208

The normal cloud dev install.

Here’s a couple of interesting things from debug with widget/map. Should showAvatar be ‘undefined’? Note the data from the location is in the browser for the user:

If I trace that back … the args are undefined in map-component?:

so looks like showAvatar being undefined is the issue? Any idea why it might be?

(server would not allow me to successfully run sidekiq:

Fatal process OOM in heap setup)


#209

I really like the idea of the plugin, but I ran into some issues while testing it. And I had a few requests.

Features

  • Could you add State as an Input Field?
  • Add a cancel button so if you are editing an address that has already been entered, you can exit without making changes.
  • Add an option for Default Country.

Issues

  • If a geocode isn’t selected, the address is lost when saving the post. The images below show what I am seeing.
    image

    image

  • If a geocode isn’t selected, I am not able to click done if a search has been performed or I edit a post. The error is below.

_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446 TypeError: Cannot read property ‘lat’ of undefined
at submit (_plugin-third-party-25726b7617b6488f7c8b2b1a512009ba4e0567322c14839e6c70ca43bba1af2a.js:11392)
at send (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:43589)
at s.triggerAction (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:47291)
at sendAction (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:50748)
at s.click (_application-52dc2f1eb1666e764d21013234d1859d2cf67d8180f80e26e6ff85cdefc3230f.js:40582)
at s.trigger (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:52345)
at s.n [as trigger] (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:50483)
at p.run (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12915)
at p.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12952)
at Function.u.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:34030)


(Angus McLeod) #210

@merefield Sidekiq has to be running for the user map feature to work. Did you manage to get it running?

I’ve added ‘state’ as a possible input field: Add state && move country_codes to site serializer · angusmcleod/discourse-locations@da3bbf8 · GitHub

Do you mean a button that performs the same function as the ‘x’ in the top corner of the add location modal?

I’ve added this too: Add default country setting · angusmcleod/discourse-locations@478a980 · GitHub

I’m not sure what you mean by “If a geocode isn’t selected”


#211

Thank you for those changes.

I don’t see a ‘x’ at the top of modal. While testing this, I noticed different behavior from the Events plugin modal as well. Clear will close the location modal, while clear does not close the events modal. I do not see an ‘x’ on the events modal either. I am on a version from a week ago for both.

If an address is added, but I don’t click Find Address, the address isn’t displayed.

This is what I see after closing the modal and before saving the post.
image

This is what I see after saving the post. And if I don’t have a name entered, then it only shows the location icon and no text.
image

If I go to edit the address, I am unable to click done in the modal again since I didn’t Find Address. Here is the error from the console. This error only goes away by clicking Find Address (which isn’t always desired) or refreshing the page.
image


(Jay Dawg) #212

@angus May I say what a brilliant plugin, there so much scope for this, I have one issue not sure if it has been addressed or if I am doing something wrong.

When I put the full address in,it finds the address which is fine but no icon displays on the map.

Also in some posts I only want to just put the city and country will it still show the post’s city?

Finally I get this error

DevTools failed to parse SourceMap: https://content.quantcount.com/adchoices/v2/css/300x250.css.map

Could this be stopping the map icon

Any help would be appreciated

Thanks