- Issue created by @MegaKeegMan
- πΊπΈUnited States MegaKeegMan
In order to generate the aliases in a sequence, I suspect that I will need to create a new database table that tracks an id of each alias. I am trying to consider possible ways to avoid creating a new table. With what I have done so far, a short alias is just a redirect, given the type "short alias". One potential solution would be to just encode the short alias based on the assigned redirect id. One issue with this approach is that a large proportion of redirects may not be short aliases, meaning that I would be reducing the number of low character aliases created. This makes me lean toward creating a table that stores short aliases, using the primary id of that table, and then including a reference to the redirect from this table. This would mean that the short alias field would be more of an entity reference to a redirect entity.
- πΊπΈUnited States MegaKeegMan
@wolcen emphasized for me that building urls sequentially will not be very random. And I admit that the base 32 encoding of 1 being 1 makes for some very not random looking short aliases. As such, I am now leaning away from sequential short aliases, and am instead thinking of just randomly generating a number to encode. I will need to at some point choose a min and max number. Otherwise, I just need to make sure that if a randomly generated alias is taken, that a new one is produced without an error.
- Merge request !1Issue #3403525 by MegaKeegMan: Generate a short alias on entity form submit β (Merged) created by MegaKeegMan
- Status changed to Needs review
about 1 year ago 7:56pm 26 November 2023 - πΊπΈUnited States MegaKeegMan
This is working just fine. I would appreciate suggestions for cleaner code and for improvements to error handling.
-
MegaKeegMan β
committed d01c5c39 on 1.0.x
Issue #3403525 by MegaKeegMan: Generate a short alias on entity form...
-
MegaKeegMan β
committed d01c5c39 on 1.0.x
- Status changed to Fixed
about 1 year ago 9:25pm 27 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.