92678[FEATURE] Add "Short URLs" module
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Oli Bartsch +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Georg Ringer +2
- Oli Bartsch +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 29
- Build/Sources/Sass/element/typo3-short-url.scss2new+33 −0
- Build/Sources/Sass/backend.scss+1 −0
- Build/Sources/TypeScript/redirects/short-url-generator.tsnew+145 −0
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php+16 −2
- typo3/sysext/backend/Resources/Private/Language/Modules/link_management.xlf2+2 −2
- typo3/sysext/backend/Resources/Public/Css/backend.css+7 −0
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-108826-AddShortURLModule.rstnew+67 −0
- typo3/sysext/redirects/Classes/Controller/ShortUrlGeneratorController.php8new+94 −0
- typo3/sysext/redirects/Classes/Controller/ShortUrlModuleController.php2new+156 −0
- typo3/sysext/redirects/Classes/EventListener/ShortUrlNewDocHeaderButtonEventListener.php2new+85 −0
- typo3/sysext/redirects/Classes/Form/Element/ShortUrlElement.php2new+249 −0
- typo3/sysext/redirects/Classes/Form/FieldControl/ShortUrlGenerator.php2new+57 −0
- typo3/sysext/redirects/Classes/FormDataProvider/ShortUrlDataProvider.phpnew+41 −0
- typo3/sysext/redirects/Classes/FormDataProvider/ValuePickerItemDataProvider.php+4 −3
- typo3/sysext/redirects/Classes/Hooks/HandleNewQrCodeRecord.php+9 −1
- typo3/sysext/redirects/Classes/Hooks/HandleNewShortUrlRecord.php13new+88 −0
- typo3/sysext/redirects/Classes/Repository/Demand.php+1 −0
- typo3/sysext/redirects/Classes/Service/ShortUrlService.phpnew+75 −0
- typo3/sysext/redirects/Configuration/Backend/AjaxRoutes.php+13 −0
- typo3/sysext/redirects/Configuration/Backend/Modules.php+16 −0
Show 9 more files
- typo3/sysext/redirects/Configuration/TCA/Overrides/sys_redirect.php2new+5 −0
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php+29 −0
- typo3/sysext/redirects/Resources/Private/Language/Modules/short_urls.xlf2new+50 −0
- typo3/sysext/redirects/Resources/Private/Language/locallang_db.xlf+12 −0
- typo3/sysext/redirects/Resources/Private/Language/locallang_module_redirect.xlf2+6 −0
- typo3/sysext/redirects/Resources/Private/Templates/QrCode/Overview.fluid.html+2 −2
- typo3/sysext/redirects/Resources/Private/Templates/ShortUrl/Overview.fluid.html10new+451 −0
- typo3/sysext/redirects/Resources/Public/JavaScript/short-url-generator.jsnew+13 −0
- typo3/sysext/redirects/ext_localconf.php+31 −2
Review log 4560
Show 2635 earlier messages
-
Marno Schmigotzki uploaded patch set 1 02/05/26, 10:01
-
core-ci voted on patch set 1 V -1 02/05/26, 10:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95123
-
Marno Schmigotzki uploaded patch set 2
V -102/05/26, 10:15 -
core-ci voted on patch set 2 V -1 02/05/26, 10:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95127
-
Simon Schaufelberger commented on patch set 2 02/05/26, 10:42
short-url-generator.ts:56No short URLlink_management.xlf:10no dot at the end?ShortUrlGeneratorController.php:48don't mix private and protected. either make everything in the whole class protected including the services in the constructor or everything private as extending this class should not happen.ShortUrlGeneratorController.php:63The only reason this method could potentially be xclassed is to change this value. Just an idea, maybe introduce a page tsconfig setting for this?ShortUrlNewDocHeaderButton.php:76i would make these methods private as event listeners should not be overwrittenHandleNewShortUrlRecord.php:39can be removedHandleNewShortUrlRecord.php:41can be private -> final classHandleNewShortUrlRecord.php:49can we add data types for incomingFieldArray, table and id? Id is probably string|intHandleNewShortUrlRecord.php:60must we use integers here or can we also use booleans?short_urls.xlf:13use "short" globally?locallang_module_redirect.xlf:97short -
Marno Schmigotzki uploaded patch set 3
V -102/05/26, 10:49 -
core-ci voted on patch set 3 V -1 02/05/26, 10:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95129
-
Marno Schmigotzki uploaded patch set 4
V -102/05/26, 11:49 -
Marno Schmigotzki commented on patch set 3 02/05/26, 11:50
typo3-short-url.scss:2ReplyDonelink_management.xlf:10ReplyDoneShortUrlGeneratorController.php:48ReplyDoneShortUrlNewDocHeaderButton.php:76ReplyDoneHandleNewShortUrlRecord.php:39ReplyDoneHandleNewShortUrlRecord.php:41ReplyDoneHandleNewShortUrlRecord.php:49ReplyDoneHandleNewShortUrlRecord.php:60ReplyDone -
core-ci voted on patch set 4 V -1 02/05/26, 11:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95140
-
Marno Schmigotzki commented on patch set 4 02/05/26, 12:30
short-url-generator.ts:56ReplyIt's a proper noun, so I would leave it as it is.ShortUrlGeneratorController.php:63ReplyWe can implement that in the future. The editor can freely edit the Short URL when creating it.short_urls.xlf:13ReplyIt's a proper noun, so I would leave it as it is.locallang_module_redirect.xlf:97ReplyIt's a proper noun, so I would leave it as it is. -
Marno Schmigotzki commented on patch set 4 02/05/26, 12:30
short-url-generator.ts:56ReplyIt's a proper noun, so I would leave it as it is. -
Marno Schmigotzki uploaded patch set 5
V -102/05/26, 12:58 -
core-ci voted on patch set 5 V -1 02/05/26, 13:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95144
-
core-ci voted on patch set 5 V +1 02/05/26, 15:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95144
-
Marno Schmigotzki commented on patch set 5 02/05/26, 16:53
TODO: Backend module icon and mobile optimization -
Daniel Windloff commented on patch set 5 02/05/26, 17:09
HandleNewShortUrlRecord.php:67Perhaps make the value unique at this point so that it can definitely be saved and inform the user about the change.Overview.fluid.html:217I would move that icon to the first position. Then it is consistent with the QR code overview. -
Daniel Windloff commented on patch set 5 02/05/26, 17:25
ShortUrlGeneratorController.php:60Perhaps avoid 0,1,i,l,O as the difference between the letters might be hard to get (depending on the font) -
Marno Schmigotzki uploaded patch set 6
V +102/05/26, 17:30 -
Marno Schmigotzki commented on patch set 6 02/05/26, 17:35
ShortUrlGeneratorController.php:60ReplyUnfortunately TYPO3\CMS\Core\Crypto\Random does not support this which makes the implementation more complexHandleNewShortUrlRecord.php:67ReplyThat would be an idea, but the editor would not be able to change the generated URL.Overview.fluid.html:217ReplyDone -
core-ci voted on patch set 6 V +1 02/05/26, 18:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95193
-
Daniel Windloff commented on patch set 6 02/05/26, 18:22
ShortUrlGeneratorController.php:60ReplyAs I see no need for crypo random for a public short url, something like `substr(str_shuffle('23456789ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz'),1,8)` could be possible. -
Bastien Lutz voted on patch set 6 CR +1 02/05/26, 18:24
-
Marno Schmigotzki uploaded patch set 7
CR +1V +102/05/26, 20:34 -
Marno Schmigotzki commented on patch set 7 02/05/26, 20:35
ShortUrlGeneratorController.php:60ReplyRight, I changed this! -
core-ci voted on patch set 7 V -1 02/05/26, 20:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95211
-
Daniel Windloff voted on patch set 7 CR +1 V +1 02/05/26, 20:42
-
Marno Schmigotzki uploaded patch set 8
CR +1V +102/05/26, 20:46 -
Daniel Windloff voted on patch set 8 CR +1 V +1 02/05/26, 20:47
-
core-ci voted on patch set 8 V +1 02/05/26, 20:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95212
-
Oli Bartsch commented on patch set 8 V -1 02/05/26, 21:26
Let me review this. -
Garvin Hicking commented on patch set 8 02/05/26, 22:00
ShortUrlNewDocHeaderButtonEventListener.php:72I have not checked the other listeners, vut is this numerical access to the array the best way to override buttons? That sounds like asking for trouble with other event listeners...?ShortUrlElement.php:93```suggestion 'redirects.module_redirect:short_url.copy' ```ShortUrlGenerator.php:41Can we use short translation syntax here?HandleNewShortUrlRecord.php:72Please use short domain synrax here toosys_redirect.php:5Can we use the short syntax here?Overview.fluid.html:70Please use translation domain hereOverview.fluid.html:75And here and following places tooOverview.fluid.html:435This is probably a lot of copy&paste from the other modules, maybe a chance to use universial partials or even a fluid component for abstraction, and avoid redundancy? -
Marno Schmigotzki commented on patch set 8 02/06/26, 09:08
On it -
Marno Schmigotzki uploaded patch set 9
CR +1V +102/06/26, 10:26 -
Marno Schmigotzki commented on patch set 9 02/06/26, 10:27
ShortUrlElement.php:93ReplyDoneShortUrlGenerator.php:41ReplyDoneHandleNewShortUrlRecord.php:72ReplyDonesys_redirect.php:5ReplyDoneOverview.fluid.html:70ReplyDoneOverview.fluid.html:75ReplyDone
-
Marno Schmigotzki commented on patch set 9 02/06/26, 10:34
ShortUrlNewDocHeaderButtonEventListener.php:72ReplyCurrently, this seems to be the only option when looking at TYPO3\CMS\Backend\Template\Components\ModifyButtonBarEvent -
Marno Schmigotzki commented on patch set 9 02/06/26, 10:37
HandleNewShortUrlRecord.php:67ReplyAs discussed we try to fix it without a workaround. -
core-ci voted on patch set 9 V +1 02/06/26, 10:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95260
-
Simon Schaufelberger commented on patch set 9 02/06/26, 10:43
Overview.fluid.html:62wrap the f:comment around a real html comment <!-- xxx --> -
Marno Schmigotzki commented on patch set 9 02/06/26, 10:55
Overview.fluid.html:62ReplyI see your point, perhaps it is more of an optimization of all redirect module templates in the future. -
Marno Schmigotzki commented on patch set 9 02/06/26, 10:55
Reply
Done -
Marno Schmigotzki uploaded patch set 10
V +102/06/26, 11:11 -
core-ci voted on patch set 10 V +1 02/06/26, 11:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95267
-
Guido Schmechel commented on patch set 10 02/07/26, 11:31
Note 1: I have created a redirect (301) and a short URL (307). The redirect is set to “*” in source_host and the short URL to “t3main.ddev.site”. As a result, the isUniqueShortUrl function in HandleNewShortUrlRecord does not apply and the duplicate is not found. Note 2: When a duplicate short URL is successfully found, I am redirected to the New Record view of the sys_redirect table. -
Guido Schmechel commented on patch set 10 02/07/26, 11:33
Note 3: Similarly, I would now expect the redirect to include a duplicate check during creation. This may not be part of the patch and is more of a follow-up. -
Guido Schmechel commented on patch set 10 02/07/26, 11:42
In general, please check the status of the editor role, which is only permitted to read sys_redirects.ShortUrlModuleController.php:70if (!$this->canListRedirects()) { return $view->renderResponse('ShortUrl/Overview'); } Similar to redirects, we need access to the sys_redirect table. -
Simon Schaufelberger uploaded patch set 11
V +102/17/26, 22:41 -
core-ci voted on patch set 11 V +1 02/17/26, 22:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96084
-
Oli Bartsch uploaded patch set 12
V +103/03/26, 13:28 -
core-ci voted on patch set 12 V +1 03/03/26, 13:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97183
-
Georg Ringer commented on patch set 12 CR -1 03/03/26, 16:10
if the shorturl exists already, the form is reloaded but now all fields are visible of sys_redirect, not only the ones of short urls -
Oli Bartsch commented on patch set 12 03/03/26, 16:16
Reply
Yes, we are aware of this, currently working on it. -
Oli Bartsch uploaded patch set 13
CR -1V +103/03/26, 21:57 -
core-ci voted on patch set 13 V +1 03/03/26, 22:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97230
-
Oli Bartsch uploaded patch set 14
V +103/03/26, 23:20 -
core-ci voted on patch set 14 V +1 03/03/26, 23:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97235
-
Oli Bartsch commented on patch set 14 CR +1 V +1 03/03/26, 23:33
Reply
DoneReply
DoneShortUrlModuleController.php:70ReplyDoneOverview.fluid.html:435ReplyI would like to do this separately. Those templates are kind of mess and need some love anyways. -
Simon Schaufelberger voted on patch set 14 CR +1 V +1 03/04/26, 00:14
-
Georg Ringer voted on patch set 14 CR +2 V +2 03/04/26, 19:13
-
Georg Ringer merged patch set 15 03/04/26, 19:13
typo3-short-url.scss:2