activist-org / activist

An open-source activism platform
https://activist.org
GNU Affero General Public License v3.0
239 stars 194 forks source link

Landing page images disappearing on reload #223

Closed andrewtavis closed 1 year ago

andrewtavis commented 1 year ago

Terms

Behavior

A general problem I've been realizing on the landing page for some time now is that when the page is reloaded a couple times the fist images next to Get active, Get organized and Grow your organization will stop loading and we'll instead see their alternate text.

Ways to reproduce

Would be great if we could get this solved as its doubtless causing some non-ideal impressions.

baibhavKumar1 commented 1 year ago

Hi @andrewtavis , unable to reproduce the error. Please recheck and guide.

andrewtavis commented 1 year ago

Hey @Wholesomebruh πŸ‘‹ Thanks for writing in about this :) Glad that you’re not effected by this as well, I guess πŸ˜… What’s your browser, out of curiosity?

andrewtavis commented 1 year ago

Also super helpful to talk to you about this, as I now have a better definition of the bug 🐞😊 It would happen "randomly" as I was clicking around, but now I'm seeing that it's specifically after you navigate to a localized URL. To reproduce (checked on Chrome, Firefox, Edge and Safari):

Would be great if you can let me know if you can reproduce!

andrewtavis commented 1 year ago

Note also that the roadmap and FAQ page images are not experiencing this problem, so they work on localized and unlocalized URLs :)

andrewtavis commented 1 year ago

If you have interest in implementing a solution I'd be happy to assign you, @Wholesomebruh! We can discuss the solution further of course 😊

baibhavKumar1 commented 1 year ago

Hey @andrewtavis , from what I can see, there is issue in localization implementation.

For the image : https://activist.org/images/content_pages/art/get_active_dark.png works totally fine, whereas after localization , url changes to https://activist.org/en/images/content_pages/art/get_active_dark.png which gives the error. Same is with french and german language.

For resolving the issue, I tried to run code on my system , but I am unable to install the library . image Guide me through the process.

andrewtavis commented 1 year ago

@Wholesomebruh, assigned you so we can work on it :) What was the command that you ran in the terminal to try to get it up and running? The contribution guidelines has a section on the development environment that details how to set it up.

If that's not what you tried, could you report back and let me know if that's working?

baibhavKumar1 commented 1 year ago

Hey @andrewtavis , thank you so much for assigning , eventually I am unable to help as my system doesn't allows docker. If possible just try adding a "/" infront of images in

imageURL="images/content_pages/art/get_active"

in https://github.com/activist-org/activist/blob/main/frontend/pages/index.vue line 16,27,38. Please unassign me.

andrewtavis commented 1 year ago

Hey @Wholesomebruh :) You'd be welcome to use the GitHub UI to send along this PR 😊 If it doesn't work I'll try to find a different solution.

andrewtavis commented 1 year ago

We'll be able to check in the deployment previews that are generated by PRs to see if it's working, and if so I'd be happy to merge πŸ™ƒ

andrewtavis commented 1 year ago

Checking the code, this definitely seems to be the appropriate change, @Wholesomebruh. All the other images are working, and they have a / before images/content/.... I'd add that beyond lines 16, 27 and 38 in frontend/pages/index.vue, the change also needs to be made at line 50 😊

andrewtavis commented 1 year ago

Hope you choose to contribute the changes! You did do all the work :)

baibhavKumar1 commented 1 year ago

Did the "/" removed the bug?

andrewtavis commented 1 year ago

I believe it will :) I checked the code and for example the roadmap page has the following with /images/content_pages/... as you suggested, which is I believe why this image always works:

https://github.com/activist-org/activist/blob/d764516af41c804b4dac310bdb2e79a0bc511dfa/frontend/pages/about/roadmap.vue#L14

I can't check this locally as I think that on my localhost the images are being sent in a more consistent manner that they're not when in production, but your suggestion seems to be the right one.

If you open a PR with the changes to the four lines we'll be able to test to see if it works in production :)

baibhavKumar1 commented 1 year ago

Thank you sir , you are so supportive.I was just going to leave the issue. Thanks again .

On Sun, Jul 16, 2023 at 3:51β€―AM Andrew Tavis McAllister < @.***> wrote:

Closed #223 https://github.com/activist-org/activist/issues/223 as completed via #230 https://github.com/activist-org/activist/pull/230.

β€” Reply to this email directly, view it on GitHub https://github.com/activist-org/activist/issues/223#event-9830035872, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2GQSJ3BWKIP5Z7OED5FU5LXQMJVLANCNFSM6AAAAAA2K2W7PY . You are receiving this because you were mentioned.Message ID: @.***>

andrewtavis commented 1 year ago

Thank you, @Wholesomebruh! This was a very solid contribution. You first checked my issue and helped me diagnose it, then came up with the solution, and then implemented it. The result: https://activist.org/en/ πŸš€πŸ˜Š

I can confirm that this issue is closed πŸ₯³