Relocation Widget Always inserts URL arg even when selecting page
Description
When the location widget is configured in a ContentBox page, both the URL and the page arguments are automatically inserted in to the the widget code.
This works OK for URLs , but not for page links, because of the conditional order in Relocate.cfc which only tests for null arguments.
Currently, if you insert a page slug in to the `page` text input, the relocation does not work with the widget code inserted, because an empty URL is present. This flags the relocation as a URL type. This causes the `location` tag in `sendRelocation` to deliver the 302 status code, but no location header, because the `URL` is empty.
We need to either remove the second argument from the inserted code or modify the Relocate widget to test for length as well as key existence.
When the location widget is configured in a ContentBox page, both the URL and the page arguments are automatically inserted in to the the widget code.
This works OK for URLs , but not for page links, because of the conditional order in Relocate.cfc which only tests for null arguments.
Currently, if you insert a page slug in to the `page` text input, the relocation does not work with the widget code inserted, because an empty URL is present. This flags the relocation as a URL type. This causes the `location` tag in `sendRelocation` to deliver the 302 status code, but no location header, because the `URL` is empty.
We need to either remove the second argument from the inserted code or modify the Relocate widget to test for length as well as key existence.