distantnative / retour-for-kirby

Kirby CMS plugin to manage redirects and track 404s right from the Panel
https://distantnative.com/retour-for-kirby/
MIT License
135 stars 15 forks source link

Redirects page cannot be loaded at panel after update to 3.0.0 #223

Closed ankeknicker closed 3 years ago

ankeknicker commented 3 years ago

Hi,

we are getting the problem, that the Redirects page at panel fails loading after updating to version 3.0.0. The redirects are already working, but I get the following messages at the kirby panel (only on production or review environment, at localhost it works):

image

Bildschirmfoto 2021-02-10 um 11 38 05

After turning debug mode to on, the browser console prints out the following:

Bildschirmfoto 2021-02-10 um 12 29 31

distantnative commented 3 years ago

Hi @ankeknicker,

I just released a new version of the plugin that also improves the upgrade mechanism. Maybe this fixes your issue already. Otherwise it would be great if you could post (or send me privately, nico@getkirby.com) a copy of your site/config/redirects.yml for debugging.

ankeknicker commented 3 years ago

Hi @distantnative unfortunally the new release didn't fixed the problem.

This is my redirects.yml:

routes:
  - 
    from: leistungen/(:all)
    to: /themen/$1
    status: 308
    priority: null
    comment: null
  - 
    from: team
    to: /ueber/team
    status: 301
    priority: false
    comment: null
  - 
    from: jobs
    to: /karriere
    status: 301
    priority: false
    comment: null
  - 
    from: jobs/(:all)
    to: /karriere/$1
    status: 301
    priority: false
    comment: null
  - 
    from: en
    to: /
    status: 307
    priority: false
    comment: null
  - 
    from: en/(:all)
    to: /$1
    status: 307
    priority: false
    comment: null
schema: 3.0.0
nigelewan commented 3 years ago

I receive the same error, even with a clean install of Retour on Kirby 3.5.1. Would love to know how to fix.

distantnative commented 3 years ago

I'll try to investigate further on Wednesday

distantnative commented 3 years ago

I'm having a hard time to reproduce this

distantnative commented 3 years ago

Any specific config setting you are using?

ankeknicker commented 3 years ago

this is my configuration. I think, thats a standard one:

        'logs' => true,
        'ignore' => [],
        'deleteAfter' => 6,
        'config' => 'content/_drafts/redirects.yml'
    ],
jklue commented 3 years ago

I'm also seeing this, not locally, but on a test server with no config settings at all. I removed the redirects.yml which had one redirect in it, and the plugin rebuilt that file, and the "Cannot read property 'date' of undefined" error remains.

Edit: would it have something to do with the system clock? the error for me happened on this line...

  // site/plugins/retour-for-kirby/index.js
  ...
  var B = {
    computed: {
      ....
      max() {
        return this.$library.dayjs(this.data[this.data.length - 1].date)
      },
      ....
distantnative commented 3 years ago

✅ in 4.0.0-beta.1