Post-merge fixes
This commit is contained in:
@@ -4,18 +4,18 @@
|
||||
<add alias="content" application="content"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="RemoveAttributes(silent)" />
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco"
|
||||
<add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.ContentTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.ContentTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
<!--Media-->
|
||||
<add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.MediaTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.MediaTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco"
|
||||
<add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
@@ -23,39 +23,39 @@
|
||||
<add application="settings" alias="nodeTypes"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="Remove" />
|
||||
<add initialize="true" sortOrder="0" alias="documentTypes" application="settings" title="Document Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTypeTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="documentTypes" application="settings" title="Document Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTypeTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3"
|
||||
<add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0"
|
||||
<add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, Umbraco.Web" iconClosed="" iconOpen="" initialize="false" sortOrder="0"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="settings" alias="templates" title="Templates" type="Umbraco.Web.Trees.TemplatesTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="1"
|
||||
<add application="settings" alias="templates" title="Templates" type="Umbraco.Web.Trees.TemplatesTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="1"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
<add application="settings" alias="partialViews" type="Umbraco.Web.Trees.PartialViewsTree, umbraco"
|
||||
<add application="settings" alias="partialViews" type="Umbraco.Web.Trees.PartialViewsTree, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias,type)"
|
||||
xdt:Transform="Remove()" />
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTreeController, umbraco" sortOrder="2"
|
||||
<add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTreeController, Umbraco.Web" sortOrder="2"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
|
||||
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
|
||||
<add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="8"
|
||||
<add application="settings" alias="dictionary" title="Dictionary" type="Umbraco.Web.Trees.DictionaryTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="8"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add alias="dictionary" application="settings"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="RemoveAttributes(action)" />
|
||||
<add application="settings" alias="languages" title="Languages" type="Umbraco.Web.Trees.LanguageTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="5"
|
||||
<add application="settings" alias="languages" title="Languages" type="Umbraco.Web.Trees.LanguageTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="5"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="settings" initialize="true" alias="mediaTypes" title="Media Types" type="Umbraco.Web.Trees.MediaTypeTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="7"
|
||||
<add application="settings" initialize="true" alias="mediaTypes" title="Media Types" type="Umbraco.Web.Trees.MediaTypeTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder-open" sortOrder="7"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
@@ -66,12 +66,12 @@
|
||||
<add alias="packagerPackages" application="developer"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="Remove" />
|
||||
<add initialize="true" sortOrder="0" alias="packager" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.PackagesTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="packager" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.PackagesTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
|
||||
<!-- Before 7.4 this tree had the alias 'dataType', without the 's' on the end, this is here to rename it -->
|
||||
<add sortOrder="1" alias="dataTypes" application="developer" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco"
|
||||
<add sortOrder="1" alias="dataTypes" application="developer" type="Umbraco.Web.Trees.DataTypeTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,type)"
|
||||
xdt:Transform="SetAttributes(alias,sortOrder)" />
|
||||
|
||||
@@ -80,17 +80,17 @@
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes(sortOrder)" />
|
||||
|
||||
<add initialize="true" sortOrder="2" alias="macros" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MacroTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="2" alias="macros" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MacroTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
|
||||
<add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, umbraco"
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTree, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias,type)"
|
||||
xdt:Transform="Remove()" />
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTreeController, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder"
|
||||
<add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTreeController, Umbraco.Web" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
xdt:Transform="Remove" />
|
||||
|
||||
<!--Users-->
|
||||
<add initialize="true" sortOrder="0" alias="users" application="users" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.UserTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="users" application="users" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.UserTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
|
||||
@@ -111,30 +111,30 @@
|
||||
xdt:Transform="Remove" />
|
||||
|
||||
<!--Members-->
|
||||
<add initialize="true" sortOrder="0" alias="member" application="member" title="Members" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTreeController, umbraco"
|
||||
<add initialize="true" sortOrder="0" alias="member" application="member" title="Members" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTreeController, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add application="member" alias="memberGroup"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="Remove" />
|
||||
<add application="member" sortOrder="2" alias="memberGroups" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed="icon-folder" iconOpen="icon-folder"
|
||||
<add application="member" sortOrder="2" alias="memberGroups" title="Member Groups" type="umbraco.loadMemberGroups, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
<add application="member" alias="memberType"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="Remove" />
|
||||
<add application="member" sortOrder="1" alias="memberTypes" initialize="true" title="Member Types" type="Umbraco.Web.Trees.MemberTypeTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder-open"
|
||||
<add application="member" sortOrder="1" alias="memberTypes" initialize="true" title="Member Types" type="Umbraco.Web.Trees.MemberTypeTreeController, Umbraco.Web" iconClosed="icon-folder" iconOpen="icon-folder-open"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="InsertIfMissing" />
|
||||
|
||||
<!--Translation-->
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, umbraco"
|
||||
<add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add alias="openTasks" application="translation"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="RemoveAttributes(action)" />
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco"
|
||||
<add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, Umbraco.Web"
|
||||
xdt:Locator="Match(application,alias)"
|
||||
xdt:Transform="SetAttributes()" />
|
||||
<add alias="yourTasks" application="translation"
|
||||
|
||||
@@ -357,8 +357,9 @@ namespace Umbraco.Core.Migrations.Install
|
||||
return SqlSyntax.DoesTableExist(_database, tableName);
|
||||
}
|
||||
|
||||
public bool TableExist<T>()
{
|
||||
var table = DefinitionFactory.GetTableDefinition(typeof(T), SqlSyntax);
var tableName = table.Name;
return SqlSyntax.DoesTableExist(_database, tableName);
}
|
||||
public bool TableExists<T>()
{
|
||||
var table = DefinitionFactory.GetTableDefinition(typeof(T), SqlSyntax);
|
||||
return table != null && TableExists(table.Name);
}
|
||||
|
||||
// this is used in tests
|
||||
internal void CreateTable<T>(bool overwrite = false)
|
||||
|
||||
@@ -97,12 +97,7 @@ namespace Umbraco.Core.Migrations
|
||||
throw new InvalidOperationException($"A transition from state \"{sourceState}\" has already been defined.");
|
||||
|
||||
// register the transition
|
||||
_transitions[sourceState] = new Transition
|
||||
{
|
||||
SourceState = sourceState,
|
||||
TargetState = targetState,
|
||||
MigrationType = migration
|
||||
};
|
||||
_transitions[sourceState] = new Transition(sourceState, targetState, migration);
|
||||
|
||||
// register the target state if we don't know it already
|
||||
// this is how we keep track of the final state - because
|
||||
@@ -112,7 +107,7 @@ namespace Umbraco.Core.Migrations
|
||||
_transitions.Add(targetState, null);
|
||||
|
||||
_prevState = targetState;
|
||||
_finalState = null;
|
||||
_finalState = null; // force re-validation
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -145,24 +140,87 @@ namespace Umbraco.Core.Migrations
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies a chain.
|
||||
/// </summary>
|
||||
/// <remarks>Copies the chain going from startState to endState, with new states going from sourceState to targetState.</remarks>
|
||||
public MigrationPlan CopyChain(string sourceState, string startState, string endState, string targetState)
|
||||
{
|
||||
if (sourceState == null) throw new ArgumentNullException(nameof(sourceState));
|
||||
if (string.IsNullOrWhiteSpace(startState)) throw new ArgumentNullOrEmptyException(nameof(startState));
|
||||
if (string.IsNullOrWhiteSpace(endState)) throw new ArgumentNullOrEmptyException(nameof(endState));
|
||||
if (string.IsNullOrWhiteSpace(targetState)) throw new ArgumentNullOrEmptyException(nameof(targetState));
|
||||
if (sourceState == targetState) throw new ArgumentException("Source and target states cannot be identical.");
|
||||
if (startState == endState) throw new ArgumentException("Start and end states cannot be identical.");
|
||||
|
||||
sourceState = sourceState.Trim();
|
||||
startState = startState.Trim();
|
||||
endState = endState.Trim();
|
||||
targetState = targetState.Trim();
|
||||
|
||||
var state = startState;
|
||||
var visited = new HashSet<string>();
|
||||
|
||||
while (state != endState)
|
||||
{
|
||||
if (visited.Contains(state))
|
||||
throw new InvalidOperationException("A loop was detected in the copied chain.");
|
||||
visited.Add(state);
|
||||
|
||||
if (!_transitions.TryGetValue(state, out var transition))
|
||||
throw new InvalidOperationException($"There is no transition from state \"{sourceState}\".");
|
||||
|
||||
var newTargetState = transition.TargetState == endState
|
||||
? targetState
|
||||
: Guid.NewGuid().ToString("B").ToUpper();
|
||||
Add(sourceState, newTargetState, transition.MigrationType);
|
||||
sourceState = newTargetState;
|
||||
state = transition.TargetState;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies a chain.
|
||||
/// </summary>
|
||||
/// <remarks>Copies the chain going from startState to endState, with new states going from chain to targetState.</remarks>
|
||||
public MigrationPlan CopyChain(string startState, string endState, string targetState)
|
||||
=> CopyChain(_prevState, startState, endState, targetState);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the initial state.
|
||||
/// </summary>
|
||||
/// <remarks>The initial state is the state when no entry for the plan
|
||||
/// could be found in the database (i.e. the plan has never run).</remarks>
|
||||
/// <remarks>The initial state is the state when the plan has never
|
||||
/// run. By default, it is the empty string, but plans may override
|
||||
/// it if they have other ways of determining where to start from.</remarks>
|
||||
public virtual string InitialState => string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the final state.
|
||||
/// </summary>
|
||||
public string FinalState => _finalState ?? (_finalState = Validate());
|
||||
public string FinalState
|
||||
{
|
||||
get
|
||||
{
|
||||
// modifying the plan clears _finalState
|
||||
// Validate() either sets _finalState, or throws
|
||||
if (_finalState == null)
|
||||
Validate();
|
||||
|
||||
return _finalState;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the plan.
|
||||
/// </summary>
|
||||
/// <returns>The plan's final state.</returns>
|
||||
public string Validate()
|
||||
public void Validate()
|
||||
{
|
||||
if (_finalState != null)
|
||||
return;
|
||||
|
||||
// quick check for dead ends - a dead end is a transition that has a target state
|
||||
// that is not null and does not match any source state. such a target state has
|
||||
// been registered as a source state with a null transition. so there should be only
|
||||
@@ -194,7 +252,7 @@ namespace Umbraco.Core.Migrations
|
||||
verified.AddRange(visited);
|
||||
}
|
||||
|
||||
return finalState;
|
||||
_finalState = finalState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -245,11 +303,43 @@ namespace Umbraco.Core.Migrations
|
||||
return origState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a plan transition.
|
||||
/// </summary>
|
||||
private class Transition
|
||||
{
|
||||
public string SourceState { get; set; }
|
||||
public string TargetState { get; set; }
|
||||
public Type MigrationType { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Transition"/> class.
|
||||
/// </summary>
|
||||
public Transition(string sourceState, string targetState, Type migrationTtype)
|
||||
{
|
||||
SourceState = sourceState;
|
||||
TargetState = targetState;
|
||||
MigrationType = migrationTtype;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the source state.
|
||||
/// </summary>
|
||||
public string SourceState { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the target state.
|
||||
/// </summary>
|
||||
public string TargetState { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the migration type.
|
||||
/// </summary>
|
||||
public Type MigrationType { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return MigrationType == typeof(NoopMigration)
|
||||
? $"{(SourceState == "" ? "<empty>" : SourceState)} --> {TargetState}"
|
||||
: $"{SourceState} -- ({MigrationType.FullName}) --> {TargetState}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,7 @@ using System.Configuration;
|
||||
using Semver;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_10_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_12_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_5_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_5_5;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_6_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_7_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_8_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_9_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_0_0;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade
|
||||
@@ -38,7 +31,7 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
/// <remarks>
|
||||
/// <para>The default initial state in plans is string.Empty.</para>
|
||||
/// <para>When upgrading from version 7, we want to use specific initial states
|
||||
/// that are e.g. "{orig-7.9.3}", "{orig-7.11.1}", etc. so we can chain the proper
|
||||
/// that are e.g. "{init-7.9.3}", "{init-7.11.1}", etc. so we can chain the proper
|
||||
/// migrations.</para>
|
||||
/// <para>This is also where we detect the current version, and reject invalid
|
||||
/// upgrades (from a tool old version, or going back in time, etc).</para>
|
||||
@@ -51,65 +44,50 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
if (!SemVersion.TryParse(ConfigurationManager.AppSettings["umbracoConfigurationStatus"], out var currentVersion))
|
||||
throw new InvalidOperationException("Could not get current version from web.config umbracoConfigurationStatus appSetting.");
|
||||
|
||||
// must be at least 7.? - fixme adjust when releasing
|
||||
// we currently support upgrading from 7.10.0 and later
|
||||
if (currentVersion < new SemVersion(7, 10))
|
||||
throw new InvalidOperationException($"Version {currentVersion} cannot be upgraded to {UmbracoVersion.SemanticVersion}.");
|
||||
throw new InvalidOperationException($"Version {currentVersion} cannot be migrated to {UmbracoVersion.SemanticVersion}.");
|
||||
|
||||
// cannot go back in time
|
||||
if (currentVersion > UmbracoVersion.SemanticVersion)
|
||||
throw new InvalidOperationException($"Version {currentVersion} cannot be downgraded to {UmbracoVersion.SemanticVersion}.");
|
||||
|
||||
switch (currentVersion.Major)
|
||||
{
|
||||
case 7:
|
||||
// upgrading from version 7
|
||||
return "{orig-" + currentVersion + "}";
|
||||
case 8: // fixme remove when releasing
|
||||
// upgrading from version 8
|
||||
// should never happen, this is very temp and for my own website - zpqrtbnk
|
||||
return "{04F54303-3055-4700-8F76-35A37F232FF5}"; // right before the variants migration
|
||||
default:
|
||||
throw new InvalidOperationException($"Version {currentVersion} is not supported by the migration plan.");
|
||||
}
|
||||
// upgrading from version 7 => initial state is eg "{init-7.10.0}"
|
||||
// anything else is not supported - ie if 8 and above, we should have an initial state already
|
||||
if (currentVersion.Major != 7)
|
||||
throw new InvalidOperationException($"Version {currentVersion} is not supported by the migration plan.");
|
||||
|
||||
return "{init-" + currentVersion + "}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void DefinePlan()
|
||||
{
|
||||
// NOTE: MODIFYING THE PLAN
|
||||
// MODIFYING THE PLAN
|
||||
//
|
||||
// Please take great care when modifying the plan!
|
||||
//
|
||||
// * Creating a migration for version 8:
|
||||
// Append the migration to the main version 8 chain, using a new guid.
|
||||
// Update the final state (see end of file) to that guid.
|
||||
// Append the migration to version 7 upgrade chains.
|
||||
// * Porting a migration from version 7:
|
||||
// Append the migration to the main version 8 chain, using a new guid.
|
||||
// Update the final state (see end of file) to that guid.
|
||||
// Update all init-7.x.y chains.
|
||||
|
||||
|
||||
// UPGRADE FROM 7, OLDEST
|
||||
// Append the migration to the main chain, using a new guid, before the "//FINAL" comment
|
||||
//
|
||||
// When upgrading from version 7, the state is automatically set to {init-7.x.y} where
|
||||
// 7.x.y is the version. We need to define a chain starting at that state and taking
|
||||
// us to version 8. And we need such a chain for each 7.x.y version that can be upgraded
|
||||
// to version 8, bearing in mind that new releases of version 7 will probably be
|
||||
// created *after* the first released of version 8.
|
||||
// If the new migration causes a merge conflict, because someone else also added another
|
||||
// new migration, you NEED to fix the conflict by providing one default path, and paths
|
||||
// out of the conflict states (see example below).
|
||||
//
|
||||
// fixme adjust when releasing the first public (alpha?) version
|
||||
// * Porting from version 7:
|
||||
// Append the ported migration to the main chain, using a new guid (same as above).
|
||||
// Create a new special chain from the {init-...} state to the main chain (see example
|
||||
// below).
|
||||
|
||||
// we don't support upgrading from versions older than 7.?
|
||||
// and then we only need to run v8 migrations
|
||||
|
||||
// plan starts at 7.10.0 (anything before 7.10.0 is not supported)
|
||||
// upgrades from 7 to 8, and then takes care of all eventual upgrades
|
||||
//
|
||||
From("{init-7.10.0}");
|
||||
Chain<V_8_0_0.AddLockObjects>("{7C447271-CA3F-4A6A-A913-5D77015655CB}");
|
||||
Chain<AddLockObjects>("{7C447271-CA3F-4A6A-A913-5D77015655CB}");
|
||||
Chain<AddContentNuTable>("{CBFF58A2-7B50-4F75-8E98-249920DB0F37}");
|
||||
Chain<RefactorXmlColumns>("{3D18920C-E84D-405C-A06A-B7CEE52FE5DD}");
|
||||
|
||||
Chain<VariantsMigration>("{FB0A5429-587E-4BD0-8A67-20F0E7E62FF7}");
|
||||
Chain<DropMigrationsTable>("{F0C42457-6A3B-4912-A7EA-F27ED85A2092}");
|
||||
Chain<DataTypeMigration>("{8640C9E4-A1C0-4C59-99BB-609B4E604981}");
|
||||
@@ -117,122 +95,45 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
Chain<SuperZero>("{9DF05B77-11D1-475C-A00A-B656AF7E0908}");
|
||||
Chain<PropertyEditorsMigration>("{6FE3EF34-44A0-4992-B379-B40BC4EF1C4D}");
|
||||
Chain<LanguageColumns>("{7F59355A-0EC9-4438-8157-EB517E6D2727}");
|
||||
Chain<AddVariationTables1A>("{66B6821A-0DE3-4DF8-A6A4-65ABD211EDDE}");
|
||||
Chain<AddVariationTables2>("{49506BAE-CEBB-4431-A1A6-24AD6EBBBC57}");
|
||||
Chain<RefactorMacroColumns>("{083A9894-903D-41B7-B6B3-9EAF2D4CCED0}");
|
||||
Chain<UserForeignKeys>("{42097524-0F8C-482C-BD79-AC7407D8A028}");
|
||||
Chain<AddTypedLabels>("{3608CD41-792A-4E9A-A97D-42A5E797EE31}");
|
||||
Chain<ContentVariationMigration>("{608A02B8-B1A1-4C24-8955-0B95DB1F567E}");
|
||||
|
||||
// must chain to v8 final state (see at end of file)
|
||||
Chain("{1350617A-4930-4D61-852F-E3AA9E692173}");
|
||||
|
||||
|
||||
// UPGRADE FROM 7, MORE RECENT
|
||||
//
|
||||
// handle more recent versions - not yet
|
||||
|
||||
// for more recent versions...
|
||||
// 7.10.x = same as 7.10.0?
|
||||
//From("{init-7.10.1}").Chain("{init-7.10.0}");
|
||||
|
||||
|
||||
// VERSION 8 PLAN
|
||||
//
|
||||
// this is the master Umbraco migration plan, starting from the very first version 8
|
||||
// release, which was a pre-pre-alpha, years ago. It contains migrations created
|
||||
// for version 8, along with migrations ported from version 7 as version 7 evolves.
|
||||
// It is therefore *normal* that some pure version 8 migrations are mixed with
|
||||
// migrations merged from version 7.
|
||||
//
|
||||
// new migrations should always be *appended* to the *end* of the chain.
|
||||
|
||||
// 8.0.0
|
||||
From("{init-origin}"); // "origin" was 7.4.something
|
||||
Chain<V_8_0_0.AddLockTable>("{98347B5E-65BF-4DD7-BB43-A09CB7AF4FCA}");
|
||||
Chain<V_8_0_0.AddLockObjects>("{1E8165C4-942D-40DC-AC76-C5FF8831E400}");
|
||||
Chain<AddContentNuTable>("{39E15568-7AAD-4D54-81D0-758CCFC529F8}");
|
||||
Chain<RefactorXmlColumns>("{55C3F97D-BDA7-4FB1-A743-B0456B56EAA3}");
|
||||
|
||||
// merging from 7.5.0
|
||||
Chain<RemoveStylesheetDataAndTablesAgain>("{287F9E39-F673-42F7-908C-21659AB13B13}");
|
||||
Chain<V_7_5_0.UpdateUniqueIndexOnPropertyData>("{2D08588A-AD90-479C-9F6E-A99B60BA7226}");
|
||||
Chain<AddRedirectUrlTable>("{2D917FF8-AC81-4C00-A407-1F4B1DF6089C}");
|
||||
|
||||
// merging from 7.5.5
|
||||
Chain<UpdateAllowedMediaTypesAtRoot>("{44484C32-EEB3-4A12-B1CB-11E02CE22AB2}");
|
||||
|
||||
// merging from 7.6.0
|
||||
Chain<AddIndexesToUmbracoRelationTables>("{3586E4E9-2922-49EB-8E2A-A530CE6DBDE0}");
|
||||
Chain<AddIndexToCmsMemberLoginName>("{D4A5674F-654D-4CC7-85E5-CFDBC533A318}");
|
||||
Chain<AddIndexToUmbracoNodePath>("{7F828EDD-6622-4A8D-AD80-EEAF46C11680}");
|
||||
Chain<AddMacroUniqueIdColumn>("{F30AC223-D277-4D1F-B2AB-F0F0D3546CE1}");
|
||||
Chain<AddRelationTypeUniqueIdColumn>("{7C27E310-CF48-4637-A22E-8D87355161C1}");
|
||||
Chain<NormalizeTemplateGuids>("{7D2ABA16-EE48-4569-8827-E81370FC4871}");
|
||||
Chain<ReduceLoginNameColumnsSize>("{02879EDF-13A8-43AF-87A5-DD85723D0016}");
|
||||
Chain<V_7_6_0.UpdateUniqueIndexOnPropertyData>("{5496C6CC-3AE0-4789-AF49-5BB4E28FA424}");
|
||||
Chain<RemoveUmbracoDeployTables>("{8995332B-085E-4C0C-849E-9A77E79F4293}");
|
||||
|
||||
// merging from 7.7.0
|
||||
Chain<AddIndexToDictionaryKeyColumn>("{74319856-7681-46B1-AA0D-F7E896FBE6A1}");
|
||||
Chain<AddUserGroupTables>("{0427B0A2-994A-4AB4-BFF3-31B20614F6C9}");
|
||||
Chain<AddUserStartNodeTable>("{F0D6F782-E432-46DE-A3A7-2AF06DB8853B}");
|
||||
Chain<EnsureContentTemplatePermissions>("{AEB2BA2B-71E4-4B1B-AB6C-CEFB7F06FEEB}");
|
||||
Chain<ReduceDictionaryKeyColumnsSize>("{B5A6C799-B91E-496F-A1FE-7B4FE98BF6AB}");
|
||||
Chain<UpdateUserTables>("{04F54303-3055-4700-8F76-35A37F232FF5}");
|
||||
|
||||
// 8.0.0
|
||||
Chain<VariantsMigration>("{6550C7E8-77B7-4DE3-9B58-E31C81CB9504}");
|
||||
Chain<DropMigrationsTable>("{E3388F73-89FA-45FE-A539-C7FACC8D63DD}");
|
||||
Chain<DataTypeMigration>("{82C4BA1D-7720-46B1-BBD7-07F3F73800E6}");
|
||||
Chain<TagsMigration>("{139F26D7-7E08-48E3-81D9-E50A21A72F67}");
|
||||
Chain<SuperZero>("{CC1B1201-1328-443C-954A-E0BBB8CCC1B5}");
|
||||
Chain<PropertyEditorsMigration>("{CA7DB949-3EF4-403D-8464-F9BA36A52E87}");
|
||||
Chain<LanguageColumns>("{7F0BF916-F64E-4B25-864A-170D6E6B68E5}");
|
||||
|
||||
// merging from 7.8.0
|
||||
Chain<AddUserLoginTable>("{FDCB727A-EFB6-49F3-89E4-A346503AB849}");
|
||||
Chain<AddTourDataUserColumn>("{2A796A08-4FE4-4783-A1A5-B8A6C8AA4A92}");
|
||||
Chain<AddMediaVersionTable>("{1A46A98B-2AAB-4C8E-870F-A2D55A97FD1F}");
|
||||
Chain<AddInstructionCountColumn>("{0AE053F6-2683-4234-87B2-E963F8CE9498}");
|
||||
Chain<AddIndexToPropertyTypeAliasColumn>("{D454541C-15C5-41CF-8109-937F26A78E71}");
|
||||
|
||||
// merging from 7.9.0
|
||||
Chain<AddIsSensitiveMemberTypeColumn>("{89A728D1-FF4C-4155-A269-62CC09AD2131}");
|
||||
Chain<AddUmbracoAuditTable>("{FD8631BC-0388-425C-A451-5F58574F6F05}");
|
||||
Chain<AddUmbracoConsentTable>("{2821F53E-C58B-4812-B184-9CD240F990D7}");
|
||||
Chain<CreateSensitiveDataUserGroup>("{8918450B-3DA0-4BB7-886A-6FA8B7E4186E}");
|
||||
|
||||
// mergin from 7.10.0
|
||||
Chain<RenamePreviewFolder>("{79591E91-01EA-43F7-AC58-7BD286DB1E77}");
|
||||
|
||||
// mergin from 7.12.0
|
||||
Chain<UpdateUmbracoConsent>("{4BCD4198-6822-4D82-8C69-6CC4086DF46A}");
|
||||
|
||||
// 8.0.0
|
||||
// AddVariationTables1 has been superceeded by AddVariationTables2
|
||||
//Chain<AddVariationTables1>("{941B2ABA-2D06-4E04-81F5-74224F1DB037}");
|
||||
Chain<AddVariationTables2>("{76DF5CD7-A884-41A5-8DC6-7860D95B1DF5}");
|
||||
|
||||
// however, need to take care of ppl in post-AddVariationTables1 state
|
||||
// however, provide a path out of the old state
|
||||
Add<AddVariationTables1A>("{941B2ABA-2D06-4E04-81F5-74224F1DB037}", "{76DF5CD7-A884-41A5-8DC6-7860D95B1DF5}");
|
||||
// resume at {76DF5CD7-A884-41A5-8DC6-7860D95B1DF5} ...
|
||||
|
||||
// 8.0.0
|
||||
Chain<RefactorMacroColumns>("{A7540C58-171D-462A-91C5-7A9AA5CB8BFD}");
|
||||
|
||||
// merge
|
||||
Chain<UserForeignKeys>("{3E44F712-E2E3-473A-AE49-5D7F8E67CE3F}"); // shannon added that one - let's keep it as the default path
|
||||
Chain<AddTypedLabels>("{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // then add stephan's - to new final state
|
||||
//Chain<AddTypedLabels>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}"); // stephan added that one - need a path to final state
|
||||
Add<UserForeignKeys>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}", "{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}");
|
||||
|
||||
// 8.0.0
|
||||
Chain<UserForeignKeys>("{3E44F712-E2E3-473A-AE49-5D7F8E67CE3F}"); // shannon added that one - let's keep it as the default path
|
||||
//Chain<AddTypedLabels>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}"); // stephan added that one = merge conflict, remove,
|
||||
Chain<AddTypedLabels>("{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // but it after shannon's, with a new target state,
|
||||
Add<UserForeignKeys>("{65D6B71C-BDD5-4A2E-8D35-8896325E9151}", "{4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4}"); // and provide a path out of the conflict state
|
||||
// resume at {4CACE351-C6B9-4F0C-A6BA-85A02BBD39E4} ...
|
||||
|
||||
Chain<ContentVariationMigration>("{1350617A-4930-4D61-852F-E3AA9E692173}");
|
||||
Chain<UpdateUmbracoConsent>("{39E5B1F7-A50B-437E-B768-1723AEC45B65}"); // from 7.12.0
|
||||
//FINAL
|
||||
|
||||
// FINAL STATE - MUST MATCH LAST ONE ABOVE !
|
||||
// whenever this changes, update all references in this file!
|
||||
|
||||
Add(string.Empty, "{1350617A-4930-4D61-852F-E3AA9E692173}");
|
||||
|
||||
|
||||
// and then, need to support upgrading from more recent 7.x
|
||||
//
|
||||
From("{init-7.10.1}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.10.2}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.10.3}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.10.4}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.11.0}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
From("{init-7.11.1}").Chain("{init-7.10.0}"); // same as 7.10.0
|
||||
|
||||
// 7.12.0 has a migration, define a custom chain which copies the chain
|
||||
// going from {init-7.10.0} to former final, and then goes straight to
|
||||
// main chain, skipping the migration
|
||||
//
|
||||
From("{init-7.12.0}");
|
||||
// copy from copy to (former final) main chain
|
||||
CopyChain("{init-7.10.0}", "{1350617A-4930-4D61-852F-E3AA9E692173}", "{39E5B1F7-A50B-437E-B768-1723AEC45B65}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,13 +48,12 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
||||
|
||||
//TODO: Change all singleton access to use ctor injection in v8!!!
|
||||
//TODO: That would mean that property value converters would need to be request lifespan, hrm....
|
||||
bool isDebug = HttpContext.Current != null && HttpContext.Current.IsDebuggingEnabled;
|
||||
var gridConfig = UmbracoConfig.For.GridConfig(
|
||||
Current.ProfilingLogger.Logger,
|
||||
Current.ApplicationCache.RuntimeCache,
|
||||
new DirectoryInfo(IOHelper.MapPath(SystemDirectories.AppPlugins)),
|
||||
new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Config)),
|
||||
isDebug);
|
||||
Current.RuntimeState.Debug);
|
||||
|
||||
var sections = GetArray(obj, "sections");
|
||||
foreach (var section in sections.Cast<JObject>())
|
||||
|
||||
@@ -217,8 +217,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
{
|
||||
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
|
||||
{
|
||||
|
||||
|
||||
var rtQuery = Query<IRelationType>().Where(x => x.Alias == relationTypeAlias);
|
||||
var relationType = _relationTypeRepository.Get(rtQuery).FirstOrDefault();
|
||||
if (relationType == null)
|
||||
@@ -244,7 +242,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
relationTypeIds = relationTypes.Select(x => x.Id).ToList();
|
||||
}
|
||||
|
||||
|
||||
return relationTypeIds.Count == 0
|
||||
? Enumerable.Empty<IRelation>()
|
||||
: GetRelationsByListOfTypeIds(relationTypeIds);
|
||||
@@ -265,7 +262,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
relationTypeIds = relationTypes.Select(x => x.Id).ToList();
|
||||
}
|
||||
|
||||
|
||||
return relationTypeIds.Count == 0
|
||||
? Enumerable.Empty<IRelation>()
|
||||
: GetRelationsByListOfTypeIds(relationTypeIds);
|
||||
@@ -668,7 +664,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
var relations = new List<IRelation>();
|
||||
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
|
||||
{
|
||||
|
||||
foreach (var relationTypeId in relationTypeIds)
|
||||
{
|
||||
var id = relationTypeId;
|
||||
|
||||
@@ -9,7 +9,6 @@ using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Web;
|
||||
|
||||
namespace Umbraco.Tests.FrontEnd
|
||||
@@ -20,6 +19,12 @@ namespace Umbraco.Tests.FrontEnd
|
||||
private const string SampleWithAnchorElement = "Hello world, this is some text <a href='blah'>with a link</a>";
|
||||
private const string SampleWithBoldAndAnchorElements = "Hello world, <b>this</b> is some text <a href='blah'>with a link</a>";
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
Current.Reset();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void Truncate_Simple()
|
||||
{
|
||||
@@ -340,9 +345,10 @@ namespace Umbraco.Tests.FrontEnd
|
||||
/// running.
|
||||
/// </remarks>
|
||||
[Test]
|
||||
public static void Converting_string_udi_to_a_udi_returns_original_udi_value()
|
||||
public void Converting_string_udi_to_a_udi_returns_original_udi_value()
|
||||
{
|
||||
// Arrange
|
||||
SetUpDependencyContainer();
|
||||
Udi.ResetUdiTypes();
|
||||
Udi sample = new GuidUdi(Constants.UdiEntityType.AnyGuid, Guid.NewGuid());
|
||||
|
||||
@@ -362,9 +368,10 @@ namespace Umbraco.Tests.FrontEnd
|
||||
/// running.
|
||||
/// </remarks>
|
||||
[Test]
|
||||
public static void Converting_hello_to_a_udi_returns_false()
|
||||
public void Converting_hello_to_a_udi_returns_false()
|
||||
{
|
||||
// Arrange
|
||||
SetUpDependencyContainer();
|
||||
Udi.ResetUdiTypes();
|
||||
const string sample = "Hello";
|
||||
|
||||
@@ -557,8 +564,6 @@ namespace Umbraco.Tests.FrontEnd
|
||||
);
|
||||
|
||||
// Assert
|
||||
ResetDependencyContainer();
|
||||
|
||||
Assert.IsTrue(success);
|
||||
Assert.That(result, Is.EqualTo(sample));
|
||||
}
|
||||
@@ -579,8 +584,6 @@ namespace Umbraco.Tests.FrontEnd
|
||||
);
|
||||
|
||||
// Assert
|
||||
ResetDependencyContainer();
|
||||
|
||||
Assert.IsTrue(success);
|
||||
Assert.That(result, Is.EqualTo(sample));
|
||||
}
|
||||
@@ -601,8 +604,6 @@ namespace Umbraco.Tests.FrontEnd
|
||||
);
|
||||
|
||||
// Assert
|
||||
ResetDependencyContainer();
|
||||
|
||||
Assert.IsFalse(success);
|
||||
Assert.That(result, Is.Null);
|
||||
}
|
||||
@@ -623,8 +624,6 @@ namespace Umbraco.Tests.FrontEnd
|
||||
);
|
||||
|
||||
// Assert
|
||||
ResetDependencyContainer();
|
||||
|
||||
Assert.IsFalse(success);
|
||||
Assert.That(result, Is.Null);
|
||||
}
|
||||
@@ -646,7 +645,5 @@ namespace Umbraco.Tests.FrontEnd
|
||||
|
||||
Current.Container = container.Object;
|
||||
}
|
||||
|
||||
private void ResetDependencyContainer() => Current.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,9 +133,9 @@ namespace Umbraco.Tests.Migrations
|
||||
public void ValidateUmbracoPlan()
|
||||
{
|
||||
var plan = new UmbracoPlan(Mock.Of<IMigrationBuilder>(), Mock.Of<ILogger>());
|
||||
var finalState = plan.Validate();
|
||||
Console.WriteLine(finalState);
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(finalState));
|
||||
plan.Validate();
|
||||
Console.WriteLine(plan.FinalState);
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(plan.FinalState));
|
||||
}
|
||||
|
||||
public class DeleteRedirectUrlTable : MigrationBase
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master"
|
||||
AutoEventWireup="True" Inherits="umbraco.presentation.developer.packages.Installer" Trace="false" ValidateRequest="false" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" Text="Install package" runat="server" Width="496px" Height="584px">
|
||||
|
||||
@@ -1,134 +1,134 @@
|
||||
<?xml version="1.0"?>
|
||||
<embed>
|
||||
<!-- Flickr Settings-->
|
||||
<provider name="Flickr" type="Umbraco.Web.Media.EmbedProviders.OEmbedPhoto, umbraco">
|
||||
<provider name="Flickr" type="Umbraco.Web.Media.EmbedProviders.OEmbedPhoto, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[flickr\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.flickr.com/services/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- SlideShare Settings -->
|
||||
<provider name="SlideShare" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, umbraco">
|
||||
<provider name="SlideShare" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[slideshare\.net/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.slideshare.net/api/oembed/2]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Kickstarter Settings-->
|
||||
<provider name="Kickstarter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Kickstarter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[kickstarter\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.kickstarter.com/services/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Getty Images Settings-->
|
||||
<provider name="GettyImages" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="GettyImages" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[gty\.im/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://embed.gettyimages.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Poll Everywhere Settings -->
|
||||
<provider name="PollEverywhere" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="PollEverywhere" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[polleverywhere\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.polleverywhere.com/services/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Poll Daddy Settings -->
|
||||
<provider name="PollDaddy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="PollDaddy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[polldaddy\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://polldaddy.com/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- IFTTT Settings -->
|
||||
<provider name="IFTTT" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="IFTTT" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[ifttt\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.ifttt.com/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Instagram Settings -->
|
||||
<provider name="Instagram" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Instagram" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[instagram\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://api.instagram.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Issuu Settings-->
|
||||
<provider name="Issuu" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Issuu" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[issuu.com/(?:.*)/docs]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://issuu.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">json</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Rdio Settings -->
|
||||
<provider name="Rdio" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Rdio" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[rdio\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.rdio.com/api/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- SoundCloud Settings -->
|
||||
<provider name="SoundCloud" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, umbraco">
|
||||
<provider name="SoundCloud" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[soundcloud\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://soundcloud.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Youtube Settings -->
|
||||
<provider name="Youtube" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Youtube" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[youtu(?:\.be|be\.com)/(?:(.*)v(/|=)|(.*/)?)([a-zA-Z0-9-_]+)]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://www.youtube.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="iframe">1</param>
|
||||
<param name="format">xml</param>
|
||||
<param name="scheme">https</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- StreamDotUmbracoDotCom -->
|
||||
<provider name="StreamDotUmbracoDotCom" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="StreamDotUmbracoDotCom" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[stream\.umbraco\.org/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://stream.umbraco.org/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Daily Motion -->
|
||||
<provider name="DailyMotion" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="DailyMotion" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[dailymotion\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.dailymotion.com/services/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Hulu -->
|
||||
<provider name="Hulu" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Hulu" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[hulu\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.hulu.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Vimeo -->
|
||||
<provider name="Vimeo" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Vimeo" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[vimeo\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://vimeo.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Ted -->
|
||||
<provider name="Ted" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Ted" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[ted\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.ted.com/talks/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Screenr Settings -->
|
||||
<provider name="Screenr" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco" supportsDimensions="False">
|
||||
<provider name="Screenr" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web" supportsDimensions="False">
|
||||
<urlShemeRegex><![CDATA[screenr\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.screenr.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Twitgoo Settings , not an OEmbed one -->
|
||||
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, umbraco">
|
||||
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[twitgoo\.com/]]></urlShemeRegex>
|
||||
</provider>
|
||||
<!-- Twitter Settigs -->
|
||||
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[twitter\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
</requestParams>
|
||||
</provider>
|
||||
</embed>
|
||||
|
||||
@@ -1,134 +1,134 @@
|
||||
<?xml version="1.0"?>
|
||||
<embed>
|
||||
<!-- Flickr Settings-->
|
||||
<provider name="Flickr" type="Umbraco.Web.Media.EmbedProviders.OEmbedPhoto, umbraco">
|
||||
<provider name="Flickr" type="Umbraco.Web.Media.EmbedProviders.OEmbedPhoto, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[flickr\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.flickr.com/services/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- SlideShare Settings -->
|
||||
<provider name="SlideShare" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, umbraco">
|
||||
<provider name="SlideShare" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[slideshare\.net/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.slideshare.net/api/oembed/2]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Kickstarter Settings-->
|
||||
<provider name="Kickstarter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Kickstarter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[kickstarter\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.kickstarter.com/services/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Getty Images Settings-->
|
||||
<provider name="GettyImages" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="GettyImages" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[gty\.im/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://embed.gettyimages.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Poll Everywhere Settings -->
|
||||
<provider name="PollEverywhere" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="PollEverywhere" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[polleverywhere\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.polleverywhere.com/services/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Poll Daddy Settings -->
|
||||
<provider name="PollDaddy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="PollDaddy" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[polldaddy\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://polldaddy.com/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- IFTTT Settings -->
|
||||
<provider name="IFTTT" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="IFTTT" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[ifttt\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.ifttt.com/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Instagram Settings -->
|
||||
<provider name="Instagram" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Instagram" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[instagram\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://api.instagram.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Issuu Settings -->
|
||||
<provider name="Issuu" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Issuu" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[issuu.com/(?:.*)/docs]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://issuu.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">json</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Rdio Settings -->
|
||||
<provider name="Rdio" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Rdio" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[rdio\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.rdio.com/api/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- SoundCloud Settings -->
|
||||
<provider name="SoundCloud" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, umbraco">
|
||||
<provider name="SoundCloud" type="Umbraco.Web.Media.EmbedProviders.OEmbedRich, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[soundcloud\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://soundcloud.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Youtube Settings -->
|
||||
<provider name="Youtube" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Youtube" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[youtu(?:\.be|be\.com)/(?:(.*)v(/|=)|(.*/)?)([a-zA-Z0-9-_]+)]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://www.youtube.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="iframe">1</param>
|
||||
<param name="format">xml</param>
|
||||
<param name="scheme">https</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- StreamDotUmbracoDotCom -->
|
||||
<provider name="StreamDotUmbracoDotCom" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="StreamDotUmbracoDotCom" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[stream\.umbraco\.org/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://stream.umbraco.org/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Daily Motion -->
|
||||
<provider name="DailyMotion" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="DailyMotion" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[dailymotion\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.dailymotion.com/services/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Hulu -->
|
||||
<provider name="Hulu" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Hulu" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[hulu\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.hulu.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
<!-- Vimeo -->
|
||||
<provider name="Vimeo" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Vimeo" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[vimeo\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://vimeo.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Ted -->
|
||||
<provider name="Ted" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco">
|
||||
<provider name="Ted" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[ted\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.ted.com/talks/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Screenr Settings -->
|
||||
<provider name="Screenr" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco" supportsDimensions="False">
|
||||
<provider name="Screenr" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web" supportsDimensions="False">
|
||||
<urlShemeRegex><![CDATA[screenr\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.screenr.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
<!-- Twitgoo Settings , not an OEmbed one -->
|
||||
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, umbraco">
|
||||
<provider name="Twitgoo" type="Umbraco.Web.Media.EmbedProviders.Twitgoo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[twitgoo\.com/]]></urlShemeRegex>
|
||||
</provider>
|
||||
<!-- Twitter Settigs -->
|
||||
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
|
||||
<provider name="Twitter" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[twitter\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://publish.twitter.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
</requestParams>
|
||||
</provider>
|
||||
</embed>
|
||||
|
||||
@@ -297,7 +297,6 @@ namespace Umbraco.Web.Editors
|
||||
"languageApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl<LanguageController>(
|
||||
controller => controller.GetAllLanguages())
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Web.HealthCheck.Checks.DataIntegrity
|
||||
@@ -15,13 +16,15 @@ namespace Umbraco.Web.HealthCheck.Checks.DataIntegrity
|
||||
Group = "Data Integrity")]
|
||||
public class DatabaseSchemaValidationHealthCheck : HealthCheck
|
||||
{
|
||||
private readonly DatabaseContext _databaseContext;
|
||||
private readonly DatabaseBuilder _databaseBuilder;
|
||||
private readonly ILocalizedTextService _textService;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public DatabaseSchemaValidationHealthCheck(HealthCheckContext healthCheckContext) : base(healthCheckContext)
|
||||
public DatabaseSchemaValidationHealthCheck(DatabaseBuilder databaseBuilder, ILocalizedTextService textService, ILogger logger)
|
||||
{
|
||||
_databaseContext = HealthCheckContext.ApplicationContext.DatabaseContext;
|
||||
_textService = healthCheckContext.ApplicationContext.Services.TextService;
|
||||
_databaseBuilder = databaseBuilder ?? throw new ArgumentNullException(nameof(databaseBuilder));
|
||||
_textService = textService ?? throw new ArgumentNullException(nameof(textService));
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
|
||||
@@ -37,20 +40,23 @@ namespace Umbraco.Web.HealthCheck.Checks.DataIntegrity
|
||||
|
||||
private HealthCheckStatus CheckDatabase()
|
||||
{
|
||||
var results = _databaseContext.ValidateDatabaseSchema();
|
||||
var results = _databaseBuilder.ValidateDatabaseSchema();
|
||||
|
||||
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), _textService.Localize("databaseSchemaValidationCheckDatabaseLogMessage"));
|
||||
|
||||
LogHelper.Warn(typeof(DatabaseSchemaValidationHealthCheck), _textService.Localize("databaseSchemaValidationCheckDatabaseLogMessage"));
|
||||
foreach(var error in results.Errors)
|
||||
{
|
||||
LogHelper.Warn(typeof(DatabaseSchemaValidationHealthCheck), error.Item1 + ": " + error.Item2);
|
||||
_logger.Warn(typeof(DatabaseSchemaValidationHealthCheck), error.Item1 + ": " + error.Item2);
|
||||
}
|
||||
|
||||
if(results.Errors.Count > 0)
|
||||
{
|
||||
return new HealthCheckStatus(_textService.Localize("healthcheck/databaseSchemaValidationCheckDatabaseErrors", new[] { results.Errors.Count.ToString() }))
|
||||
{
|
||||
ResultType = StatusResultType.Error,
|
||||
View = "Umbraco.Dashboard.DatabaseSchemaValidationController"
|
||||
};
|
||||
}
|
||||
|
||||
return new HealthCheckStatus(_textService.Localize("healthcheck/databaseSchemaValidationCheckDatabaseOk"))
|
||||
{
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
{
|
||||
[DefaultPropertyValueConverter]
|
||||
public class FlexibleDropdownPropertyValueConverter : PropertyValueConverterBase
|
||||
{
|
||||
public FlexibleDropdownPropertyValueConverter()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
return propertyType.EditorAlias.Equals(Umbraco.Core.Constants.PropertyEditors.Aliases.DropDownListFlexible);
|
||||
return propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.DropDownListFlexible);
|
||||
}
|
||||
|
||||
public override object ConvertSourceToIntermediate(IPublishedElement owner, PublishedPropertyType propertyType, object source, bool preview)
|
||||
@@ -51,7 +46,6 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
return propertyType.DataType.ConfigurationAs<DropDownFlexibleConfiguration>().Multiple
|
||||
? typeof(IEnumerable<string>)
|
||||
: typeof(string);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
<Compile Include="Editors\PreviewController.cs" />
|
||||
<Compile Include="Editors\TemplateController.cs" />
|
||||
<Compile Include="Editors\TourController.cs" />
|
||||
<Compile Include="HealthCheck\Checks\DataIntegrity\DatabaseSchemaValidationHealthCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Security\XssProtectionCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Security\HstsCheck.cs" />
|
||||
<Compile Include="Editors\UserEditorAuthorizationHelper.cs" />
|
||||
@@ -241,7 +242,7 @@
|
||||
<Compile Include="Models\Mapping\ContentChildOfListViewResolver.cs" />
|
||||
<Compile Include="Models\Mapping\ContentUrlResolver.cs" />
|
||||
<Compile Include="Models\Mapping\DefaultTemplateResolver.cs" />
|
||||
<Compile Include="Models\Mapping\DictionaryModelMapper.cs" />
|
||||
<Compile Include="Models\Mapping\DictionaryMapperProfile.cs" />
|
||||
<Compile Include="Models\Mapping\LanguageMapperProfile.cs" />
|
||||
<Compile Include="Models\Mapping\MediaChildOfListViewResolver.cs" />
|
||||
<Compile Include="Models\Mapping\CodeFileMapperProfile.cs" />
|
||||
|
||||
Reference in New Issue
Block a user