The Updates: Fixing the JavaScript
The updates we made to the Paste Reference for Content Elements extension this quarter primarily focused on adjusting the JavaScript, which wasn't working in TYPO3 v12 and v13.
For TYPO3 v12, the extension continues using JavaScript libraries jQuery and jQuery-UI. However, TYPO3 v13 required significant changes, transitioning to native JavaScript selectors. Initial fixes revealed race conditions causing inconsistencies, such as misplaced buttons or default modal windows appearing instead of the custom ones. By implementing JavaScript promises, these issues were resolved, and the buttons and modal window now behave more reliably.
What Does Paste Reference for Content Elements Do?
The Paste reference for content elements extension simplifies backend workflows by allowing editors to paste references to content elements instead of creating duplicates. This feature is especially useful for maintaining consistency across multiple pages without duplicating content.
Originally part of the Grid Elements extension by Jo Hasenau, the paste reference functionality was extracted into its own extension by Ephraim Härer. This allowed users who didn’t need the full functionality of the Grid Elements extension to still benefit from its paste-as-reference features.
Features
- Enhanced clipboard modal: Adds an option to paste a reference to the item instead of a copy.
- Page browser: Lets you select and add a reference to an item from another page without leaving the current page.
Context menus show the additional options as well, so the features can partially be used in the list module too.
Benefits Over Core’s Insert Record Content Element
While TYPO3 Core includes an Insert Record element for referencing content, the Paste reference for content elements extension goes a step further by integrating seamlessly into the backend interface.
For example:
- Right-click context menus and modal windows include paste-as-reference options, offering a more intuitive workflow.
- The page browser feature allows editors to reference elements across pages with fewer clicks, reducing redundancy and saving time.
Why Wasn't It Integrated Into the Core?
The original plan was to integrate the functionality into TYPO3 Core as a system extension. However, practical considerations — such as limited resources and the scope of the required updates — led to the decision to keep it as a standalone extension for TYPO3 v12 and v13.
A Community-Driven Effort
The extension’s journey reflects the collaborative nature of the TYPO3 community. Originally the project was drafted and applied for by Ephraim Härer, after some time he decided to resign from it. I applied to take on this project, along with its accompanying budget and conditions. When my request was approved, I also got an extended deadline to allow for my delayed starting time. Thanks to this support which allowed me to bring the extension up to date.
Try It Now
The updated extension is available for download and works seamlessly with TYPO3 v12 and v13.