-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect URLs that exceed VARCHAR 255 #278
Comments
I think the only real good solution here would be to allow you to control how much storage should be allocated to that column, similar to how the Craft Plain Text field works. Otherwise, you could always run out of space for whatever I bump it up to. Where do you run into the error, upon trying to save the redirect? |
Thanks. Actually it's creating the redirect itself because the Destination column is limited to 255 characters and the destination URL exceeded this by 34. |
Okay cool, I just wanted to verify that the GUI was properly validating it and not allowing you to even try to save the redirect. |
Ah sorry, so the only validation is the fact the plain text field notes that the field has exceeded 255 characters with a -34 value shown in red, but you can still save the redirect to the database without being stopped, the destination URL in this case has been truncated due to the VARCHAR 255 column type. |
I'm explicitly truncating it so there isn't a db error thrown: https://github.com/nystudio107/craft-retour/blob/develop/src/models/StaticRedirects.php#L147 & https://github.com/nystudio107/craft-retour/blob/develop/src/validators/DbStringValidator.php |
Ah, makes sense. I think being able to customise the column size for legacy URL or destination URL is the best solution I guess then. |
+1 — Just ran into this today with an absurdly long external URL that we need to redirect to. |
+1 |
We've hit a scenario where a destination URL exceeds VARCHAR 255 this is due to URL parameters/UTM tracking. Is there any possibility of changing the column that stores the Legacy URL or destination URL to allow data greater than VARCHAR(255)?
The text was updated successfully, but these errors were encountered: