Skip to content

Commit

Permalink
Format files according to .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Oct 4, 2019
1 parent 06546e3 commit fc5665e
Show file tree
Hide file tree
Showing 460 changed files with 5,378 additions and 5,432 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Missing documentation
Wrong documentation
Other (write it here)

## What article/section is this about?
## What article/section is this about?
(link here)

## Describe the issue
4 changes: 2 additions & 2 deletions Add-ons/The-Licensing-model/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ versionFrom: 7.0.0

# The Licensing Model

Umbraco Forms and Umbraco Courier are commercial products.
Umbraco Forms and Umbraco Courier are commercial products.

For Umbraco Forms you will have a 14-day free trial to try out the product. After your trial expires, you'll need to have a **valid license** in order to keep using the product on your site.

Expand Down Expand Up @@ -60,7 +60,7 @@ That this is an add-on domain for existing licenses. Refunds will not be given f
- The development domains works with or without the `www` subdomain
- The license also includes `localhost` as a valid domain

For the Umbraco Courier license you do not need to purchase additional domains if you are running multiple sites within the same Umbraco installation.
For the Umbraco Courier license you do not need to purchase additional domains if you are running multiple sites within the same Umbraco installation.

## Configuring and installing your license

Expand Down
16 changes: 8 additions & 8 deletions Add-ons/UmbracoCourier/Configuration/RepositoryProviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ versionRemoved: 8.0.0

# Repository Providers

A repository provider is a location to store the files Courier produces when data is serialized from objects to files.
A repository provider is a location to store the files Courier produces when data is serialized from objects to files.

A repository is a file storage, which can return items in sets based on a revision alias. It is possible to store sets of changes in a revision with a certain name, and let the repository store and handle where the files exists.

Expand All @@ -14,7 +14,7 @@ A repository is a file storage, which can return items in sets based on a revisi
* **Guid**: e0472598-e73b-11df-9492-0800200c9a67
* **Full name**: `Umbraco.Courier.Providers.RepositoryProviders.Local`

The underlying IO provider. This provider is used whenever Courier access revisions or files on the local machine.
The underlying IO provider. This provider is used whenever Courier access revisions or files on the local machine.

This cannot be configured as Courier always automatically lists all revisions from the local provider.

Expand All @@ -23,17 +23,17 @@ This cannot be configured as Courier always automatically lists all revisions fr
* **Guid**: e0472596-e73b-11df-9492-0800200c9a66
* **Full name**: `Umbraco.Courier.Providers.RepositoryProviders.CourierWebserviceRepositoryProvider`

The Courier webservice provider can connect any other website running Umbraco, with Courier installed as a repository. It is possible to transfer items back and forth using the HTTP protocol.
The Courier webservice provider can connect any other website running Umbraco, with Courier installed as a repository. It is possible to transfer items back and forth using the HTTP protocol.

To install, add the following to your `courier.config` under `<repositories>`:

```xml
<repository name="Live" alias="1" type="CourierWebserviceRepositoryProvider" visible="true">
<url>http://cws.local</url>
<user>0</user>
<login>login</login>
<password>pass</password>
<passwordEncoding>Clear|Hashed</passwordEncoding>
<url>http://cws.local</url>
<user>0</user>
<login>login</login>
<password>pass</password>
<passwordEncoding>Clear|Hashed</passwordEncoding>
</repository>
```

Expand Down
10 changes: 5 additions & 5 deletions Add-ons/UmbracoCourier/Configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Courier keeps an ongoing cache of items to speed up transfers, this can be turne

```xml
<cache>
<enable>False</enable>
<enable>False</enable>
</cache>
```

Expand Down Expand Up @@ -51,7 +51,7 @@ The root folder containing all Courier's data. This folder needs changed, if Cou

```xml
<paths>
<root>~/path/to/courier</root>
<root>~/path/to/courier</root>
</paths>
```

Expand All @@ -60,7 +60,7 @@ Specifies the folder within the root folder, which holds each individual revisio

```xml
<paths>
<revisions>/folder</revisions>
<revisions>/folder</revisions>
</paths>
```

Expand All @@ -69,15 +69,15 @@ The SQL connection to the SQL database Courier should use. Notice this is not ne

