Wednesday, June 3, 2009

STSADM -- Activate Publishing/ Publishing activation - access denied error / Greyed out link - Modify Navigation

. Wednesday, June 3, 2009
2 comments

stsadm -o activatefeature -filename publishing\feature.xml -url http://<site_url>/sites/Vogue -force

stsadm -o activatefeature -filename publishingresources\feature.xml -url http://<site_url>/sites/Vogue -force

stsadm -o activatefeature -filename publishingSite\feature.xml -url http://<site_url>/sites/Vogue -force (activating on site collection level)

stsadm -o activatefeature -filename publishingweb\feature.xml -url http://<site_url>/sites/Vogue -force (activating on root site level)

stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://<site_url>/sites/Vogue -force

stsadm -o activatefeature -filename navigation\feature.xml -url http://<site_url>/sites/Vogue -force

use stsadm command line utility when: -

  • Clicking on activate/deactivate link for publishing doesn't activate publishing on site/web level.
  • Activating publishing through SharePoint UI gives 'access denied' error.

Access denied error during publishing activation is due to the reason that Publishing Resources are not activated on MOSS firs installation. hence we can manually do it using this utility (see above commands).

At times, you will notice that a publishing site has a number of grayed out links in Site actions: for e.g. 'Modify Navigation'. I was able to replicate this issue, when I ran the first command from above list. Publishing was incompletely activated and hence modify navigation link was grayed out. As soon as I ran the second command (publishingresources) the option became available.

STSADM Export/Import and Backup/Restore

.
0 comments

Difference between SPD backup and backup using STSADM backup command

1) The Backup taken using SharePoint Designer (site > administration menu > back-up website) is equivalent to STSADM – o export. It creates a .CMP file as opposed to the STSADM –o backup command.

2) The export (backup taken using SPD) can be restored using SPD (‘site > administration menu > restore website) or using STSADM –o restore command (as opposed to STSADM – o backup).

3) If the export (backup through SPD) contains a column conflict, it shall not be able to perform successful restore using SPD> In that case do STSADM –o restore.

================================================

Backup/Restore can work either on the farm level or the site collection level. One cannot use this operation to backup/restore a subsite. For this we use Export/Import operation. It can work for site collections (top level site) as well as subsites.

Backup/Restore overwrites the entire site collection/farm. Hence old contents are removed.

Export/Import merges the contents during import.

Lessons learned while using the STSADM export and import commands:

1. Alerts will not follow the site's lists and documents during the export process.

2. Email enabled lists can be an issue when importing if the destination server is not properly configured for incoming email.

3. Any task or issues list imported that emails a user when they are assigned a task will no longer send emails.  You need to disable and then re-enable the functionality in the lists settings.

 

<<<<source: http://mphacker.spaces.live.com/blog/cns!8040CC624DDC5404!252.entry>>>>

BACKUP/RESTORE COMMANDS

For site collection backup

stsadm -o backup -url <URL name> -filename <file name> [-overwrite]

url -----A valid URL, such as http://server_name ------ URL of the site collection that you want to back up

filename ------ A valid file name for the site collection restore file, such as "Siteres.bak" ------- Name of the restore file

NOTE:: REMOVE '[' AND ']' WHILE SPECIFYING OPTIONAL PARAMETERS :)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

For site collection restore

stsadm -o restore -url <URL name> -filename <file name> [-hostheaderwebapplicationurl] <Web application URL> [-overwrite]

url -----A valid URL, such as http://server_name ------ URL of the site collection where you want to restore (should already exist)

filename ------ A valid file name for the site collection restore file, such as "Siteres.bak" ------- Name of the restore file (complete path of file created during backup)

 

EXPORT/IMPORT COMMANDS

stsadm -o export  -url <URL name> -filename <export file name>

   [-overwrite]

   [-includeusersecurity]

   [-haltonwarning]

   [-haltonfatalerror]

   [-nologfile]

   [-versions] <1-4>

   [-cabsize] <integer value>

   [-nofilecompression]

   [-quiet]

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

stsadm -o import

   -url <URL name> -filename <import file name>

   [-includeusersecurity]

   [-haltonwarning]

   [-haltonfatalerror]

   [-nologfile]

   [-updateversions] <1-3>

   [-nofilecompression]

   [-quiet]

Features - Import spreadsheet, explorer view, edit in datasheet etc. not visible in Extranet sites

.
0 comments

The reason these options like – ‘import spreadsheet’ and ‘edit in datasheet’ are unavailable on DMZ sites is because we use Forms Based Authentication (FBA) on them. Client Integration doesn’t work well with FBA and hence has been disabled. This feature provides access to above options. Other features like ‘explorer view’ and ‘open with access’ shall also remain unavailable owing to this.

Access denied while 'Create Page' action

.
0 comments

Users with create sites rights (manage hierarchy) should ideally be able to create Pages. However they receive 'ACCESS DENIED' while trying to do so.

 

Resolution: -

Give them contribute access on masterpage gallery.