Bug: question mark links have gone missing from the maps

In the Local side there used to be question mark icons in the filter which when clicked would redirect users to an About and How To guide for each activity. I’m not sure when and why they disappeared. They looked like this, and i think they had a small circle around the ? mark to make it look more like a button.

You can see the links are still present in i18n, but are not showing up on the map: https://github.com/focallocal/fl-maps/blob/master/imports/both/i18n/en/phm/categories.json

The expected behviour if there is no link is to not show the ? icon

What page can I access this filter on?

Edit: Actually I found it, however it just links me to the production site (Public Happiness). I read most of the documentation, but maybe I’m missing something. I can certainly fix this issue.

1 Like

Sorry @nyne87 what is it you’re clicking that’s linking you to the production site, and is it the homepage you’re being linked to?

You might be running into this issue which i just noticed yesterday: https://publichappinessmovement.com/t/topic/2868/41

The homepage links were working well not too long ago so i’m not sure what changed.

Ah wait, i think i got it. You mean the links where the ‘?’ marks which were in the filter are supposed to send users to, right?

Most of those are on our old site which currently redirects to the PHM homepage. Copying them all across is a task on my to-do list.

There’s a few i’ve done already here which you can use to test it out: Approved Activities List - Public Happiness

The others just leave as they are and once the links are back i’ll copy the pages over and hook the urls up in i18n

I’m actually just trying to find where I can debug and test this page in the local dev environment.

1 Like

Ah, you haven’t set up the Discourse side so you don’t have the navbar. Its a good point though, that information should be easier to find.

It’s /map:
https://fl-maps.publichappinessmovement.com/map

You can find all the pages and their relation on the maps side here: https://github.com/focallocal/fl-maps/blob/master/public/dcs-website.json

Nice ok. I will work on setting up Discourse.

1 Like

Up to you. There’s plenty of tasks available which don’t touch Discourse, but longer term its easier as you can see how everything ties together on localhost.

Almost there, getting the below when launching the dev env with discourse running:

image

I’m sure I’ll figure it out, just wanted to see if you’ve encountered this off the top.

Edit: I actually think there is more setup to be done. I have to edit the app.yml file and I’m trying to locate it. Thx.

1st time i’ve seen that one. I’ll just type out the error message so its easy to find for others and we can move this into our documentation section once its resolved.

Error compiling CSS asset

Runtime error: Discourse does not support compiling scss/sass files via sprockets

I don’t know what would have caused it, but did you try pre-compiling your assets?

Think I’m missing these steps, but having trouble. Is this something I have to do locally?

  • Copy the plugin’s GitHub git clone url.
  • Access your container’s app.yml file (present in /var/discourse/containers/)
cd /var/discourse
nano containers/app.yml
  • Add the plugin’s repository URL to your container’s app.yml file:
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-spoiler-alert.git

Add the plugin’s git clone url just below the line containing git clone https://github.com/discourse/docker_manager.git)Follow the existing format of the docker_manager.git line; if it does not contain sudo -E -u discourse then insert - git clone https://github.com/discourse/discourse-spoiler-alert.git.

  • Rebuild the container:
cd /var/discourse
./launcher rebuild app

Maybe we can schedule a call so I can see how your discourse integration looks if I can’t figure it out? I’m very close, dev env runs but as soon as I spin up the discourse server on localhost:4200, I get that error.

1 Like

That 1st part is for the plugins we use/build.

You can find the full list here:

Then you rebuild the app. Once they are both running independently we hook them together with our plugin Docuss: Components - Docuss

Which inserts the React app inside of Discourse as an iframe and deals with communication between the two.

@Marvelxy have i missed anything?

Also I’m not sure if i can, but would it make setup of localhost easier if i can save a Discourse backup file with all our settings just the content stripped out, so new devs would only need to restore it to get the two apps running together?

I didn’t go through the docker route when in installed it, I installed without docker. I think you should try that option.

1 Like

Yea I haven’t gone the docker route either, just wasn’t sure if I had to. I have discourse fully installed and spins up just fine. However as soon as it’s up and I run the dev env for phm in tandem, I get that error message for phm.

Runtime error: Discourse does not support compiling scss/sass files via sprockets

I followed this guide for Discourse: Install Discourse on macOS for development - developers - Discourse Meta

I think where I may be getting stuck is with the Docuss plug-in (GitHub - sylque/dcs-discourse-plugin: A Discourse plugin that allows to integrate your website or web app with Discourse), as their documentation on github appears to be docker related and what I was referencing above.

1 Like

Wondering if I’m on the wrong branch? I’m still working on deploy-phm currently. Not super familiar with this environment, so unsure if I’m missing something along those lines or if my settings.json file needs to be adjusted.

1 Like

Ok, getting somewhere, yay progress!. I’m now getting:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'docuss_enabled')

And I see @AndyatFocallocal you had this error 2 yrs back and you posted it on reddit, which you may have gotten some help privately.

Found this thread: Updating Docuss to work with new Discourse - #26 by AndyatFocallocal but still getting the error.

Edit: Think it’s actually my version of discourse. The property SiteSettings from Discourse.Application doesnt exist. I’m going to conform the docuss plugin to the new specs and see how it goes. Hope re-editing my replies are spamming y’all.

1 Like

The branch is correct.

Let us know whether the new version works. Did you follow the Docuss setup guide as that contains some settings which would need to be set?

Would be great if you record your process so others can follow as it seems like its been a tricky one and i’m sure there’s lots of great tips, dead ends and solutions that will help others in the future :slight_smile:

Yes certainly will when I get it working. Running into CORS error now when docuss tries to access the settings file here: https://github.com/focallocal/fl-maps/blob/master/public/dcs-website.json

Is that the exact URL we place here?

1 Like

Pretty sure its this one, let me check

If anything is missing from the walkthrough please make a note of it and we’ll make sure together that it gets filled in.

There’s also the full site setup walkthrough which is for the online version but might contain anything which is missing: Complete Walkthrough - Setting up an instance of our platform