```xml
<paths>
<masterPages>/folder</masterPages>
<masterPages>/folder</masterPages>
</paths>
```

### Database connection

```xml
<databaseConnectionString>
DATABASE=yahahdasd;USER ID=etc
DATABASE=yahahdasd;USER ID=etc
</databaseConnectionString>
```

Expand Down
16 changes: 8 additions & 8 deletions Add-ons/UmbracoCourier/DataIntegrity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ versionRemoved: 8.0.0
---

# Courier data integrity fix
We recently discovered a bug introduced in Courier `2.51.0`, which has now been fixed in `2.51.4` and all versions above `2.51.4`.
We recently discovered a bug introduced in Courier `2.51.0`, which has now been fixed in `2.51.4` and all versions above `2.51.4`.
This bug affects people who use inherited document types or compositions on their document types.

## Symptoms
It is pretty easy to notice if you've been affected by this bug. The first time you transferred content using Courier it all went well and your content updated on the target environment.
It is pretty easy to notice if you've been affected by this bug. The first time you transferred content using Courier it all went well and your content updated on the target environment.
However, any updates you make on the source environment and then try to transfer seem to never arrive on the target environment.

## Problem explanation
Expand All @@ -21,17 +21,17 @@ As you can see the `propertyTypeId` is duplicated here. The next time you do a C
![database updated](images/courierpropertydataupdated.png)

The problem here is that when the Umbraco backoffice reads the values for each property from the database it will take the last row and show it to you in the Umbraco interface. So in the backoffice, you'd still see "This is some text".

## Solution
The solution is to delete all of the duplicated rows that shouldn't be there, so for each property only the first row should be left behind.

