Retour - Advanced redirects and error tracking for Kirby 3

@distantnative It works well, a couple of quick observations

  1. When clicking the + on the fails row it wasn’t clear I had switched to the redirects screen. I clicked again and it asked if I wanted to delete, I thought this was the fails, not the redirect.
  2. I can’t seem to be able to set up a home redirect.
    • putting in / doesn’t redirect at all, shows the home content which is default, but title shows ‘error’ and fails count goes up
    • leaving it blank results in a white screen with no content.

Edit: I was able to redirect home with a 301, not 200 which I had before. 200 appears to work redirecting anywhere but home.

I added for both issues so I can keep better track in them

No 1: I get it and will try to find ways to make this clearer.
No 2: I have to check all the details of it. Part of it is that 200 is not a redirect code, only those in the 3xx range are. So it won’t redirect but either deliver a page instead at the current path with the code or fail with the code. Though I need to check what’s happening with the title and the track count. Also never thought about a redirect of / as I thought, you’d rather set the Kirby home option.

1 Like

Sounds great.

Your plugin is flagging many failures for URLs, finding where those urls are is interesting. :thinking:

It is amusing to see wp-login.php as a common failure

You mean it is wrongly flagging requests as failures or it’s correctly flagging failures but you are surprised where these failing requests are coming from?

Donno, this feels high for 2 days

image

Seems it keeps failing on some of the normal content, but really not sure why or whatever, everything shows ok on the pages, and the referrer being the homepage 
 I don’t want to blame the plugin until I know for sure its not my site (its complex)

Oh boy, indeed. That doesn’t look right. And from the screenshot it looks like all these paths are media files (in the media folder)?

Edit: And I will blame the plugin :wink: This really needs more testing in real-life situations like yours to figure out reliable ways to track those fails.

Or maybe the plugin isn’t to blame here: Look what the console displays on your home page. There really seem to be a lod of media files that cannot be loaded and produce fails:

Today I actually understood what you mean and fixed it: In the next beta you can put / in the “Redirect to” field and it will be resolved with the home page. The thing with the status codes is still: Everything in the 3xx range will actually be redirected, other codes will lead to the page being returned but under the same old URL with this particular status code. I’d say for the vast majority of cases, you should go for a 3xx code.

New beta will handle this better: Clicking the + on the fails row takes you to the redirects screen with the form opened and the path prefilled. If you click add on the bottom right, the new redirect is added. If you click cancel, it gets discarded.

1 Like

How bizarre, I have honestly checked this out tons but doesn’t occur for me. Hmmm


For me both in Safari and Chrome. And they all seem to be media files with @2x in the name.

@distantnative Oh that sounds like a retina thing 
 I use windows, so will explain why I have not seen it. Does the site render ok for you?

The updates in the next beta sound good :slight_smile:

Yes, but with the normal images. Since I cannot find the @2x image paths in the source code with a quick cmd+F, I assume those request arise from one of your JS plugins/scripts.

Edit: maybe the retina.min.js? :wink:

Yea it will be that one, I will remove it I think until I can find a way to make Kirby present retina images

Beta 4 is here

Once more a lot of refactoring since beta 3. This time to tackle all the issues around multilang and/or custom template components. let me emphasise how much I appreiate everyone testing it – I hope we are getting to a stable 1.0.0 in the near future.

  • Require Kirby 3.0.3
  • Added permission handling
  • Added tbl-for-kirby for tables
  • Implement new workflow for adding fails as redirect
  • Refactored big parts of code base
  • Simplified interface parts
  • Fixed redirecting to home /
  • Fixed smaller display issues
  • Improved documentation

Update from beta.3

Due to issues with plugin loading in multi-language sites and/or with custom template components, we moved away from storing redriects in the content/site.txt. Instead we store them now in site/config/redirects.yml. Learn more in the release notes.

Will be happy to get some more tester before the final release.

Get Retour for Kirby (Beta 4)

Support development :yellow_heart:

1 Like

Tiny beta 5 just got out

Fixing a crucial issue encountered with older Vue versions. If you encountered the error Cannot create property 'column-status' on boolean 'true' this new release is for you.

Hi @distantnative, I’ve just tried to install the plugin via download/unzip and as soon as it is autoloaded, I get HTTP ERROR 500 for both my local site as well as the panel.

I’m using MAMP 5.2 on MacOS High Sierra with the .htaccess from the starterkit for RewriteBase /myprojectname and the other Kirby-related RewriteRules.

Your plugin looks amazing, but I’m a bit stumped as to what I can do to make it run. :sweat_smile:

That doesn’t sound good :scream: I assume it’s caused by the RewriteBase. I hope I’ll be able to check this tomorrow evening.

I just checked and it works for me with a fresh starterkit in a subdirectory and RewriteBase just fine. So probably something else. Are you using any other plugins? What PHP version are you on?

Thank you for checking!

tl;dr: I got it running.

I am using PHP 7.2.14. I’ve tested a few more things:

  • I disabled the only other plugin I’m using (kirby-builder): no effect
  • I upgraded to MAMP 5.3 so I could switch from PHP 7.2.14 to 7.3.1: I’m getting a Exception originating in /Applications/MAMP/htdocs/myproject/kirby/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php with preg_replace(): JIT compilation failed: no more memory. Apparently this is a PHP 7.3 related Bug which I have not yet been able to circumvent with the published workaround (set pcre.jit=0 in php.ini). Perhaps it’s not as easy to fix in MAMP.
  • I installed Retour in a fresh checkout of the starterkit with my PHP 7.2.14 setup: it works.
  • I installed kirby-builder on top of the Retour-Starterkit-Testcase: it still works.
  • I copied over the /kirby directory from the current version of the starterkit into my project: Retour is suddenly working.

Apparently I had an older Kirby core that wasn’t compatible :man_shrugging:t3:

1 Like

Let’s leave the beta phase


Retour 1.0.0 has been released!

Get it now!

3 Likes