Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 13/umbraco-cms/extending/health-check/guides/macroerrors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

_Checks to make sure macro errors are not set to throw a YSOD (yellow screen of death), which would prevent certain or all pages from loading completely._

{% hint style="warning" %}
Macros will be removed in the next version. Consider using Partial Views or Blocks in Rich Text Editor.
{% endhint %}

## How to fix this health check

This health check can be fixed by providing configuration on the following path: `Umbraco:CMS:Content:MacroErrors`.
Expand Down
4 changes: 2 additions & 2 deletions 13/umbraco-cms/extending/macro-parameter-editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A guide to creating macro property editors in Umbraco

# Macro Parameter Editors

{% hint style="info" %}
The samples in this article has not been verified against the latest version of Umbraco.
{% hint style="warning" %}
Macros will be removed in the next version. Consider using Partial Views or Blocks in Rich Text Editor.
{% endhint %}

Every macro can contain parameters. Options for the Editor to set when they insert the Macro to customise the output. There are some useful default types. For example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
description: Information on working with partial view macro files in Umbraco
---

{% hint style="warning" %}
Partial View Macro Files will be removed in the next version. Consider using Partial Views.
{% endhint %}

# Partial View Macro Files

A Macro is a reusable piece of functionality with some configuration options in the Backoffice. A Partial View Macro File (`.cshtml` file) is a specific file configuration that is associated with the Macro. A Partial View Macro File generates a Macro that can be inserted and rendered in the Grid and Rich Text Editor data types. Additionally, you can define parameter values and enable caching in Macros in the Backoffice. Partial View Macro Files are the recommended macro type to use in Umbraco.
Expand Down
4 changes: 4 additions & 0 deletions 13/umbraco-cms/reference/management/services/macroservice.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# MacroService

{% hint style="warning" %}
MacrosService will be removed in the next version.
{% endhint %}

Defines the MacroService, which is an access to operations involving `IMacro`.

