FAQ

Administrator

When you save a page you've just edited, it saves as a draft. It is not publicly available on your website unless you "Publish" it or "Save and Publish" it.

This means that visitors will see the page without the latest changes, and you have a chance to keep working on changing it further.

In C1 CMS, you can view the "saved"/ "unpublished" page as well as preview the page while editing without actually saving it.

To view a draft of a page:

  1. In the Content perspective, select the page you want to see as a draft.
  2. Click Browse Saved Page on the toolbar.

The draft version of the page will open in a separate tab in the editor area of the C1 CMS Console.

Alternatively, you can right-click the page and select Browse Saved Page in the shortcut menu.

An SQL-based C1 website uses a database on Microsoft SQL Server as its data store. That is why along with backing up the entire website folder, you should also back up the database. Restoring an SQL-based website will also take these two major steps: restoring the website files and restoring the database.

Before you back up a website, make sure your website is SQL-based:

  1. Open /App_Data/Composite/Composite.config.
  2. Locate configuration/Composite.Data.Plugins.DataProviderConfiguration.
  3. Make sure that defaultDynamicTypeDataProviderName="DynamicSqlDataProvider".

(If the site is XML-based, the value will be "DynamicXMlDataProvider".)

Backing Up an SQL-Based Website

To back up an SQL-based website:

  1. Log off from the C1 Administrative console.
  2. Make a zip archive of the folder where the website files are located.
  3. In Microsoft SQL Server Management Studio, make a backup of the database used for the website: (database) | Tasks | Backup. (Notice where the backup file is saved.)

If it is not critical in your environment, you may want to stop the website when archiving its files because some of the files (normally, log files) might be locked and thus not be added to the archive.

It is highly recommended keeping both the website backup archive and the database backup file together, especially if you are going to use the backup on other servers. You may choose to keep them in a single archive. For example, you can add the database file to the website backup archive.

On Microsoft SQL Server 2008 R2 (Express), the database backup file is saved at c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Backup\. It is named after the database name and has *.bak extension (e.g. CompositeC1.bak)

Restoring an SQL-Based Website

To restore an SQL-based website:

First of all, restore the database on the SQL server:

  1. Make the database backup file available on the local machine. If it was zipped, archived, etc, extract it.
  2. In Microsoft SQL Server Management Studio, create a new database.
  3. Right-click the database, then click Tasks | Restore | Database.
  4. In the "Restore Database" window, switch to "From device", click "...", browse to, add and select the database backup file as the source of backup sets.
  5. In the "Restore Database" window, switch to "Options" and check the option “Overwrite the existing database (WITH REPLACE)”.
  6. Click OK to restore the database from the backup.

(If you are going to replace an existing database from the backup, stop the website in IIS Manager.)

Next, restore the website:

  1. Unpack the website backup archive to a folder.
  2. In IIS Manager, stop the website you are about to replace from the backup.
  3. Rename the physical folder the website maps to on IIS (e.g. "CompositeC1" > "CompositeC1.old").
  4. In the same parent folder, create the folder with the original name (e.g. "CompositeC1").
  5. Move all the unzipped files to this folder.

Then, make sure that the connection string is correct:

  1. Open /App_Data/Composite/Composite.config.
  2. Locate configuration/Composite.Data.Plugins.DataProviderConfiguration/DataProviderPlugins/add[@connectionString=”...”].
  3. Make sure that the value of the connectionString attribute is correct (server, database, credentials). (If you have restored the database to a new one, make sure to change the database name here accordingly.)

Finally, start the website:

  1. In IIS Manager, start the website.
  2. Open the website in your web browser.

Developer

Page data type can be created like Global data type, but data items addition mechanism is different.

There are 2 ways to create it. 
First: 
Go to Data/Page Data type 
Right-click on it and choose "Add Datatype" 
Create your data type (similar to global data types) 
If you right-click on newly created page_data_type "Add data" is not accessible. 
Go to Content and select page that you need to add data to. 
Right-click on the selected page and choose "Add Datafolder" 
Choose you page data type from the list and add it. 
Now your page has attached data type. 
Data items can be add to it - choose "Add data" option.

Second: 
Another way to create page data type is following: 
Go to Content and select page that you need to add data to. 
Right-click on the selected page and choose "Add Datafolder" 
Choose "Create new type from the list of options" 
Create your data type (similar to global data types) 
This data type will be added to your page. 
Data items can be add to it - choose "Add data" option.