kephson / paste_reference Goto Github PK
View Code? Open in Web Editor NEWPaste reference instead of copy for content elements in TYPO3
License: MIT License
Paste reference instead of copy for content elements in TYPO3
License: MIT License
There is an unconfigured branch to the Crowdin integration that need some attention: https://crowdin.com/project/typo3-extension-pastereference/apps/system/github
Moving children of a multicolumn container from one column to another loses colPos and returns error.
Response to the ajax call is :
{"redirect":"","messages":[{"title":"","message":"1: These fields of record 9554 in table \u0022tt_content\u0022 have not been saved correctly: colPos! The values might have changed due to type casting of the database.","severity":2}],"hasErrors":true}
Possibly the same issue as #6 and b13/container#297
This is said to be fixed for versions>=2.0.1, but not for Typo3 10 compatible versions.
Tested versions
EXT:paste_reference 1.0.2
EXT: container 2.1.1, 2.1.0
TYPO3: 10.4.31
Add a sample multicolumn container to a page and add child elements. Try moving child elements from one column to another by drag&droping.
The modal header shows an undefined in place of the content element title
2.0.3
Just copy a content element and then click on the button to paste content it will show you undefined as the title.
It should show you the title of copied content or in place show us a message "no title".
Show undefined.
Possible fix
I solved this issue using the declared typo3 attribute that contains the correct data.
In Typo3 11, when you click the insert button (button with arrow) in page view and choose a content element, nothing happens.
2.0.1
In Typo3 11, when you click the insert button (button with arrow) in page view and choose a content element, nothing happens.
Dialog to copy or insert reference.
Nothing happens.
Possible fix
paste_reference/Resources/Public/JavaScript/PasteReferenceOnReady.js line 145 ff uses setFormValueFromBrowseWin, which does not exist in Typo3 11. Replace with:
require(['TYPO3/CMS/Backend/Utility/MessageUtility'], function (MessageUtility) {
window.addEventListener('message', function (e) {
etc
Miscellaneous
The included CSS Skin t3skin_override.css
seems to be related to TYPO3 v11 instances. It e.g. adds a grey background to the header of a content element on hover, which in v12 does not suit into the layout of the page module.
Main branch
Page module layout does not change
Page module layout changes and looks broken (e.g. on hover of a content element)
I removed the CSS and the extension was still working, so I guess, the CSS is not needed any more.
Add a translation for the french language.
I add the local lang file for the french language.
Translation of Reference is not working. It will reference the initial language
2.0.0
past as reference a translated record
show the translated record
it will show the origin language
do not mix data and cmd in PasteReferenceDragAndDrop JS
the PasteReferenceDragAndDrop JS uses a mix of data and cmd when moving elements like
data = [
'tt_content' => [
'colPos' => 10,
'sys_language_uid' => 0
]
];
cmd = [
'tt_content' => [
1 => ['move' => 139]
]
];
this leads to multiple Workspace Bugs (https://forge.typo3.org/issues/92849)
core has removed this mix
https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/c1be5540b20421fdfa295a1323b663f3189a41d7
mixing cmd and data has also dropped from EXT:container 2.0, and this leads to b13/container#297
the EXT:paste_reference datahandler call in the JS should change to:
data = null;
cmd = [
'tt_content' => [
1 => [
'move' => [
'action' => 'paste',
'target' => 139,
'update' => [
'colPos' => 10,
'sys_language_uid' => 0
]
]
]
]
];
i will provide an PR
Hi,
The preview renderer for shortcuts filters out time controlled references that are currently not visible. This is a bit confusing for editors, since they might think that the element does not work. Thus i'd like to remove the restrictions for StartTime and EndTime. Do you agree? Then i will prepare a pull request
--> \EHAERER\PasteReference\PageLayoutView\ShortcutPreviewRenderer::collectContentData
$queryBuilder = $this->getQueryBuilder();
$queryBuilder->getRestrictions()->removeByType(\TYPO3\CMS\Core\Database\Query\Restriction\StartTimeRestriction::class);
$queryBuilder->getRestrictions()->removeByType(\TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction::class);
I have installed EXT:container.
In a two column container element i have a header element. When i use "Paste after as reference", then the new reference is created as an "unused element" and not in the container after the header element.
Originally posted by @christophlehmann in #21 (comment)
Option from the context menu pastes reference after are not working.
Version 2.0.2
Paste content using the option paste reference after In the context menu.
Show an error on the console Navigator, and the functionality is not working.
Functionality not working.
Possible fix
I found this as typo3 deprecation and now we can use the encodeURIComponent
instead of top.rawurlencode()
The global variable TYPO3_REQUEST
is accessed without checking the existence.
After that the request ist used to retrieve the query parameters.
Within the CLI context this leads to the exception:
Call to a member function getQueryParams() on null
See: Classes/DataHandler/ProcessCmdmap.php
development branch for TYPO3 12
The command map should not be executed.
The CLI command will leads to an exception.
Possible fix
Check if the server request is available or stop processing
$request = $GLOBALS['TYPO3_REQUEST'] ?? null;
if (!($request instanceof ServerRequestInterface)) {
return;
}
$queryParams = $request->getQueryParams();
Hi,
is a Typo3 12 support planned?
An Update would made my day. :D
Thanks a lot
Insert an Ref does not work
2.0.4
11.5.24
Console:
Uncaught TypeError: $closestElementWithLanguage.data is not a function
at DragDrop.default.onDrop (PasteReferenceDragDrop.js?bust=1678439888:190:59)
at PasteReferenceOnReady.js?bust=1678439888:169:26
DragDrop.default.onDrop @ PasteReferenceDragDrop.js?bust=1678439888:190
(anonym) @ PasteReferenceOnReady.js?bust=1678439888:169
postMessage (async)
send @ MessageUtility.js?bust=1678439888:13
addElement @ ElementBrowser.js?bust=1678439888:13
insertElement @ ElementBrowser.js?bust=1678439888:13
(anonym) @ BrowseDatabase.js?bust=1678439888:13
(anonym) @ RegularEvent.js?bust=1678439888:13
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.