First of all, you need to update [Courier to at least version 2.51.4](https://our.umbraco.com/projects/umbraco-pro/umbraco-courier-2/) on all of your environments. This will prevent the problem from re-occurring. We fixed how Courier transfers content the first time and this problem will not occur again after v2.51.4.
First of all, you need to update [Courier to at least version 2.51.4](https://our.umbraco.com/projects/umbraco-pro/umbraco-courier-2/) on all of your environments. This will prevent the problem from re-occurring. We fixed how Courier transfers content the first time and this problem will not occur again after v2.51.4.

**Note:** At this point, you should **back up** your database in both environments (so the source and the target database).

In order to figure out if you are affected by this problem you can run the following (safe) select query on the source and on the target database:

`SELECT contentNodeId FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertyTypeId HAVING COUNT(*) > 1`
`SELECT contentNodeId FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertyTypeId HAVING COUNT(*) > 1`

If this query gives you any result then you are affected by this problem and you need to run the query to fix this.

Expand All @@ -45,11 +45,11 @@ WHERE id NOT IN (
SELECT MIN(id)
FROM cmsPropertyData
GROUP BY contentNodeId, versionId, propertytypeid
HAVING MIN(id) IS NOT NULL
HAVING MIN(id) IS NOT NULL
)
```

This query will **delete** all of the extraneous rows in the `cmsPropertyData` table that shouldn't have been there in the first place but will leave that first row intact.
This query will **delete** all of the extraneous rows in the `cmsPropertyData` table that shouldn't have been there in the first place but will leave that first row intact.

You can now transfer your content again and it should update on the destination like it should've done in the first place.

Expand All @@ -60,4 +60,4 @@ Courier version 2.51.4 and higher will detect if your source or target environme

We opted not to automatically fix this for you because we want to make absolutely sure that we don't delete any data in an unrecoverable way. This is why we keep urging you to make sure to make backups before doing anything.

We'll await your feedback and based on that, we'll be able to include an automatic fix for this issue in a future version of Courier.
We'll await your feedback and based on that, we'll be able to include an automatic fix for this issue in a future version of Courier.
14 changes: 7 additions & 7 deletions Add-ons/UmbracoCourier/Developer/DataResolvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ versionRemoved: 8.0.0
Data resolvers are used by Courier to understand and transfer your data.

## Intended audience
Developers who understands .NET, C# and have a clear idea of how Umbraco works and what components in Umbraco do what.
Developers who understands .NET, C# and have a clear idea of how Umbraco works and what components in Umbraco do what.

These concepts are targeted at developers who wish to add support for 3rd party components such as data types, or change or extend the way Courier handles current built-in components.

## What is a Data Resolver

In short, a data resolver is a .NET class, which inherits from a specific base class, which allows the developer to hook into different events during the data packaging and extraction.

Out of the box Courier can understand all standard data types in Umbraco. This means that Courier knows that a content picker contains an ID for a document, which then becomes a dependency, and the ID gets translated into a GUID which can safely be deployed to another location. It also knows that a template might contain references to JavaScript files or internal links, using the [locallink:] syntax. Or a lot of other cases where data have a special meaning.
Out of the box Courier can understand all standard data types in Umbraco. This means that Courier knows that a content picker contains an ID for a document, which then becomes a dependency, and the ID gets translated into a GUID which can safely be deployed to another location. It also knows that a template might contain references to JavaScript files or internal links, using the [locallink:] syntax. Or a lot of other cases where data have a special meaning.

A data resolver adds special meaning to specific data that matches certain criteria. For instance properties using a specific data type, templates containing a certain keyword and so on.

Expand Down Expand Up @@ -57,23 +57,23 @@ If you need to build your own data resolvers for Courier there are some great ex
### DampResolver
* **Full name:** `Umbraco.Courier.DataResolvers.DampResolver`
* **Triggers on:** Propertydata, which have a DAMP pick as data type
* If value is set, and is an `int`, Courier will convert the value to the media GUID and add the media item as a dependency
* If value is set, and is an `int`, Courier will convert the value to the media GUID and add the media item as a dependency
* On extraction the GUID will be converted back to the right ID.

### EmbeddedContent
* **Full name:** `Umbraco.Courier.DataResolvers.EmbeddedContent`
* **Triggers on:** Propertydata, which have a EmbeddedContent type as data type
* **Triggers on:** Propertydata, which have a EmbeddedContent type as data type
* Replaces node IDs in the embedded content with corresponding GUIDs and converts them back again on extraction

### Images
* **Full name:** `Umbraco.Courier.DataResolvers.Images`
* **Triggers on:** Propertydata, which contains an RTE
* **Triggers on:** Propertydata, which contains an RTE
* Finds linked images in the RTE HTML and sorts out IDs, paths and resources


### KeyValuePrevalueEditor
* **Full name:** `Umbraco.Courier.DataResolvers.KeyValuePrevalueEditor`
* **Triggers on:** Propertydata, which contains a keyvalue editor like dropdownlist, radiobutton list or checkboxlist
* **Triggers on:** Propertydata, which contains a keyvalue editor like dropdownlist, radiobutton list or checkboxlist
* Resolves prevalues from IDs to actual value, and back again on extraction

**Configuration**
Expand All @@ -87,7 +87,7 @@ If you need to build your own data resolvers for Courier there are some great ex

### LocalLinks
* **Full name:** `Umbraco.Courier.DataResolvers.LocalLinks`
* **Triggers on:** Propertydata, which contains the string {locallink:
* **Triggers on:** Propertydata, which contains the string {locallink:
* Resolves the ID to a GUID, and adds the linked document as a dependency

**Configuration**
Expand Down
20 changes: 10 additions & 10 deletions Add-ons/UmbracoCourier/Developer/PackagingAndExtraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ To understand how Courier works, and to use its API, you must know and understan
- Extraction
- Transferring

These 3 concepts are what enables Courier to perform deployments in a way that can decouple the Courier client from the sites/destinations it's deploying to/from.
These 3 concepts are what enables Courier to perform deployments in a way that can decouple the Courier client from the sites/destinations it's deploying to/from.

The descriptions below are from an API point of view and provide examples on how to use each concept.
The descriptions below are from an API point of view and provide examples on how to use each concept.

## Packaging
Packaging collects data and files from a given target repository that supports packaging. Out of the box, any Courier enabled website supports this, however, you cannot perform a packaging on a network share or subversion repository.

When an item has been packaged its data is serialized to an xml file and stored at a given destination. For storage you can use the local storage on any repository the client is connected to.
When an item has been packaged its data is serialized to an xml file and stored at a given destination. For storage you can use the local storage on any repository the client is connected to.

So to take packaging step by step:

Expand All @@ -27,16 +27,16 @@ So to take packaging step by step:
- During packaging, the client will find dependencies and resources and add these to its queue
- When each item is packaged, it's saved as a xml file at a given destination.

To translate this into code, we need a couple of things defined:
To translate this into code, we need a couple of things defined:

- The client runs on "Machine A"
- The source repository is "devsite"
- The source repository is "devsite"
- The destination repository is "qasite"

So the code we are executing is not on either the devsite or qasite, but it could be. If no source or destination is set, Courier will try to use the local machine for storage.
So the code we are executing is not on either the devsite or qasite, but it could be. If no source or destination is set, Courier will try to use the local machine for storage.


### Configuration
### Configuration
For this configuration the following two repositories have been set up in the `courier.config` file:

```xml
Expand Down Expand Up @@ -72,7 +72,7 @@ using Umbraco.Courier.Core.Collections.Manifests;
```

#### Connecting to destination and source
Use `RepositoryStorage` to retrieve repositories from the `courier.config`
Use `RepositoryStorage` to retrieve repositories from the `courier.config`

```csharp
var rs = new RepositoryStorage();
Expand All @@ -86,12 +86,12 @@ To create a new Packaging operation you need to specify a name of the data you a
```csharp
var engine = new RevisionPackaging(Revision);
engine.Source = source;
engine.Destination = destination;
engine.Destination = destination;
```

#### Instant Comparison
If you want to allow Courier to perform comparison checking against a destination, you can enable this. This means that Courier will do a hashed comparison of all items to determine if they are needed in the revision. This can save time, but it should only be used if you know the destination won't change before the extraction happens.

```csharp
engine.EnableInstantCompare(destination);
```
```
2 changes: 1 addition & 1 deletion Add-ons/UmbracoCourier/Developer/PersistenceProviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ versionRemoved: 8.0.0
# PersistenceProviders
Persistence providers are the underlying database connection Courier uses to retrieve and persist items. A persistence provider contains a collection of persisters which handles each unique type of object from Courier differently. It is a very large undertaking to write a complete PersistenceProvider, but it is possible to add individual item persisters to add database support for new item providers.

A persistence provider handles the entire transaction from opening the connection, adding items to the transaction to committing. In case of errors it can also perform a rollback of the changes.
A persistence provider handles the entire transaction from opening the connection, adding items to the transaction to committing. In case of errors it can also perform a rollback of the changes.

### NHibernate
Provider build on NHibernate 3.x, using FluentNhibernate for mappings. This replicates the Umbraco datalayer, and bypasses all events handles in Umbraco as well. It also ensures that all transfers are handled as transactions in a safe manner to ensure data is not broken in case a single item fails.
Expand Down
2 changes: 1 addition & 1 deletion Add-ons/UmbracoCourier/Developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Courier includes a number of resource resolvers to modify deployed files as they
A Persistence provider is the datalayer used by courier to store data in the database.

## [Included Repository Providers](../Configuration/RepositoryProviders.md)
A Repository is an API Courier can use to transfer data between locations.
A Repository is an API Courier can use to transfer data between locations.
4 changes: 2 additions & 2 deletions Add-ons/UmbracoCourier/Installing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following guide will use two example sites; *development.site* and *live.sit
* The **Umbraco Courier** package is usually one of the top packages - otherwise you can search for it
* Follow the installation directions
* Once Courier has been installed, make sure to **refresh the page**
* Next step is to **add a location**
* Next step is to **add a location**
* In the gif below Courier is installed on development.site, and live.site is added as the location
* The location you add, will be set in the `config/courier.config` file as a *repository*. Learn more about this in the [Repository Providers](../Configuration/RepositoryProviders.md) article.

Expand Down Expand Up @@ -64,7 +64,7 @@ When you are testing Courier on two Umbraco sites locally, it’s recommended th
* Add the **path to the project directory**
* Finally, set the hostname - *example: development.site*
* When you click ‘*OK*’ the website will start
* In the navigation to the left, click **Browse _yourdomain_**
* In the navigation to the left, click **Browse _yourdomain_**

![Setup Local hostnames](images/setupLocalIIShostnames.gif)

Expand Down
Loading

0 comments on commit fc5665e

Please sign in to comment.