Skip to content

Commit

Permalink
Merge branch 'release/3.2.12' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Oct 26, 2023
2 parents 58f611d + 72d40fd commit 0ec414b
Show file tree
Hide file tree
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

## 3.2.12 - 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))

## 3.2.11 - 2023.08.15
### Added
* Add db index for `redirectMatchType` to help with query performance ([#282](https://github.com/nystudio107/craft-retour/issues/282))
Expand Down
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
Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion buildchain/src/vue/RedirectsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion buildchain/src/vue/ShortlinksTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "3.2.11",
"version": "3.2.12",
"keywords": [
"craftcms",
"craft-plugin",
Expand Down
11 changes: 3 additions & 8 deletions src/controllers/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,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);
Expand Down

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 0ec414b

Please sign in to comment.