kartevonmorgen / kartevonmorgen.ts

Mapping-Frontend to find and add sustainable Organisations (Initiatives, Companies) and Events on Kartevonmorgen.org / MapofTomorrow.org
https://kartevonmorgen.org/
GNU General Public License v3.0
11 stars 12 forks source link

Update links from tables to new frontend #202

Closed wellemut closed 1 month ago

wellemut commented 7 months ago

Describe the bug Similar problem with redirections form old links (https://github.com/kartevonmorgen/kartevonmorgen.ts/issues/201) we have, if I click on one of the events in the table: https://www.kartevonmorgen.org/t/kvm?&bbox=48.00807051354861%2C7.544860839843751%2C48.22124165162929%2C8.204040527343752&end_min=1682373600 (embedde under https://klimafitemmendingen.de/veranstaltungen/)

The Link https://www.kartevonmorgen.org/#/?entry=6cc65b19d4b544e2b9a43df02192ac68 does not show the event details, but just the landingpage https://www.kartevonmorgen.org

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on one of the event names
  3. you end up on our landingpage https://www.kartevonmorgen.org instead of the event details!

Expected behavior

@navid-kalaei

Screenshots grafik

Additional context Original Issue: https://github.com/kartevonmorgen/kartevonmorgen.ts/issues/94

wellemut commented 6 months ago

@alex0107 I have solved this redirection problem by with the Wordpress-Plugin "Redirections" https://www.kartevonmorgen.org/wp-admin/tools.php?page=redirection.php

grafik

Explenation: https://redirection.me/support/redirect-regular-expressions/

Extracting Source Information

Not only can a regular expression match many URLs, it can also extract information from the source URL and copy it to the target URL.

Why would you want to do that? Let’s look at another example. Say you have a site where some pages are under the /oldpage/ directory, and you’ve moved these to /newpage/.

/oldpage/bananas/
/oldpage/best-post-in-the-world/​

And you want to move these to:

/newpage/bananas/
/newpage/best-post-in-the-world/

That is, you want to change /oldpage/ to /newpage/, but keep bananas and best-post-in-the-world.

To do this you can create a regular expression such as /oldpage/(.*).

Note that the .* is surrounded brackets. This tells Redirection to ‘capture’ the data. The target URL would then be /newpage/$1.

Here the $1 is replaced by the contents of the captured (.*). And so:

/oldpage/bananas => /oldpage/(bananas) => /newpage/$1 => /newpage/bananas

wellemut commented 6 months ago

@alex0107 @navid-kalaei this quick fix is not working!

wellemut commented 3 months ago

@navid-kalaei do you know why these links dont work? https://www.kartevonmorgen.org/t/kvm?type=event&bbox=48.05949581959207%2C7.661590576171876%2C48.192412189186236%2C7.932815551757813&end_min=1716847200

It sends me allway to belgium without showing any entry details...

navid-kalaei commented 2 months ago

fixed on commit 3e55327

wellemut commented 2 months ago

Perfect, the redirection from list view

https://dev.kartevonmorgen.org/t/kvm?type=event&bbox=48.05949581959207%2C7.661590576171876%2C48.192412189186236%2C7.932815551757813&end_min=1716847200

To the map view works just perfect

https://dev.kartevonmorgen.org/m/main/ev/1b65d3e3d5484a5287089f20dc10d6e2?c=48.1071%2C7.8599&z=16&mapColorMode=gray

Thank you @navid-kalaei

wellemut commented 1 month ago

Problem is solved The links from the events-Tabel on https://klimafitemmendingen.de/veranstaltungen/ direct perfectly to the map

Thanks @navid-kalaei