Tridion 2011 SP1: Tridion GUI Javascript Error with Translation Manager and Powertools 2011 Installed

I recently installed Tridion 2011 SP1 with the SDL module manager turned on.

Everything worked fine. Then I installed Tridion 2011 Powertools following the installation procedure.

When I try to reload the GUI (the emptied browser cache and the instanciated modification parameter for the server element in WebRoot \ Configuration \ System.Config), I get the following Javascript error:

SCRIPT5007: cannot getItemType property value: is the object null or undefined
   Dashboard_v6.1.0.55920.18_.aspx? Mode = js, line 528 character 851

And here is the corresponding JS line:

Tridion.TranslationManager.Commands.Save.prototype._isAvailable = function (s, a) {var
   e = c.getItem (0), f = $ models.getItem (e), b = f.getItemType (), d = $ models.getItem (this.getTmUri ())

The previous Javascript lines deal with other TranslationManager commands, so I assume this is some kind of registration of TranslationManager commands or some processing.

Attempting to view Tridion publications by selecting any folder / strucutreGroup will also give the same error, and the right frame (content frame) will not display Tridion elements, but simply display:

Loading...

Has anyone already encountered a similar problem?

So far I have no choice but to comment on the Powertools partition file

Tridion_Home \ Web \ WebUI \ WebRoot \ Configuration \ System.Config

Thanks Francois

+5
3

, Save, Dashboard.

JS minification ( JScriptMinifier System.config), , , .

- .

-

, , PT:

PowerTools

*\PowerTools\Editor\PowerTools\Client\Shared\Scripts\ProgressDialog\ProgressDialog.js, PowerToolsBase PowerTools.

,

Type.registerNamespace( "PowerTools" );

​​, , TM .

+1

*\PowerTools\Editor\PowerTools\Client\Shared\Scripts\ProgressDialog\ProgressDialog.js,

Type.registerNamespace( "PowerTools" );

, .

, JS-. :

...
PowerTools.Commands.ItemCommenting.prototype.isValidSelection = function (selection) {
//Use the existing Save command from the CME
return $cme.getCommand("Save")._isEnabled(selection);
}

...

/**
* Executes this command on the selection.
* Override this method to implement the actual functionality.
* @param {Tridion.Core.Selection} selection The current selection.
*/
Tridion.TranslationManager.Commands.SendForTranslation.prototype._execute = function SendForTranslation$_execute(selection)
{
    var selectedItems = selection.getItems();
    if (selectedItems.length == 1)
    {
        var job = $models.getItem(selectedItems[0]);

        if (job)
        {
            if (job.isLoaded())
            {
                job.saveAndSend();
            }
            else
            {
                $log.warn("Unable to send an unloaded job?! {0}".format(job.getId()));
            }
        }
        else
        {
            $log.warn("Unable to execute save-and-send-for-translation for this selection: {0}".format(selectedItems));
        }
    }
    else
    {
        $log.warn("Unable to save-and-send-for-translation multiple items at a time.");
    }
};

...

Tridion.TranslationManager.Commands.Save.prototype._isAvailable = function Save$_isAvailable(selection, pipeline)
{
    var itemUri = selection.getItem(0);
    var item = $models.getItem(itemUri);
    var itemType = item.getItemType();     !!!!!!!!! fails on this line !!!!!! item is null or not an object
    var config = $models.getItem(this.getTmUri());


    if (pipeline)
    {
        pipeline.stop = false;
    }

    if (config && config.hasChanged() && (itemType == $const.ItemType.CATEGORY || itemType == $const.ItemType.FOLDER || itemType == $const.ItemType.STRUCTURE_GROUP || itemType == $const.ItemType.PUBLICATION))
    {
        if (pipeline)
        {
            pipeline.stop = true;
        }

        return true;
    }

    return this.callBase("Tridion.Cme.Command", "_isAvailable", [selection, pipeline]);
};
0

Ok. .

PowerTools.Commands.ItemCommenting . , .

TM , "" ItemToolbar.

, , , Dashboard , Item ( ).

Opening an empty toolbar has not yet been done, ItemComment tries to check its availability by calling Save, which calls all its extensions. And since the choice is empty

var itemUri = selection.getItem (0);

will return null as well

$ models.getItem (zero)

What you can do is remove the ItemCommenting extension command, as is done in the tridion powertool trunk editor.config.

http://code.google.com/p/tridion-2011-power-tools/source/browse/trunk/PowerTools.Editor/Configuration/editor.config?spec=svn942&r=903 [592]

0
source

All Articles