diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml index 711468f2..2404918b 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -25,7 +25,7 @@ body: - type: input attributes: label: Which Umami version are you using? (if relevant) - description: 'For example: Chrome, Edge, Firefox, etc' + description: 'For example: 2.18.0, 2.15.1, 1.39.0, etc' - type: input attributes: label: Which browser are you using? (if relevant) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 314c6944..835407b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ env: jobs: build: + # Only run the CI if it belongs to the original repository + if: github.repository == 'umami-software/umami' runs-on: ubuntu-latest strategy: diff --git a/scripts/data-migrations/convert-utm-clid-columns.sql b/scripts/data-migrations/convert-utm-clid-columns.sql index cf85a156..fffe1ddb 100644 --- a/scripts/data-migrations/convert-utm-clid-columns.sql +++ b/scripts/data-migrations/convert-utm-clid-columns.sql @@ -25,7 +25,8 @@ FROM (SELECT event_id, website_id, session_id, (regexp_matches(url_query, '(?:[&?]|^)utm_medium=([^&]+)', 'i'))[1] AS utm_medium, (regexp_matches(url_query, '(?:[&?]|^)utm_source=([^&]+)', 'i'))[1] AS utm_source, (regexp_matches(url_query, '(?:[&?]|^)utm_term=([^&]+)', 'i'))[1] AS utm_term - FROM "website_event") url + FROM "website_event" + WHERE url_query IS NOT NULL) url WHERE we.event_id = url.event_id and we.session_id = url.session_id and we.website_id = url.website_id; @@ -45,4 +46,4 @@ SET fbclid = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[ utm_medium = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_medium=[^&]+'), '=', -1), '&', 1), 255), utm_source = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_source=[^&]+'), '=', -1), '&', 1), 255), utm_term = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_term=[^&]+'), '=', -1), '&', 1), 255) -WHERE 1 = 1; +WHERE url_query IS NOT NULL; diff --git a/src/lib/detect.ts b/src/lib/detect.ts index a023d27d..99c101ab 100644 --- a/src/lib/detect.ts +++ b/src/lib/detect.ts @@ -124,7 +124,7 @@ export async function getLocation(ip: string = '', headers: Headers, hasPayloadI if (!global[MAXMIND]) { const dir = path.join(process.cwd(), 'geo'); - global[MAXMIND] = await maxmind.open(path.resolve(dir, 'GeoLite2-City.mmdb')); + global[MAXMIND] = await maxmind.open(process.env.GEOLITE_DB_PATH || path.resolve(dir, 'GeoLite2-City.mmdb')); } const result = global[MAXMIND].get(ip);