Skip to content

Commit

Permalink
Merge branch 'release/4.1.14' into v4
Browse files Browse the repository at this point in the history
khalwat committed Oct 26, 2023
2 parents bd22d53 + 349080b commit 013176e
Showing 71 changed files with 1,760 additions and 2,807 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Retour Changelog

## 4.1.14 - 2023.10.26
### Fixed
* Fixes issue where only first line of uploaded CSV is saved in cache in load balanced environment ([#286](https://github.com/nystudio107/craft-retour/pull/286))
* Strip off a leading `/` before making a site URL from a path, because otherwise `Craft.getUrl()` considers it an absolute URL and returns it ([#281](https://github.com/nystudio107/craft-retour/issues/281))

## 4.1.13 - 2023.08.15
### Added
* Add db index for `redirectMatchType` to help with query performance ([#282](https://github.com/nystudio107/craft-retour/issues/282))
1,410 changes: 839 additions & 571 deletions buildchain/package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions buildchain/src/vue/FileNotFoundUrl.vue
Original file line number Diff line number Diff line change
@@ -28,6 +28,8 @@ export default {
}
let absoluteUrl = new RegExp('^(?:[a-z]+:)?//', 'i');
if (!absoluteUrl.test(url) && !url.includes('$')) {
// Strip off a leading `/` because otherwise `Craft.getUrl()` considers it an absolute URL and returns it
url = url.replace(/^\//, '');
url = Craft.getSiteUrl(url);
}
4 changes: 3 additions & 1 deletion buildchain/src/vue/RedirectsTable.vue
Original file line number Diff line number Diff line change
@@ -256,7 +256,9 @@ export default {
let url = value;
let absoluteUrl = new RegExp('^(?:[a-z]+:)?//', 'i');
if (!absoluteUrl.test(url) && !url.includes('$')) {
url = Craft.getSiteUrl(value);
// Strip off a leading `/` because otherwise `Craft.getUrl()` considers it an absolute URL and returns it
url = url.replace(/^\//, '');
url = Craft.getSiteUrl(url);
}
return `
<a class="go" href="${url}" title="${url}" target="_blank" rel="noopener">${value}</a>
4 changes: 3 additions & 1 deletion buildchain/src/vue/ShortlinksTable.vue
Original file line number Diff line number Diff line change
@@ -256,7 +256,9 @@ export default {
let url = value;
let absoluteUrl = new RegExp('^(?:[a-z]+:)?//', 'i');
if (!absoluteUrl.test(url) && !url.includes('$')) {
url = Craft.getSiteUrl(value);
// Strip off a leading `/` because otherwise `Craft.getUrl()` considers it an absolute URL and returns it
url = url.replace(/^\//, '');
url = Craft.getSiteUrl(url);
}
return `
<a class="go" href="${url}" title="${url}" target="_blank" rel="noopener">${value}</a>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "nystudio107/craft-retour",
"description": "Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website",
"type": "craft-plugin",
"version": "4.1.13",
"version": "4.1.14",
"keywords": [
"craftcms",
"craft-plugin",
11 changes: 3 additions & 8 deletions src/controllers/FileController.php
Original file line number Diff line number Diff line change
@@ -302,14 +302,9 @@ public function actionImportCsv(string $siteHandle = null): Response
$filePath = Craft::$app->getPath()->getTempPath() . DIRECTORY_SEPARATOR . $filename;
$file->saveAs($filePath, false);
// Also save the file to the cache as a backup way to access it
$cache = Craft::$app->getCache();
$fileHandle = fopen($filePath, 'r');
if ($fileHandle) {
$fileContents = fgets($fileHandle);
if ($fileContents) {
$cache->set($filePath, $fileContents);
}
fclose($fileHandle);
$fileContents = @file_get_contents($filePath);
if ($fileContents) {
Craft::$app->getCache()->set($filePath, $fileContents);
}
// Read in the headers
$csv = Reader::createFromPath($file->tempName);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/web/assets/dist/assets/LegacyUrl-09306c16.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/web/assets/dist/assets/LegacyUrl-756dec46.js.map

This file was deleted.

1 change: 1 addition & 0 deletions src/web/assets/dist/assets/Retour-a1f98f87.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/web/assets/dist/assets/Retour-a1f98f87.css.gz
Binary file not shown.
1 change: 0 additions & 1 deletion src/web/assets/dist/assets/Retour-b8f8a875.css

This file was deleted.

Binary file removed src/web/assets/dist/assets/Retour-b8f8a875.css.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Binary file not shown.

This file was deleted.

Loading

0 comments on commit 013176e

Please sign in to comment.