[Browse the API documentation for IMacroService interface](https://apidocs.umbraco.com/v13/csharp/api/Umbraco.Cms.Core.Services.IMacroService.html).
Expand Down
4 changes: 4 additions & 0 deletions 13/umbraco-cms/reference/templating/macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

_Describes how to set up a macro, use macro parameters & configuring caching. Defines the different types of macros and provides details on the different macro engine APIs and their usage_

{% hint style="warning" %}
Macros and Partial View Macros will be removed in the next version. Consider using Partial Views or Blocks in Rich Text Editor.
{% endhint %}

## What is a macro

A macro is 'wrapper' for a reusable piece of functionality that you can utilise in different places throughout your site.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ In this section, you will find all the resources you need to build an intuitive
* [Backoffice Search](backoffice-search.md)
* [Content Apps](content-apps.md)
* [Language files and localization](language-files.md)
* [Macro Parameter editors](macro-parameter-editors.md)

## Also in this section

Expand Down
12 changes: 0 additions & 12 deletions 14/umbraco-cms/extending-cms/filesystemproviders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,25 +152,13 @@ And you could create your own logic for the path by implementing `IMediaPathSche

Umbraco also registers instances of `PhysicalFileSystem` for the following parts of Umbraco that persist to 'files':

* `MacroPartialsFileSystem`
* `PartialViewsFileSystem`
* `StylesheetsFileSystem`
* `ScriptsFileSystem`
* `MvcViewsFileSystem`

These are accessible via dependency injection.

```csharp
public class FileSystemLocations
{
private readonly FileSystems _fileSystems;
public FileSystemLocations(FileSystems fileSystems)
{
_fileSystems = fileSystems;
var macroPartialsFileSystem = _fileSystems.MacroPartialsFileSystem;
}
```

`IFileSystem`, `MediaFileManager`, and `FileSystems` are located in the `Umbraco.Cms.Core.IO` namespace.

### Stylesheet Filesystem
Expand Down
92 changes: 0 additions & 92 deletions 14/umbraco-cms/extending-cms/health-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ For inspiration when building your checks you can look at the checks we've [buil
Umbraco comes with the following checks by default:

* Category **Configuration**
* **Macro errors (id: `D0F7599E-9B2A-4D9E-9883-81C7EDC5616F`)** - checks that the errors are set to `inline` so that pages that error will still load (and shows a small error message)
* **Notification Email Settings (id: `3E2F7B14-4B41-452B-9A30-E67FBC8E1206`)** - checks that the "from" email address used for email notifications has been changed from its default value
* Category **Data Integrity**
* **Database data integrity check (id: `73DD0C1C-E0CA-4C31-9564-1DCA509788AF`)** - checks for various data integrity issues in the Umbraco database
Expand Down Expand Up @@ -70,97 +69,6 @@ These are small checks that take an [IConfiguration](https://docs.microsoft.com/
* `CheckSuccessMessage` and `CheckErrorMessage` are the messages returned to the user
* It is highly recommended to use the `LocalizedTextService` so these can be localized. You can add the text in `~/Config/Lang/en-US.user.xml` (or whatever language you like)

An example check:

```csharp
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Macros;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;

namespace Umbraco.Cms.Core.HealthChecks.Checks.Configuration;

/// <summary>
/// Health check for the recommended production configuration for Macro Errors.
/// </summary>
[HealthCheck(
"D0F7599E-9B2A-4D9E-9883-81C7EDC5616F",
"Macro errors",
Description = "Checks to make sure macro errors are not set to throw a YSOD (yellow screen of death), which would prevent certain or all pages from loading completely.",
Group = "Configuration")]
public class MacroErrorsCheck : AbstractSettingsCheck
{
private readonly ILocalizedTextService _textService;
private readonly IOptionsMonitor<ContentSettings> _contentSettings;

/// <summary>
/// Initializes a new instance of the <see cref="MacroErrorsCheck"/> class.
/// </summary>
public MacroErrorsCheck(
ILocalizedTextService textService,
IOptionsMonitor<ContentSettings> contentSettings)
: base(textService)
{
_textService = textService;
_contentSettings = contentSettings;
}

/// <inheritdoc/>
public override string ReadMoreLink => Constants.HealthChecks.DocumentationLinks.Configuration.MacroErrorsCheck;

/// <inheritdoc/>
public override ValueComparisonType ValueComparisonType => ValueComparisonType.ShouldEqual;

/// <inheritdoc/>
public override string ItemPath => Constants.Configuration.ConfigContentMacroErrors;

/// <summary>
/// Gets the values to compare against.
/// </summary>
public override IEnumerable<AcceptableConfiguration> Values
{
get
{
var values = new List<AcceptableConfiguration>
{
new AcceptableConfiguration
{
IsRecommended = true,
Value = MacroErrorBehaviour.Inline.ToString()
},
new AcceptableConfiguration
{
IsRecommended = false,
Value = MacroErrorBehaviour.Silent.ToString()
}
};

return values;
}
}

/// <inheritdoc/>
public override string CurrentValue => _contentSettings.CurrentValue.MacroErrors.ToString();

/// <summary>
/// Gets the message for when the check has succeeded.
/// </summary>
public override string CheckSuccessMessage =>
_textService.Localize(
"healthcheck","macroErrorModeCheckSuccessMessage",
new[] { CurrentValue, Values.First(v => v.IsRecommended).Value });

/// <summary>
/// Gets the message for when the check has failed.
/// </summary>
public override string CheckErrorMessage =>
_textService.Localize(
"healthcheck","macroErrorModeCheckErrorMessage",
new[] { CurrentValue, Values.First(v => v.IsRecommended).Value });
}
```

### General checks

This can be anything you can think of, the results and the rectify action are completely under your control.
Expand Down
4 changes: 1 addition & 3 deletions 14/umbraco-cms/extending-cms/health-check/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Below is a list of guides for Health Checks in Umbraco.

## [Content sniffing protection](contentsniffingprotection.md)

## [Cross-site scription protection](crosssitescriptingprotection.md)
## [Cross-site scripting protection](crosssitescriptingprotection.md)

## [Debug compilation mode](debugcompilationmode.md)

Expand All @@ -18,8 +18,6 @@ Below is a list of guides for Health Checks in Umbraco.

## [HTTPS configuration](httpsconfiguration.md)

## [Macro errors](macroerrors.md)

## [Notification Email](notificationemail.md)

## [Simple Mail Transfer Protocol (SMTP)](smtp.md)
Expand Down
39 changes: 0 additions & 39 deletions 14/umbraco-cms/extending-cms/health-check/guides/macroerrors.md

This file was deleted.

Loading