John's profileJohn West Blogs about Si...PhotosBlogLists Tools Help

Blog


    2/24/2008

    Copy Sitecore Layout Settings

    This will likely soon appear as a FAQ or scrapbook entry, but you saw it here first.

    How do I copy layout settings or some other complex field value from one Sitecore item to another, or from an item to its template's standard values?

    1. Navigate to the source item in Template Manager or Content Editor.
    2. In the View group on the View tab, select Standard Fields and Raw Values.
    3. Copy the value in the the Renderings field in the Layout section of the source item.
    4. When moving layout settings from an item to its standard values, reset the source item to retrieve those standard values. In the Fields group on the Reset tab, select Reset, then select the Renderings field in the Layout section.
    5. Copy the value to the corresponding Renderings field in the Layout section of the target item.
    6. In the View group on the View tab, clear the Standard Fields and Raw Values options.
    Note: The layout settings dialog in Sitecore 6 provides a command to copy layout settings from one item to another, which allows the user to limit the copied values to some number of devices.

    Sitecore Xpress

    Sitecore (http://www.sitecore.net) has released Sitecore Xpress (http://xpress.sitecore.net), an edition of Sitecore CMS with scalability limitations and a license restricted to one year. Sitecore Xpress includes the Sitecore Starter Kit instead of an empty solution. The Starter Kit provides a learning environment not intended for production solutions. Note that the Starter Kit and hence Sitecore Xpress runs in Sitecore live mode, without a web database or the need for publishing.

    While the Sitecore Developer Network (SDN - http://sdn.sitecore.net) documents much of Sitecore's comprehensive ASP.NET web development platform, Sitecore encourages professional developers to attend Sitecore Certified Developer training (http://www.sitecore.net/Training/Course%20Overview/Developer%20level%20one.aspx). Sitecore provides support to certified developers working for partners and customers with valid support agreements through the support portal (http://sdn5.sitecore.net/Support.aspx after completing the SCD1 exam). Access to resources on SDN developer including forums (http://sdn5.sitecore.net/Forum.aspx) does not require developer certification.

    Training materials and resources relevant to new developers are available on the Sitecore developer network (http://sdn5.sitecore.net/Developer/Training%20Materials.aspx), as is a developer cookbook (http://sdn5.sitecore.net/Developer/Developers%20Cookbook.aspx).

    To install Xpress, see the requirements for using Sitecore, though Sitecore will generally run with less hardware than specified (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/requirements.aspx). Xpress does not currently support a remote database server. Sitecore requires an IIS document root; do not attempt to install to a subdirectory or virtual directory. Developers who work with numerous web solutions on Windows XP may implement multiple IIS web sites (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/ZIP%20installation/Multiple%20XP%20Sites.aspx). This restriction is only relevant to Windows XP; Windows Vista, 2003 and 2008 support multiple active web sites. Note that Windows XP and possibly Vista also limits the number of concurrent HTTP requests to 5, which can cause issues if a browser has been tweaked to allow more than 2 concurrent HTTP connections, or if there are too many active browser windows accessing an IIS instance.

    Download and install Microsoft SQL Server 2005 Express Edition (http://www.microsoft.com/sql) and install according to SDN instructions (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/ZIP%20installation/SQL%20Server/SQL%202005%20Express.aspx). Choose advanced configuration options. Install Management Studio Express, used mixed mode authentication and remember the password. If an existing installation of SQL Server supports only Windows authentication, reconfigure SQL server for mixed mode authentication as described (under Visual Studio 2005 at http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/ZIP%20installation/SQL%20Server/SQL%202005%20Express.aspx).

    See Sitecore pre-installation instructions for Vista (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/Installing%20Sitecore%20on%20Vista/Windows%20Vista%20Pre-installation%20Steps.aspx).

    Get the installation executable and a license from the Xpress website (http://xpress.sitecore.net). Follow the instructions on SDN to install Sitecore (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/EXE%20Installation.aspx). Because Xpress does not support a remote database server, follow the instructions under Sitecore Client Part Setup but choose to install the client and databases when prompted.

    • Name the instance Sitecore, Xpress or StarterKit.
    • Use a directory such as C:\inetpub\sitecore\StarterKit to in order to avoid interfering with existing web sites.
    • Install to the default IIS instance or one created as described previously.
    • Use localhost on XP, but consider updating the hosts file on Vista to implement multiple concurrent web sites.
    • Choose SQL Server 2005 and use .\SQLEXPRESS.
    • Do not include SQLite and SQL 2000 database backups.

    If the installer fails for any reason, see troubleshooting instructions on SDN (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/Troubleshooting/Installer%20Issues.aspx). Report issues on the SDN forums if needed (http://sdn5.sitecore.net/Forum.aspx).

    Add the site to the browser’s trusted sites and configure the browser as required (http://sdn5.sitecore.net/SDN5/Articles/Administration/Configuring%20IE7.aspx).

    The most common installation issue is generally that default.aspx is not a default document in IIS. The result can be permission, directory listing and virtual directory listing denied error messages to in the browser. A future version of the installer will register default.aspx automatically, but for now register default.aspx (http://sdn5.sitecore.net/Products/Sitecore%20V5/Installation/Troubleshooting/Registering%20default,-d-,aspx.aspx). Configuration changes through IIS7 user interfaces erase text values in web.config elements. To register default.aspx on IIS7, ensure the default document feature of IIS is installed, backup web.config and update manually.

    <system.webServer>

      <defaultDocument>

        <files>

         <clear />

         <add value="default.aspx" />

    For more information or to request a hotfix, see Microsoft support (http://support.microsoft.com/kb/930451).

    The default password is empty for the default Sitecore and Sitecore Xpress user named admin. Assuming Xpress is much like Sitecore, be sure to select the Advanced tab on the login screen and log in to the Sitecore Desktop.

    See SDN for instructions to create a Visual Studio project (http://sdn5.sitecore.net/Articles/API/Creating%20VS2005%20Project.aspx), and remember to set the copy local property on any reference to an assembly in the /bin directory to false.

    2/23/2008

    Healthy Outlook

    My workplace uses Microsoft Outlook 2007, Citrix GoToMeeting and ESET NOD32 Antivirus. Sales would like to add something like Microsoft CRM client, but this isn’t working because remote machines are not on the domain yet; I might have tips about that later. In general, applications that run when the computer boots or when a user logs in do not increase the stability of the system, and plug-ins that run when applications run do not increase the stability of the application. Several factors can improve the Outlook user experience, though some of this is specific to requirements for our custom applications. So this isn't all about Outlook. I should warn you that I prefer to make updates than comments, unless they change the meaning or otherwise conflict with existing content.

    ESET NOD32 seems to behave significantly differently depending on the installed version and options. I seem to remember a NOD32 option on the tools menu, but maybe that was specific to Office 2003 or a previous version of NOD32. Like any other software installation, always review all advanced installation options when installing NOD32. But unlike installing most other software, enable most ESET NOD32 options other than the following, accessed by pressing F5 in the NOD32 user interface.

    • Select antivirus and antispyware, email protection and choose infected email only for both notification options.
    • Select antivirus and antispyware, email protection, Microsoft Outlook and clear repeat scan after update.
    • Select user interface and clear show splash-screen at startup.
    • Select user interface, context menu and clear integrate into the context menu.
    • Select user interface, advanced mode.
    • Select user interface, display menu in standard mode.

    In Outlook:

    • Clear ESET NOD32 Antivirus under explorer bar on the view menu.
    • Select tools > options.
    • Select always check spelling before sending.
    • Press spelling and autocorrection.
    • Select mark grammar errors as you type (this should automatically select check grammar with spelling).

    Right-click on the gotomeeting icon in the notification area of the Windows task bar and choose preferences. Select Integrations and clear all of the options.

    To improve outlook performance, reduce the size of your .ost file (Mailbox). You can determine the size of the existing .ost file by choosing Account Settings from the Tools menu in Outlook and choosing Open Folder on the Data Files tab. I reduced my .ost from almost 2GB to less than 600MB using the tips below.

    To reduce storage space and improve performance, avoid including your signature whenever you can. Get into the habit of using SHIFT+DEL to permanently delete messages instead of moving them to the deleted items folder. This is especially important for messages with large attachments and anything you never want to see again, such as spam. I heard it's a good idea to move spam to the spam folder before deleting it. Maybe it adds puts it in the spam category, adds it to the blocked sender list, sends some data to some antispam software vendor(s), or does something else based on that action. 

    Periodically, remove obsolete messages, especially spam and messages containing large attachments, from various folders. Sort the deleted items folder by categories and SHIFT+DEL all items marked as spam. Sort by size and SHIFT+DEL large messages (do the same for the sent items folder). Sort by sender and SHIFT+DEL messages from  distribution lists and automated processes. SHIFT+DEL anything else you are comfortable deleting. Navigate to any junk email and spam folders and SHIFT+DEL all messages. You can generally do the same in the folders under Sync Issues. Use SHIFT+DEL whenever possible to optimize the system. I found that deleting or even moving things, especially from the deleted items folder, can lead to some annoying prompting. As a workaround, sort the folder by icon and SHIFT+DEL any calendar entries first.

    Another way to reduce the size of the.ost file is to move data to a .pst file such as personal folders or archive. If you're like me, most of your mail is in deleted items and sent items (if most of your mail is in your inbox, we need to have a conversation about your productivity). You probably don't use this mail, but you want to keep it around for one reason or another. If you don't already see Archive Folders in the folder list, choose Archive from the File menu. Select any folder that does not contain many messages or child folders, choose a date years in the past (before you started using Outlook) and press the OK button. This should create the archive file but not archive any messages. Create a folder named something like "sent-2007" under Archive Folders. Sort the sent items folder by date, and move anything sent in 2007 or before to the corresponding archive folder. Do the same for deleted items.

    Periodically, such as after removing or archiving a large amount of data, compress the .ost file. In Outlook, choose account settings from the tools menu (what ribbon?). On the email tab, select the exchange, change, more settings, advanced, offline folder file settings, compact now. You probably won't be able to use Outlook for some time, and probalby shouldn't use webmail during that time.

    Remember to defragment your hard disks once in a while, such as after deleting a bunch of data in Outlook or elsewhere.

    On to browser configuration. In Internet Explorer, choose internet options from the tools menu to access the internet options tabs.

    On the general tab, select tab settings and choose always open pop-ups in a new tab.

    On the security tab, select trusted sites, custom level.

    • In the miscellaneous section, set pop-up blocker to disable.
    • In the miscellaneous section, set allow script-initiated windows without size or position constraints to enable.
    • In the miscellaneous section, set use phishing filter to disable.
    • In the scripting section, set allow programmatic clipboard access to enable.

    Whenever possible, add patterns such as *.domain.tld to trusted sites rather than specific web sites. See the internal index page for ideas of patterns to add, as well as links to most internal applications. On the security tab, select trusted sites, then sites. Clear server verification if needed and add each site or pattern. If you’ve been annoyed by new windows opening when you enter navigate from one site to another, consider clearing the protected mode checkbox for each level of site except restricted sites while you’re here.

    Implement the following on the advanced tab. 

    • In the browsing section, clear reuse windows for launching shortcuts and show friendly HTTP error messages.
    • In the security section, select empty temporary internet files folder when browser is closed.

    Remember that configuring Windows to use a browser other than Internet Explorer can damage the VPN connection. Clear the browser cache (tools > delete browsing history > delete temporary internet files and potentially cookies), restart IIS (command prompt, net stop w3svc, net start w3svc), apply Microsoft updates (http://update.microsoft.com) and reboot the machine before seeking support for issues with browser-based applications. Remember that webmail generally works on the road when the ports used by Outlook are blocked.

    We’ve found two issues worth correcting in the default SCPrinters installation. Since it doesn’t work on local web sites anyway, disable google analytics whenever possible to improve performance. Specifically, edit the SCPrinters master layout. In Developer Center, switch to the HTML tab. Comment or delete the following code, then select the design tab and save.

    <!--

        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">   

        </script>

        <script type="text/javascript">

          _uacct = "UA-236354-2";

          if (typeof(urchinTracker) != "undefined") {

            urchinTracker();

          }

        </script>

    -->

    Additionally, set <trace enabled="false" in the site’s web.config (typically C:\inetpub\sitecore\scprinters). It might be worthwhile to update <setting name="LicenseFile" to something like C:\inetpub\sitecore\license.xml so the license can be replaced in one place for all sites. One of the sales people said that if they don't use Sitecore for about 20 minutes, it's slow when they access it again. Apparently updating the KeepAlive setting to the right URL, and/or updating the sessionState timeout from 20 minutes to 60, address this issue, but it could also be a good idea to configure the application pool not to restart.

    Adding the following as the first line in a license makes the browser display a report instead of the XML contents of the license.

    <?xml-stylesheet type="text/xsl" href="http://resources.thedotnetcms.com/license.xsl"?>

    Sysinternals, recently acquired by Microsoft, provides autoruns, an excellent tool for disabling startup prorams (http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx). Don’t disable things randomly, but consider whether you really need each entry listed under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and the startup folder of the programs menu for both all users and the specific user. The following features and many more generally function with their startup programs disabled.

    • GoToMeeting
    • IM software
    • Sidebar
    • iTunes
    • QuickTime
    • Most cameras, scanners, phones and other hardware

    I’d like to investigate an issue with QuickTime installed by iTunes causing Outlook to remain open after exiting, but for now I’ll just say don’t shut the machine down until task manager, or process explorer if you use sysinternals (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx), reports outlook.exe is not running.

    I prefer Foxit PDF reader (http://www.foxitsoftware.com). Clear advertisement on the view menu. I’m not sure how Foxit thinks they can sell PDF generation software but if you have Office 2007 you can get the PDF add-in (http://www.microsoft.com/downloads/details.aspx?FamilyId=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en). To generate a PDF file in Microsoft Word, save as PDF and select appropriate bookmark options.

    Speaking of Microsoft Office Word 2007...I use keyboard shortcuts to apply common styles. I like at least ALT-1 through ALT-6 for headings 1 through 6, ALT-T for a fixed-width font, and ALT-C for Normal. I have not found a way to set a shortcut for Clear All.

    1. Open the styles pallet (Home > Styles dialog, or ALT-CTRL-SHIFT-S).
    2. If the style is visible, select it.
    3. To work with multiple styles, select the Manage Styles command at the bottom of the Styles pallet, select a style and select modify. To work with a single style, right-click on a style and choose Modify.
    4. Select Format > Shortcut Key.
    5. If a shortcut key appears in the list, use it. Otherwise, press the desired shortcut key until finding one that the user interface reports is currently unassigned
    6. Exit style manager and confirm the keystroke really isn’t used for anything. If it isn’t, return here and press Assign. I have been using my kestrokes for some time and never realized the UI doesn't report accurately, so they may override some existing function.
    To learn keyboard shortcuts in Word, press and release ALT. Word displays keyboard shorcuts to activate a tab. Press the letter corresponding to a tab, and Word displays keyboard shortcuts to activate individual commands.

    I write technical documentation for a software product. While Word’s grammar check has some annoying issues, and is obviously no substitute for human editing, it can provide some value when you have read some text too many times.
    1. Click on the Office button and select Word Options.
    2. In the Popular category, clear the option to open attachments in reading view and enter appropriate values for user name and initials.
    3. In the Proofing category, select the option to show readability statistics, select Grammar and Style, then choose Settings.
    4. Always require a comma before the last list item.
    5. Require one space between sentences.
    6. Select the option to enable notification on use of the first person.
    When importing text, use CTRL-ALT-SHIFT-V to paste special, then choose unformatted.

    The following is a list of the the free software (except ESET) that I typically install on any machine:

    I guess this really should have been a few different posts.