Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Content deployment import fails: invalid parameter passed to the right function

$
0
0

Hi, I haven't found any information on this particular error combined with sharepoint 2013 content deployment so I'm posting it here. Scenario: fresh install of sharepoint 2013. Attached content databases from sharepoint 2010 sites; upgraded these, all went well and the sites are up and running on our proof-of-concept authoring environment.The site collections haven't been upgraded yet.

One site is giving problems when doing content deployment from our authoring to staging environment into a fresh empty site collection. The staging environment is also sharepoint 2013, the empty site collection is based on the 'sharepoint 2010' experience. No template. One site is giving problems with the import process. It fails with the following error:

LineNumber: 96 Server: 'S7157T\MOSS2' 'invalid parameter passed to the right function'.

From the diagnostic logging I was able to extract the query which was giving the error.

EXEC @abort = proc_NavStructAddNewNodeByUrl ''1C725049-B6A6-4536-AC62-56B2F6097D6C'',''D9E2C978-8C7D-4F9D-A199-6B7447CDECC0'',1025,0,-2,1,N''/collectieven'',N''Quick launch'',N''$Resources:core,SiteSettings_QuickLaunch_Title;'',NULL,0,1,1,NULL,@EidBase,@EidHome OUTPUT
SELECT @wssp13 = @abort

I was able to reproduce the issue by executing the stored procedure proc_NavStructAddNewNodeByUrl in the content database by attaching a debugger and then step through the stored procedure line by line with the above set of parameters.

The problem arises in this piece of sql code:

        IF LEFT(@Url, @WebRootDirLen) = @WebRootDir
        BEGIN
            IF @WebRootDirLen > 1
            BEGIN
                SET @WebRootDirLen = @WebRootDirLen + 1  -- Account for / separator for subwebs
            END
            SET @Url = RIGHT(@Url, DATALENGTH(@Url)/2 - @WebRootDirLen)
        END

The parameters @Url and @WebRootDir are the same: '\collectieven' without the quotes. If  you enter these parameters, the right function becomes

RIGHT('\collectieven', 13 - 14)

Obviously this gives an error because the RIGHT function does not accept a negative value as a parameter. I suppose I could fix this by altering the stored procedure, for example change

IF LEFT(@Url, @WebRootDirLen) = @WebRootDir

into something like this

IF (LEFT(@Url, @WebRootDirLen) = @WebRootDir) AND (DATALENGTH(@url) > DATALENGTH (@WebRootDIR))

but before I start hacking into the stored procedures I would like to know if there could be something wrong with the input set of parameters. The problem seems to be only with a set of parameters containing the quick launch strings in combination with a single virtual directory url (e.g. \collectieven):

'$Resources:core,SiteSettings_QuickLaunch_Title'.

Doing content deployment to another site goes well since there is no URL passed into the stored procedure:

EXEC @abort = proc_NavStructAddNewNodeByUrl ''F3D974D3-457A-4F22-81B3-83A5BEDED816'',''DB2C8909-9CA9-47BF-80EB-B5950689C1DA'',1025,0,-2,1,N'''',N''Quick launch'',N''$Resources:core,SiteSettings_QuickLaunch_Title;'',NULL,0,1,1,NULL,@EidBase,@EidHome OUTPUT

Anyone knows if this behaviour is by design or there is something wrong with the content database? As we speak I disabled quick launch in every site according to: http://msdn.microsoft.com/en-us/library/gg144573%28v=office.14%29.aspx. Now Im running another content deployment. I wonder if this one will succeed.


Viewing all articles
Browse latest Browse all 21070

Trending Articles