@eeacms/volto-eea-website-policy 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [2.4.0](https://github.com/eea/volto-eea-website-policy/compare/2.3.2...2.4.0) - 27 February 2025
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix(routes): endless reload when we hit routes outside of /en and not found [David Ichim - [`6a99118`](https://github.com/eea/volto-eea-website-policy/commit/6a99118dd9f2b6873f0f82b75569b3fd4f0c873d)]
12
+
13
+ #### :house: Internal changes
14
+
15
+ - style: Automated code fix [eea-jenkins - [`154ca83`](https://github.com/eea/volto-eea-website-policy/commit/154ca83605ac94c8f94dbec176181336be699d78)]
16
+ - chore(docs): added diff information for blacklistRoutes.js changes [David Ichim - [`a0f6e9a`](https://github.com/eea/volto-eea-website-policy/commit/a0f6e9a2c12e8bc5ec9a89134293dc0c973bb842)]
17
+ - style: Automated code fix [eea-jenkins - [`9c9fc11`](https://github.com/eea/volto-eea-website-policy/commit/9c9fc116cb476e3320716965f1dfc17b6e517fe0)]
18
+
19
+ #### :hammer_and_wrench: Others
20
+
21
+ - try to use specific version for plone-backend [David Ichim - [`04e9e8a`](https://github.com/eea/volto-eea-website-policy/commit/04e9e8aac57e9af9b0c8cc5ba24279d5ed22482d)]
22
+ - Update package.json [David Ichim - [`baf866f`](https://github.com/eea/volto-eea-website-policy/commit/baf866f7efed437c1c3f664cadc24aba91ddc6c8)]
7
23
  ### [2.3.2](https://github.com/eea/volto-eea-website-policy/compare/2.3.1...2.3.2) - 30 January 2025
8
24
 
9
25
  #### :bug: Bug Fixes
@@ -57,12 +73,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
57
73
  - removed double rolesWhoCanChangeLayout setting [David Ichim - [`37dab9e`](https://github.com/eea/volto-eea-website-policy/commit/37dab9ef04dc1497655e49186f398b5dd53f39b1)]
58
74
  - use contextnavigation in policy [nileshgulia1 - [`eea2258`](https://github.com/eea/volto-eea-website-policy/commit/eea2258244c146ff682e055ffb88cf0b9020da93)]
59
75
  - move contextNav to volto-eea-website-theme [nileshgulia1 - [`07aa147`](https://github.com/eea/volto-eea-website-policy/commit/07aa14746a0253f75dc7c63610e1998eae6ffbf5)]
60
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`f620f72`](https://github.com/eea/volto-eea-website-policy/commit/f620f72b1bee27d9215b4cec5ddbe125ae0f7030)]
61
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`13b94c3`](https://github.com/eea/volto-eea-website-policy/commit/13b94c308e20970b4a30e1ec12734e8eaabfffb9)]
62
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8ebc23d`](https://github.com/eea/volto-eea-website-policy/commit/8ebc23dac8134ffed5b8f89d117cec1a13790c2c)]
63
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a57c3eb`](https://github.com/eea/volto-eea-website-policy/commit/a57c3eb88ad31cc50f5321c406ac5b5d918bf623)]
64
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`f26c537`](https://github.com/eea/volto-eea-website-policy/commit/f26c537fa75fcb6eedad808a933a8a0689eda9f8)]
65
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b1491ca`](https://github.com/eea/volto-eea-website-policy/commit/b1491ca3c9f07a7b91b9e892b0e53e4cf82762ce)]
66
76
  - Added extra handleOutsideClick on Accordion mobile and tablet to close when clicking besides the smaller menu [David Ichim - [`6d36534`](https://github.com/eea/volto-eea-website-policy/commit/6d365349ba9f779b527344d6d109c77d77501acf)]
67
77
  - close nav on tablet or mobile resolution by default [David Ichim - [`9e119d2`](https://github.com/eea/volto-eea-website-policy/commit/9e119d23d50dd5a614279da6ec3ccc369a16ba19)]
68
78
  - dropped useless code [David Ichim - [`7f5c122`](https://github.com/eea/volto-eea-website-policy/commit/7f5c122c596eb4db7f0ea4c81708b3c88aca657b)]
@@ -87,14 +97,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
87
97
 
88
98
  #### :hammer_and_wrench: Others
89
99
 
90
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`74f7cb1`](https://github.com/eea/volto-eea-website-policy/commit/74f7cb1b4f7dd3232f9a6c0ad35e50bc86b64e60)]
91
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c8978f0`](https://github.com/eea/volto-eea-website-policy/commit/c8978f02c53c38d88b654544051aa28ba5ccd05c)]
92
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`fb31e28`](https://github.com/eea/volto-eea-website-policy/commit/fb31e285959820147aa07e827cea25589d27be63)]
93
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`3b0c059`](https://github.com/eea/volto-eea-website-policy/commit/3b0c059772a0ca32f398c17b6ddb74be8e2f0060)]
94
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`25d16e4`](https://github.com/eea/volto-eea-website-policy/commit/25d16e401b4d2685a201a1b3a9830916ed4c5b80)]
95
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d4fdfaf`](https://github.com/eea/volto-eea-website-policy/commit/d4fdfaf94d8fa962906cf713c865202bbff1ff60)]
96
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`742d72c`](https://github.com/eea/volto-eea-website-policy/commit/742d72c1f020fc7a2ed553dc739be54daeb2283d)]
97
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e3dc5ef`](https://github.com/eea/volto-eea-website-policy/commit/e3dc5ef5da18aa64091388d8779dcc2819e5ad80)]
98
100
  ### [2.2.2](https://github.com/eea/volto-eea-website-policy/compare/2.2.1...2.2.2) - 28 August 2024
99
101
 
100
102
  #### :bug: Bug Fixes
@@ -103,10 +105,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
103
105
 
104
106
  #### :hammer_and_wrench: Others
105
107
 
106
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2703b09`](https://github.com/eea/volto-eea-website-policy/commit/2703b09f3803fa058b45f3f55c5343ab548139a1)]
107
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2506307`](https://github.com/eea/volto-eea-website-policy/commit/2506307c355c2de50a40b76a6c09ac1989d11be1)]
108
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`48999a4`](https://github.com/eea/volto-eea-website-policy/commit/48999a4a5a16593ca90981a72a4606abc4a02e89)]
109
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`de57cc0`](https://github.com/eea/volto-eea-website-policy/commit/de57cc0093cec55cf372fe4beb610f77588b4bb3)]
110
108
  ### [2.2.1](https://github.com/eea/volto-eea-website-policy/compare/2.2.0...2.2.1) - 27 August 2024
111
109
 
112
110
  #### :bug: Bug Fixes
@@ -115,8 +113,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
115
113
 
116
114
  #### :hammer_and_wrench: Others
117
115
 
118
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e333afd`](https://github.com/eea/volto-eea-website-policy/commit/e333afd4354f5a78f7c2aec9026df928219c144a)]
119
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9cb821a`](https://github.com/eea/volto-eea-website-policy/commit/9cb821a08010dfae144a5a4ae30e1c40da65d02a)]
120
116
  ### [2.2.0](https://github.com/eea/volto-eea-website-policy/compare/2.1.1...2.2.0) - 26 August 2024
121
117
 
122
118
  #### :rocket: New Features
@@ -125,20 +121,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
125
121
 
126
122
  #### :hammer_and_wrench: Others
127
123
 
128
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9864108`](https://github.com/eea/volto-eea-website-policy/commit/9864108aea2be5def74d4d89542e0babf1fbc93b)]
129
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d406101`](https://github.com/eea/volto-eea-website-policy/commit/d40610109bd581903a4a6212867197a352b3cc06)]
130
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`16936d4`](https://github.com/eea/volto-eea-website-policy/commit/16936d4b67baead7f2572eb19c47c9423da1af5a)]
131
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`1c1c92b`](https://github.com/eea/volto-eea-website-policy/commit/1c1c92bc8ea0a036cebf2b854197c52dd1f8681a)]
132
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`21accb1`](https://github.com/eea/volto-eea-website-policy/commit/21accb12e958b832f7463da93684f470420d1714)]
133
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`4898d16`](https://github.com/eea/volto-eea-website-policy/commit/4898d1673ba71098d18385d123f1fa403ff8089e)]
134
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c4e596f`](https://github.com/eea/volto-eea-website-policy/commit/c4e596f4efbee0f835bf293f713da21669bc8c00)]
135
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aa79040`](https://github.com/eea/volto-eea-website-policy/commit/aa7904074d9b90208218b4a801ea68491727de68)]
136
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c3aa38`](https://github.com/eea/volto-eea-website-policy/commit/6c3aa382200cd756f4bd7b40fee96bef71d5079e)]
137
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9adc480`](https://github.com/eea/volto-eea-website-policy/commit/9adc480e0edf278386a065bf30b66c138592ee82)]
138
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5554c13`](https://github.com/eea/volto-eea-website-policy/commit/5554c13183d7adda41dca07593fd51846b0d1375)]
139
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e526958`](https://github.com/eea/volto-eea-website-policy/commit/e52695821dce6790ff89213f967569bce223680b)]
140
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7e0381c`](https://github.com/eea/volto-eea-website-policy/commit/7e0381cd77ef067541585421a94536849dbdf4b5)]
141
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`3473b02`](https://github.com/eea/volto-eea-website-policy/commit/3473b02f98ea09fe4afa46389f14468c1897586d)]
142
124
  ### [2.1.1](https://github.com/eea/volto-eea-website-policy/compare/2.1.0...2.1.1) - 30 May 2024
143
125
 
144
126
  #### :house: Internal changes
@@ -147,12 +129,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
147
129
 
148
130
  #### :hammer_and_wrench: Others
149
131
 
150
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c297b9e`](https://github.com/eea/volto-eea-website-policy/commit/c297b9efe743ad1f95ab662007a2186b5f042f4c)]
151
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b11c055`](https://github.com/eea/volto-eea-website-policy/commit/b11c055d0a41c89a60f70875124994ba52772e48)]
152
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a77d04e`](https://github.com/eea/volto-eea-website-policy/commit/a77d04e9f1e4d6b8657e09fd1a2bcde66499f77f)]
153
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`12c6e92`](https://github.com/eea/volto-eea-website-policy/commit/12c6e92e4157896bf812dbbd8996c754b491d3ea)]
154
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`0aa866d`](https://github.com/eea/volto-eea-website-policy/commit/0aa866dc6fb5f4226a99a3e192a958af60385185)]
155
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7517f96`](https://github.com/eea/volto-eea-website-policy/commit/7517f96d82efd6a7ddaa746c81a51997583363f6)]
156
132
  ### [2.1.0](https://github.com/eea/volto-eea-website-policy/compare/2.0.0...2.1.0) - 9 May 2024
157
133
 
158
134
  #### :rocket: New Features
@@ -162,10 +138,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
162
138
  #### :hammer_and_wrench: Others
163
139
 
164
140
  - Release 2.1.0 [alin - [`da22af4`](https://github.com/eea/volto-eea-website-policy/commit/da22af436092236d7ef6e8568e3eca4813d517b5)]
165
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9a5d706`](https://github.com/eea/volto-eea-website-policy/commit/9a5d7064e829622e2627c616c4ca1ce71511dfcb)]
166
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`f8b40e9`](https://github.com/eea/volto-eea-website-policy/commit/f8b40e961138efc4090d0ab45a5689905c672b15)]
167
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`4ab2144`](https://github.com/eea/volto-eea-website-policy/commit/4ab2144e02291d98064b001d9eb40417da4d1795)]
168
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5af4642`](https://github.com/eea/volto-eea-website-policy/commit/5af464227c6695c7e2d3ccd9f240c2a5071bfefa)]
169
141
  ## [2.0.0](https://github.com/eea/volto-eea-website-policy/compare/1.15.0...2.0.0) - 22 April 2024
170
142
 
171
143
  #### :rocket: New Features
@@ -238,7 +210,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
238
210
 
239
211
  #### :hammer_and_wrench: Others
240
212
 
241
- - test: [JENKINS] fail with logs on coverage [valentinab25 - [`5cf68f8`](https://github.com/eea/volto-eea-website-policy/commit/5cf68f8db34448d10fe993d16541ad9732434cc8)]
242
213
  ### [1.12.0-beta.1](https://github.com/eea/volto-eea-website-policy/compare/1.11.1...1.12.0-beta.1) - 12 January 2024
243
214
 
244
215
  #### :hammer_and_wrench: Others
@@ -259,11 +230,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
259
230
  #### :hammer_and_wrench: Others
260
231
 
261
232
  - Release 1.11.0 [Alin Voinea - [`3249160`](https://github.com/eea/volto-eea-website-policy/commit/3249160422c6c6e0cf14823b614f8885101a847a)]
262
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`8beb7e7`](https://github.com/eea/volto-eea-website-policy/commit/8beb7e7a12cbc314e56e4b1aceab5ef8d00ca6f3)]
263
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`12d3da1`](https://github.com/eea/volto-eea-website-policy/commit/12d3da12e9a3b0882cf55efe2d40f3032724d41b)]
264
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`0af0764`](https://github.com/eea/volto-eea-website-policy/commit/0af076467120ed9a80c697931e869837b92a0a4c)]
265
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`8662e3e`](https://github.com/eea/volto-eea-website-policy/commit/8662e3e5fc3640d678ce320eb8856a37d419306c)]
266
- - test: [JENKINS] Improve cypress time [valentinab25 - [`ef1074f`](https://github.com/eea/volto-eea-website-policy/commit/ef1074fdf968cafdf476d4ee4951eb18ebac048a)]
267
233
  ### [1.10.0](https://github.com/eea/volto-eea-website-policy/compare/1.9.2...1.10.0) - 2 November 2023
268
234
 
269
235
  #### :rocket: New Features
@@ -272,7 +238,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
272
238
 
273
239
  #### :house: Internal changes
274
240
 
275
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`8b1b422`](https://github.com/eea/volto-eea-website-policy/commit/8b1b42297b46d9fb7325589b3bd043233c0d66e9)]
276
241
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`44ac62e`](https://github.com/eea/volto-eea-website-policy/commit/44ac62e6f8b7e5b7d57edfbf82812c91dc5d6bba)]
277
242
  - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`b9a46d8`](https://github.com/eea/volto-eea-website-policy/commit/b9a46d85a64739188a3df9e8cbe645418b5d8b0a)]
278
243
 
@@ -393,7 +358,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
393
358
 
394
359
  - Release 1.5.0 [Alin Voinea - [`a3dea8e`](https://github.com/eea/volto-eea-website-policy/commit/a3dea8ea15cb8d2a876dc10da926ece3a5707ea9)]
395
360
  - test(Jenkinsfile): Use latest stable volto for testing [Alin Voinea - [`a8f7123`](https://github.com/eea/volto-eea-website-policy/commit/a8f712364187f9638886667c249fa102cb49b5c0)]
396
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`124a8f8`](https://github.com/eea/volto-eea-website-policy/commit/124a8f8ad4ced507aeec27012d725f2e2b977e08)]
397
361
  ### [1.4.0](https://github.com/eea/volto-eea-website-policy/compare/1.3.4...1.4.0) - 21 February 2023
398
362
 
399
363
  #### :rocket: New Features
@@ -473,7 +437,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
473
437
  #### :hammer_and_wrench: Others
474
438
 
475
439
  - Release 1.1.0 [Alin Voinea - [`0291b3b`](https://github.com/eea/volto-eea-website-policy/commit/0291b3bb7b4c6ab09ca98728885cea4051eac8e3)]
476
- - yarn 3 [Alin Voinea - [`593aa58`](https://github.com/eea/volto-eea-website-policy/commit/593aa58eaa4d28aced0603b7f7dd125c857a6f54)]
477
440
  ### [1.0.4](https://github.com/eea/volto-eea-website-policy/compare/1.0.3...1.0.4) - 22 November 2022
478
441
 
479
442
  #### :nail_care: Enhancements
@@ -519,7 +482,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
519
482
 
520
483
  #### :hammer_and_wrench: Others
521
484
 
522
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d153f54`](https://github.com/eea/volto-eea-website-policy/commit/d153f54e55e918fa4746e05488c734624eaf14a9)]
523
485
  ### [0.4.0](https://github.com/eea/volto-eea-website-policy/compare/0.3.3...0.4.0) - 19 September 2022
524
486
 
525
487
  #### :hammer_and_wrench: Others
@@ -595,7 +557,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
595
557
  - format index.js [Andrei Grigore - [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)]
596
558
  - Update index.js [Alexandru Ghica - [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)]
597
559
  - Added externalRoutes [Alexandru Ghica - [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)]
598
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`575cca6`](https://github.com/eea/volto-eea-website-policy/commit/575cca674602ca2e1c2a41300c47ba594ff49aa0)]
599
560
  ### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1) - 4 March 2022
600
561
 
601
562
  #### :hammer_and_wrench: Others
@@ -608,5 +569,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
608
569
 
609
570
  #### :hammer_and_wrench: Others
610
571
 
611
- - yarn bootstrap [Alin Voinea - [`9b4d197`](https://github.com/eea/volto-eea-website-policy/commit/9b4d197cbc7992566cb36524d190078d5ad21a44)]
612
572
  - Initial commit [Alin Voinea - [`3800692`](https://github.com/eea/volto-eea-website-policy/commit/3800692f7a4de6460815bd6061facacb986cbef0)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,5 @@
1
+ ### Refs #283616 customized `blacklistRoutes` to:
2
+
3
+ - Redirects to /en/resolveuid/ when /resolveuid/ is visited
4
+ - Replace window location only when route match doesn't come from a regex
5
+ to properly handle urls hitting notInEn regex without an endless loop
@@ -0,0 +1,21 @@
1
+ 24,39c24,26
2
+ < // EEA Redirect to /en fixing too many relative ../
3
+ < if (
4
+ < pathname.indexOf('resolveuid') !== -1 &&
5
+ < pathname.indexOf('/en/') === -1
6
+ < ) {
7
+ < window.location.replace(
8
+ < pathname.replace('/resolveuid/', '/en/resolveuid/'),
9
+ < );
10
+ < }
11
+ < // EEA replace location only when route match doesn't come from a regex
12
+ < // to properly handle urls hitting notInEn regex
13
+ < if (!(route.match.path instanceof RegExp)) {
14
+ < window.location.replace(
15
+ < route.url ? route.url(action.payload) : pathname,
16
+ < );
17
+ < }
18
+ ---
19
+ > window.location.replace(
20
+ > route.url ? route.url(action.payload) : pathname,
21
+ > );
@@ -0,0 +1,47 @@
1
+ import config from '@plone/volto/registry';
2
+ import { matchPath } from 'react-router';
3
+
4
+ const blacklistRoutes =
5
+ ({ dispatch, getState }) =>
6
+ (next) =>
7
+ (action) => {
8
+ if (typeof action === 'function') {
9
+ return next(action);
10
+ }
11
+
12
+ switch (action.type) {
13
+ case '@@router/LOCATION_CHANGE':
14
+ const { pathname } = action.payload.location;
15
+ const { externalRoutes = [] } = config.settings;
16
+
17
+ const route = externalRoutes.find((route) =>
18
+ matchPath(pathname, route.match),
19
+ );
20
+
21
+ if (!route) {
22
+ return next(action);
23
+ } else {
24
+ // EEA Redirect to /en fixing too many relative ../
25
+ if (
26
+ pathname.indexOf('resolveuid') !== -1 &&
27
+ pathname.indexOf('/en/') === -1
28
+ ) {
29
+ window.location.replace(
30
+ pathname.replace('/resolveuid/', '/en/resolveuid/'),
31
+ );
32
+ }
33
+ // EEA replace location only when route match doesn't come from a regex
34
+ // to properly handle urls hitting notInEn regex
35
+ if (!(route.match.path instanceof RegExp)) {
36
+ window.location.replace(
37
+ route.url ? route.url(action.payload) : pathname,
38
+ );
39
+ }
40
+ }
41
+ break;
42
+ default:
43
+ return next(action);
44
+ }
45
+ };
46
+
47
+ export default blacklistRoutes;