5

Occasionally in the Content Manager Explorer, CTRL+V for "paste" doesn't seem to work for me when moving items in the list view.

In Chrome's console I can see these prompts when using the mouse with the context menu (right-click) or toolbar:

  • Executing command 'Copy'
  • Executing command 'Cut'
  • Executing command 'Paste'
  • Executing command 'ToolbarPaste' (only when using the toolbar)

Each references Dashboard_v6.1.0.55920.4_.aspx:7131.

When I use the keyboard shortcuts the commands don't show in the console, which is fine though I'm curious how the shortcuts differ from using the mouse.

Anyone seen this behavior? How would I investigate what's going on with CTRL+V for paste?

Environment:

  • SDL Tridion 2011 SP1-HR1
  • Chrome Version 26.0.1410.64 m
2
  • I don't have any sort of solution, but I just replicated all of these behaviors in both Chrome OS and Chrome 27. I did a search for both "86" and "17" in the file which you mentioned (those are the keycodes for "v" and "ctrl" respectively). it looks like ctrl+v comes out of a different namespace than the commands: the context menu seems to come from Tridion.core, while CTRL+V comes out of Tridion.constants
    – paceaux
    Commented Apr 22, 2013 at 17:03
  • I should mention that I've found that trying to recursively copy and paste doesn't work (copying a folder just copies the folder, not the stuff inside of it). After some more snooping, I did find this little guy: Tridion.Cme.Views.DashboardBase.prototype.onListItemCopy=function(b){var a=this.getListSelection();$cme.executeCommand("Copy",a)}; That command doesn't seem to do the console.log bit, though. It looks like the actual console.log() comes out of the context menu command, which is in this function: Tridion.Cme.Views.DashboardBase.prototype.onContextMenuClick
    – paceaux
    Commented Apr 22, 2013 at 17:32

2 Answers 2

3

I don't know if this should qualify as an answer or not, but I'd like to share my findings all the same.

I looked in the console where the line was being logged and I clicked on the link to Dashboard_v6.1.0.55920.4.

From there, I followed that line back to the originating function (just by scrolling to the left).

This is where I found where the logging has originated from:

Tridion.Type.registerNamespace("Tridion.Core");Tridion.Core.MessageLog

That, in itself, wasn't too useful as that's just the message center.

So, while in this file, I did a search on "86" and "17"; these are the keycodes for "v" and "ctrl", respectively.

That's where I discovered that the tridion.constants namespace contains references to all the major keycodes we'd use in a browser. I didn't dig very deeply, but my guess is that there's a switch statement that executes. the paste command.

Then I did a search for the word "copy" and found $cme.executeCommand("Copy",a)};

That seems to execute the "copy" command, but it only appears twice. It looks like the logging actually happens elsewhere. Based on just clicking stuff, the Ribbon and the context menu log, while the key commands don't.

So I followed the function (scrolling to the left), and discovered this:

Tridion.Cme.Views.DashboardBase.prototype.onContextMenuClick

By following that, then, backwards (Scrolling to the right), I found this command, which seems to do the job of registering that console.log():

$log.debug("Executing command '{0}'",a);

So, I did a search on the copy command:

$cme.executeCommand("Copy",a)};

Looks like it's used by two function:

Tridion.Cme.Views.DashboardBase.prototype.onListItemCopy
Tridion.Cme.Views.DashboardBase.prototype.onTreeItemCopy

That's the context menu and ribbon, it would appear.

I haven't found, yet, how the keyCodes are tied to the copy command, but it appears to be different from the Ribbon and Context Menu, simply based on superficial snooping.

1
  • Nice! Thanks for walking through how to find certain keycodes--it's clear and obvious after you've pointed it out. :-) I think the two Copy commands are for the main list area and the left-side tree navigation, but I noticed toolbar paste differs from pasting with the context menu. Strange you had issues with copying/pasting folder with items inside--I'm able to copy/cut and paste a folder with two items in it okay. Commented Apr 22, 2013 at 22:35
3

Actually I have come across similar kind of behavior but when I try to refresh the browser and then try copying and pasting, it worked.

For troubleshooting:

  • Before starting copy action
  • Right click and Select Inspect Element option
  • Refer the browser
  • Click on Network tab
  • Copy the item
  • Paste the item

Now see on network tab, to known which request is failing.

If you find which JS file is causing the issue then

  • Click on Source tab
  • Select the JS file
  • Place a break point
  • Do the same action to reach the breakpoint position and there you can find at which line action is failing

Here one more important thing is, by default JS files are minified. Before doing this action, you need to disable minification.

To know, see Rob's answer How can I remove minification from the 2011 CME when developing a GUI extension?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.