nystudio107 / craft-retour

Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website
https://nystudio107.com/plugins/retour
Other
38 stars 26 forks source link

Short links in a matrix block do not get updated after they are created and saved once #279

Closed jamesmacwhite closed 1 year ago

jamesmacwhite commented 1 year ago

Describe the bug

When using the short links feature with a matrix block if you create a short link block with a value and save, this will create the short link as required. If however you change the short link value in the matrix block and save it the short link in retour is not updated despite the field changing.

To reproduce

Steps to reproduce the behaviour:

  1. Create a short link field in a matrix block and add it to a entry
  2. Create a matrix block with a short link value e.g. test and save
  3. This now has create a short link to the entry for /test
  4. If you now change this matrix block to say testy this does not update the short link in Retour to work for /testy and the short link alias remains under /test

If you delete the existing matrix block and add a new block with the testy value it works.

It would appear when a short link field is within a matrix (?) the short link is not updated after the first save.

Expected behaviour

If a short link value changes within a matrix block, this should update the short link in Retour.

Versions

khalwat commented 1 year ago

Roger that. On it.

khalwat commented 1 year ago

Addressed.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop as 3.2.10”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-retour": "dev-develop-v4 as 4.1.12”,

Then do a composer clear-cache && composer update