Mostrando entradas con la etiqueta Manage and Content Structure. Mostrar todas las entradas
Mostrando entradas con la etiqueta Manage and Content Structure. Mostrar todas las entradas

miércoles, 6 de junio de 2012

Tips/info #28 Sharepoint 2010

1-Error: Sharepoint Service Error: A deployment or retraction is already under way for the solution “xxx.wsp” , and only one deployment or retraction at a time is supported

Para solucionar haga lo siguiente:

  • Abra una consola de powershell y vaya a la ubicación siguiente: C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN y escriba stsadm -o enumdeployments
  • Verificamos el id del job que está generando conflicto
  • Y ejecutamos lo siguiente: stsadm -o canceldeployment -id ” jobId”

    2-Error:“Error Updates are currently disallowed on GET requests.  To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb. Troubleshoot issues with Microsoft SharePoint Foundation”

    $w = get-spwebapplication http://nombredelwebapplication
    $w.HttpThrottleSettings
    $w.Update
    ()
    3-Los botones de página de layouts y de texto de layouts está grisados o deshabilitados
    Ir a la master page del sitio y agregar en el body, lo siguiente:
    <body onload=”javascript:_spBodyOnLoadWrapper();”>
    4-Habilitar el modo debug de los archivos js de Sharepoint 2010
    Como saben, Sharepoint tiene dos versiones de cada archivo core de javascript de Sharepoint. Ej: sp.js, y el sp.debug.js
    Esos archivos pueden encontrarse en C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\_LAYOUTS
    Si se desea cargar los archivos debug para un web application, se debe ir a C:\inetpub\wwwroot\wss\VirtualDirectories y abrir la carpeta con el puerto deseado.
    Localizar web.config y editar de la siguiente manera:
    <compilation batch="false" debug="false">
    reemplazarlo con 
    <compilation batch="false" debug="true">
    y hacer un iisreset.
    5-Obtener las content database por web application con powershell
    Get-SPWebApplication | %{Write-Output "`n- $($_.url)"; foreach($cd in $_.contentdatabases){Write-Output $cd.name}} >> C:\Temp\contentdatabases.txt
    6-ListItem.Update Powershell Exception (Cannot take 0 arguments)



    Posiblemente la excepción sea por problemas de permisos del usuario que ejecuta el script.


    7-No aparece la opción “Manage content and structure”


    Habilitar las features 'SharePoint Server Publishing Infrastructure' a nivel de Site Collection, y después activar la feature 'SharePoint Server Publishing'


    8-Agregando un adjunto con SPList a un item


  • private void AgregarAdjunto(int ID_item)
    {
        try
        {
            SPList lista = SPContext.Current.Web.Lists["nombre Lista"];


            SPListItem miItem = lista.GetItemById(ID_item);


            if (fileUpload.PostedFile != null && fileUpload.HasFile)
            {


                Stream fStream = fileUpload.PostedFile.InputStream;


                byte[] contents = new byte[fStream.Length];


                fStream.Read(contents, 0, (int)fStream.Length);


                fStream.Close();


                fStream.Dispose();


                SPAttachmentCollection attachments = miItem.Attachments;


                string fileName = Path.GetFileName(fileUpload.PostedFile.FileName);


                attachments.Add(fileName, contents);


                miItem.Update();


            }


        }
        catch (Exception ex)
        {    }
    }


    9-Cargar un archivo css mediante el control CssRegistration


    <SharePoint:CssRegistration ID="CssRegistration1" Name="/Style Library/estilo.css"
        runat="server" After="corev4.css" />

    10-Acciones de comando en los custom actions

    {ItemId} – ID (GUID) taken from the list view.
    {ItemUrl} – Web-relative URL of the list item (Url).
    {RecurrenceId} – ID of a recurrent item (RecurrenceID).
    {SiteUrl} – The fully qualified URL to the site (Url).
    {ListId} – ID (GUID) of the list (ID).
    {ListUrlDir} – Server-relative URL of the site plus the list's folder.
    {Source} – Fully qualified request URL.
    {SelectedListId} – ID (GUID) of the list that is currently selected from a list view.
    {SelectedItemId} – ID of the item that is currently selected from the list view.
    ~site    SPContext.Current.Web.ServerRelativeUrl
    ~sitecollection    SPContext.Current.Site.ServerRelativeUrl


    http://msdn.microsoft.com/en-us/library/ff458385.aspx

    domingo, 3 de junio de 2012

    Tips/info #27 Sharepoint 2010

    1-Saber la url relativa o absoluta de una lista o libreria

    SPList miLista = miSitio.Lists["Libreria"];

    miLista .RootFolder.ServerRelativeUrl  //url relativa

    miSitio.MakeFullUrl(miLista .RootFolder.ServerRelativeUrl) //url absoluta

    string fullDisplayFormUrl = SPUtility.GetFullUrl(miSitio, miLista .DefaultDisplayFormUrl); // url absoluta para el disp form

    2-Error al ingresar a la sección “Manage and content structure”

    Failed to retrieve the list schema for feature xxxxxxx, list template xxxxxxx; expected to find it at: ""

    System.NullReferenceException: Object reference not set to an instance of an object. at - Microsoft.SharePoint.Publishing.Internal.WebControls.ObjectSerializer.DeleteAllowed(Boolean checkPermissions)

    List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user.

    Esto se debe a que una lista o librería este corrupta o huérfana, para ello se debe ejecutar el siguiente comando de powershell

    stsadm.exe -o forcedeletelist -url <url de la lista>

    3-Error: The Taxonomy feature (Feature ID "73EF14B1-13A9-416b-A9B5-ECECA2B0604C") has not been activated.

    Enable-SPFeature -identity "73EF14B1-13A9-416b-A9B5-ECECA2B0604C" -url <Your Site URL Here>

    4-No cargar archivos debug.js

    Ej:

  • cui.debug.js
  • core.debug.js
  • sp.debug.js
  • sp.ribbon.debug.js
  • init.debug.js

    Para ello se deberá cambiar el ScriptMode a Release

    <asp:ScriptManager id="ScriptManager" runat="server" ScriptMode="Release" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />

    5-Un administrador de site no puede guardar un template de lista

    Esto se debe a que la lista “List Template Gallery” tiene permisos únicos y los cuales no incluyen al usuario actual. (site > site actions > site settings > Galleries > List template gallery )

    6-Ocultar el icono de “Ir hacia arriba/breadcrumb”

    <style>
    .s4-breadcrumb-anchor
    {
    visibility: hidden;
    }
    </style>



    7-Usar web services para obtener datos de una lista de otro sitio


    http://blog.concurrency.com/sharepoint/sharepoint-2010-cross-site-content-rollup-using-sharepoint-designer-2010-and-a-dataview-web-part/


    8-Botón desactivado para activar una sandboxed solutions


    Verifique que el servicio “Microsoft SharePoint Foundation Sandboxed Code Service” esté activado (started).


    También verifique que el “SharePoint 2010 User Code Host” esté iniciado.


    9-“Upload Multiple Documents” deshabilitado o grisado



  • uploaddisabled1


    Primero verifica si tienes habilitada la opción “enable Client Integration” en el central administration: Abre el Central Administration, ir a Manage web applications, seleccionar el web application donde la feature se requiere habilitar click sobre Authentication providers, click sobre la zona correcta.


    clientintegration1


    También habilita la opción de Presence en la sección General Setting.


    presencesettings1


    Una vez que se activo la feature del lado del servidor, ahora requiere activar algunas cosas del lado del cliente.


    El cliente deberá tener framework NET 3.5 o superior.


    Si el control de ActiveX llamado STSUpld.UploadCtl (http://msdn.microsoft.com/en-us/library/ms456628.aspx) está deshabilitado, la opción de “Upload multiple Documents” aparecerá grisada.


    addon1


    Esta dll se registra cuando se instala el office, pero puede ser que esté corrupta.



    Una posibilidad es instalar el Sharepoint Designer, ya que instala esta dll.


    Otra posibilidad es descargar la dll: http://www.dlldump.com/download-dll-files_new.php/dllfiles/S/STSUPLD.DLL/11.0.5523/download.html



    10-Clave de registro donde se almacena el connection string de la base de datos ConfigDB de Sharepoint 2010


    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDb