From 1d00aef68036928ba0f3baeaf5889a0275c03a98 Mon Sep 17 00:00:00 2001 From: Ivan Bochkarev Date: Sat, 15 Aug 2026 23:30:32 +0600 Subject: [PATCH] docs: document MODX 3 new, changed, and removed features for #121 Fill EN/RU gaps for icons, path filters, TV bindings, ExtJS grids, media visibility, login/dashboard sync, password-reset email, package Markdown, MODx.perm, REST/parser notes, and legacy removals. --- .../bindings/chunk-binding.md | 17 +++++- .../template-variables/bindings/index.md | 3 +- .../bindings/snippet-binding.md | 2 +- en/building-sites/elements/templates.md | 6 ++ .../types/media-source-type-file-system.md | 18 ++++++ .../types/media-source-type-s3.md | 3 + en/building-sites/resources/content-types.md | 15 +++++ .../settings/forgot_login_email.md | 47 +++++++++------ en/building-sites/tag-syntax/index.md | 14 +++++ .../tag-syntax/output-filters/index.md | 24 ++++++++ .../modext/modext-modx-object.md | 23 +++----- .../modext/modx.grid.grid.md | 51 +++++++++++++++++ .../modext/modx.grid.localgrid.md | 2 + en/extending-modx/developing-restful-api.md | 2 + .../transport-packages/build-script.md | 3 + .../upgrading-to-3.0/breaking-changes.md | 20 ++++++- .../upgrading-to-3.0/class-names.md | 2 + en/getting-started/upgrading-to-3.0/index.md | 22 +++++-- .../upgrading-to-3.0/system-settings.md | 1 + .../client-proofing/dashboards/index.md | 17 ++++++ .../client-proofing/dashboards/managing.md | 11 ++++ .../security/passwordless-login/index.md | 2 +- .../bindings/chunk-binding.md | 25 +++++--- .../template-variables/bindings/index.md | 4 +- .../bindings/snippet-binding.md | 2 +- ru/building-sites/elements/templates.md | 6 ++ .../types/media-source-type-file-system.md | 18 ++++++ .../types/media-source-type-s3.md | 3 + ru/building-sites/resources/content-types.md | 21 ++++++- .../settings/forgot_login_email.md | 57 ++++++++++--------- ru/building-sites/tag-syntax/index.md | 14 +++++ .../tag-syntax/output-filters/index.md | 24 ++++++++ .../modext/modext-modx-object.md | 23 +++----- .../modext/modx.grid.grid.md | 51 +++++++++++++++++ .../modext/modx.grid.localgrid.md | 4 +- ru/extending-modx/developing-restful-api.md | 2 + .../transport-packages/build-script.md | 7 ++- .../upgrading-to-3.0/breaking-changes.md | 20 ++++++- .../upgrading-to-3.0/class-names.md | 2 + ru/getting-started/upgrading-to-3.0/index.md | 22 +++++-- .../upgrading-to-3.0/system-settings.md | 1 + 41 files changed, 498 insertions(+), 113 deletions(-) diff --git a/en/building-sites/elements/template-variables/bindings/chunk-binding.md b/en/building-sites/elements/template-variables/bindings/chunk-binding.md index 8dc9ef7a6..faba03570 100644 --- a/en/building-sites/elements/template-variables/bindings/chunk-binding.md +++ b/en/building-sites/elements/template-variables/bindings/chunk-binding.md @@ -17,12 +17,12 @@ In other words, if @CHUNK Hello is the value of a TV called MyChunk, the followi ## Syntax ``` php -@CHUNK chunk_name +@CHUNK chunk_name [properties_as_json] ``` -Binds the variable to a chunk. Where chunk\_name is the name of the chunk. The returned value is a string containing the content of the chunk. +Binds the variable to a Chunk. `chunk_name` is the Chunk name. The returned value is the parsed Chunk output. -This binding is very similar to the [@RESOURCE binding](building-sites/elements/template-variables/bindings/resource-binding "RESOURCE Binding") with the exception that it will bind the TV to a [Chunk](building-sites/elements/chunks "Chunks"). +Optional JSON properties (MODX 3.0+) are passed to `getChunk()` as the Chunk placeholders / properties array. ## Usage @@ -30,7 +30,18 @@ This binding is very similar to the [@RESOURCE binding](building-sites/elements/ @CHUNK MycontactForm ``` +With properties: + +``` php +@CHUNK MycontactForm {"submitLabel":"Send","showTitle":"1"} +``` + +Invalid JSON after the Chunk name is logged as an error and ignored; the Chunk still runs without those properties. + +This binding is similar to the [@RESOURCE binding](building-sites/elements/template-variables/bindings/resource-binding "RESOURCE Binding"), except it binds the TV to a [Chunk](building-sites/elements/chunks "Chunks"). For running PHP, use [@SNIPPET](building-sites/elements/template-variables/bindings/snippet-binding "SNIPPET Binding") instead. + ## See Also - [Template Variables](building-sites/elements/template-variables "Template Variables") - [Bindings](building-sites/elements/template-variables/bindings "Bindings") +- [SNIPPET Binding](building-sites/elements/template-variables/bindings/snippet-binding "SNIPPET Binding") diff --git a/en/building-sites/elements/template-variables/bindings/index.md b/en/building-sites/elements/template-variables/bindings/index.md index ada864393..4fa718db9 100644 --- a/en/building-sites/elements/template-variables/bindings/index.md +++ b/en/building-sites/elements/template-variables/bindings/index.md @@ -18,7 +18,8 @@ These Data Sources can be tied (or "bound") to a Template Variable for formattin - @FILE file\_path - @RESOURCE resource\_id -- @CHUNK chunk\_name +- @CHUNK chunk\_name \[properties\_as\_json\] +- @SNIPPET snippet\_name \[properties\_as\_json\] - @SELECT sql\_query - @DIRECTORY path\_relative\_to\_base\_path - @INLINE available in some Extras (e.g. getResources), this specifies a formatting chunk in-line as a string. diff --git a/en/building-sites/elements/template-variables/bindings/snippet-binding.md b/en/building-sites/elements/template-variables/bindings/snippet-binding.md index 070f88392..165f8fe39 100644 --- a/en/building-sites/elements/template-variables/bindings/snippet-binding.md +++ b/en/building-sites/elements/template-variables/bindings/snippet-binding.md @@ -13,7 +13,7 @@ The @SNIPPET Binding executes the specified MODX snippet. It should be used with ``` Binds the variable to a snippet. Where snippet_name is the name of the snippet. The returned value is the output of the snippet.\ -The JSON formatted properties are optional and are passed as scriptProperties to the snippet. +The JSON formatted properties are optional (MODX 3.0+) and are passed as scriptProperties to the snippet. ## Usage diff --git a/en/building-sites/elements/templates.md b/en/building-sites/elements/templates.md index ee7342c10..462be3521 100644 --- a/en/building-sites/elements/templates.md +++ b/en/building-sites/elements/templates.md @@ -50,6 +50,12 @@ After you've created one or more Templates, you can edit any Resource and choose Templates can contain any tags, including [Template Variables](building-sites/elements/template-variables "Template Variables"), [Chunks](building-sites/elements/chunks "Chunks"), [Snippets](extending-modx/snippets "Snippets"), and others. +### Manager Icon Class + +When you create or edit a Template, the **Manager Icon Class** field (`template_icon`) sets a CSS class for Resources that use that Template in the Resource tree. Use Font Awesome-style classes such as `icon-home` or `fa-home`. + +If this field is set, it takes precedence over the Content Type Icon for tree display. Leave it empty when you want the [Content Type](building-sites/resources/content-types) Icon (or the default resource / folder icon) to apply instead. + ### Using Resource Fields in the Template As you noticed from our Template sample code above, the fields of a Resource can be referenced using the `[[*fieldName]]` syntax. A list of available Resource Fields can be [found here](building-sites/resources#Resources-ResourceFields). For example, if we wanted to show the current Resource's pagetitle in our `` tag, we would simply do this: diff --git a/en/building-sites/media-sources/types/media-source-type-file-system.md b/en/building-sites/media-sources/types/media-source-type-file-system.md index c1397faef..54f7949cc 100644 --- a/en/building-sites/media-sources/types/media-source-type-file-system.md +++ b/en/building-sites/media-sources/types/media-source-type-file-system.md @@ -8,6 +8,8 @@ _old_uri: "2.x/administering-your-site/media-sources/media-source-types/media-so This Source Type allows you to browse the file system your MODX installation resides on. +In MODX 3 the driver is League Flysystem with a local adapter. + ## Available Properties | Name | Description | @@ -21,6 +23,22 @@ This Source Type allows you to browse the file system your MODX installation res | thumbnailType | When a thumbnail is displayed, the type of image it will be rendered as. **Default Value**: png | | thumbnailQuality | The quality of the rendered thumbnail, on a scale from 0-100. **Default Value**: 90 | | skipFiles | A comma-separated list of filenames to skip when browsing the source. **Default Value**: .svn,.git,\_notes,nbproject,.idea,.DS\_Store | +| visibility | Default Flysystem visibility for **new** files and folders: `public` or `private`. **Default**: `public`. Added in MODX 3.0. | + +### File and folder visibility (MODX 3.0+) + +File System sources support Flysystem visibility for both files and folders (`visibility_files` and `visibility_dirs` are enabled). + +- Private objects show an `icon-eye-slash` instead of the normal folder / file icon in the Files tree. +- Right-click a file or folder → **Set Visibility** → choose Public or Private. +- The source `visibility` property is only the default for newly created objects. It does not rewrite existing items. +- Changing visibility requires media-source save access. Folder menu items also need `directory_chmod`. File menu items need `file_update` (the processor still checks `directory_chmod`). + +Some remote adapters and certain file types (for example some `.php` paths) may refuse a visibility change. Check the error log if Set Visibility fails. + +### Protected system directories (MODX 3.0+) + +Browser processors refuse to **rename or remove** directories that resolve to core install paths: assets, base, connectors, core, manager, processors, and the xPDO core path. [#14374](https://github.com/modxcms/revolution/pull/14374) Pointing a File System source at the MODX root does not let you delete or rename those folders from the Files tree. Create sources under `assets/` (or another non-core tree) for day-to-day media work. ## See Also diff --git a/en/building-sites/media-sources/types/media-source-type-s3.md b/en/building-sites/media-sources/types/media-source-type-s3.md index b74fa1cf1..9bb293491 100644 --- a/en/building-sites/media-sources/types/media-source-type-s3.md +++ b/en/building-sites/media-sources/types/media-source-type-s3.md @@ -24,6 +24,9 @@ This Media Source type connects the Manager to an Amazon S3 bucket (or an S3-com | thumbnailType | Image format for generated thumbnails. **Default**: `png` | | thumbnailQuality | Thumbnail quality from 0 to 100. **Default**: `90` | | skipFiles | Comma-separated names to hide while browsing. **Default**: `.svn,.git,_notes,nbproject,.idea,.DS_Store` | +| visibility | Default Flysystem visibility for **new files**: `public` or `private`. **Default**: `private`. S3 sources support file visibility only (`visibility_dirs` is false), so folder Set Visibility is not offered. | + +MODX 3 media sources use League Flysystem (AWS SDK v3 for this type). Custom media source classes should target the Flysystem-based APIs rather than the pre-3.0 filesystem helpers. ## See Also diff --git a/en/building-sites/resources/content-types.md b/en/building-sites/resources/content-types.md index 264d28923..82090aa56 100644 --- a/en/building-sites/resources/content-types.md +++ b/en/building-sites/resources/content-types.md @@ -33,11 +33,26 @@ The fields that appear are as follows: - **Name** - This is the name of the Content Type. It is mainly for organizational and labeling purposes, and does not affect the function of the type. - **MIME Type** - Here you can set the MIME Type for the extension, which will tell the browser what type of file the [Resources](building-sites/resources "Resources") is. A list of available MIME Types can be found [here](http://www.iana.org/assignments/media-types/) or [here](http://www.feedforall.com/mime-types.htm). - **File Extensions** - This is the file extension to render the Resource as. Include the dot, e.g. ".doc" +- **Icon** - Optional CSS class for the Resource tree icon (MODX 3.0+). Examples: `icon-css`, `icon-json`, `icon-pdf`, or a Font Awesome class such as `icon-home` / `fa-home`. Leave empty to fall back to the Template icon or the default resource icon. - **Binary** - Is the file type text/ascii or binary? - **Description** - An optional field for your own descriptive purposes. From there, click "save" and the Content Type will appear in the grid. +### Resource tree icons (MODX 3.0+) + +MODX builds tree icons from CSS classes returned by the Resource. Prefer this order when you pick an icon: + +1. **Template** Manager Icon Class, if set on the Template. +2. **Content Type** Icon, if set on the Content Type and no Template icon wins visually for your theme. +3. Default `mgr_tree_icon_{classKey}` (for example `tree-resource`), plus weblink / symlink / static-resource icons when those types apply. + +Core Content Types ship with useful defaults for non-HTML MIME types (`icon-xml`, `icon-css`, `icon-js`, `icon-json`, `icon-pdf`, and similar). HTML usually keeps an empty Icon so the normal document / folder icon remains. + +You can edit Icon inline in the Content Types grid or in the create/update window. Protected system types still allow Icon (and file extensions) to change. + +See also [Templates](building-sites/elements/templates) for the Template Manager Icon Class field. + **About Aliases** When you create resources, the File Extension you choose for your content type will be what's appended to the alias of that resource (if you have friendly URLs enabled) diff --git a/en/building-sites/settings/forgot_login_email.md b/en/building-sites/settings/forgot_login_email.md index 58f548632..aee698967 100644 --- a/en/building-sites/settings/forgot_login_email.md +++ b/en/building-sites/settings/forgot_login_email.md @@ -4,28 +4,39 @@ _old_id: "130" _old_uri: "2.x/administering-your-site/settings/system-settings/forgot_login_email" --- -## forgot\_login\_email +## Password reset email (MODX 3) -**Name**: Forgot Login Email -**Type**: textarea -**Default**: (see below) -**Available In**: Revolution 2.0.0+ +In MODX 3 the manager forgot-password flow no longer emails a temporary password. The user gets a one-time reset link, opens the manager login screen, and chooses a new password. [#13786](https://github.com/modxcms/revolution/pull/13786) -The template for the email that is sent when a user has forgotten their MODX username and/or password. +The email body comes from the lexicon key `login_forgot_email` (namespace `core`, topic `login`), not from a system setting. Edit it under System → Lexicon Management, or override it in a custom lexicon. -The default is: +The default English text is: -``` html -<p>Hello [[+username]],</p> -<p>A request for a password reset has been issued for your MODX user. If you sent this, you may follow this link and use this password to login. If you did not send this request, please ignore this email.</p> +```html +<h2>Forgot your password?</h2> +<p>We received a request to change your MODX Revolution password. You can reset your password by clicking the button below and following the instructions on screen.</p> +<p class="center"><a href="[[+url_scheme]][[+http_host]][[+manager_url]]?modhash=[[+hash]]" class="btn">Reset my password</a></p> +<p class="small">If you did not send this request, please ignore this email.</p> +``` -<p> - <strong>Activation Link:</strong> [[+url_scheme]][[+http_host]][[+manager_url]]?modahsh=[[+hash]]<br /> - <strong>Username:</strong> [[+username]]<br /> - <strong>Password:</strong> [[+password]]<br /> -</p> +### Placeholders -<p>After you log into the MODX Manager, you can change your password again, if you wish.</p> +| Placeholder | Role | +| --- | --- | +| `[[+hash]]` | One-time activation hash (required in the reset URL as `modhash`) | +| `[[+url_scheme]]`, `[[+http_host]]`, `[[+manager_url]]` | Build the absolute manager URL | +| `[[+username]]` and other user fields | Available from the user object when the message is parsed | +| System config placeholders | Merged from `$modx->config` before parse | -<p>Regards,<br />Site Administrator</p> -``` +Do **not** put `[[+password]]` in the template. MODX 3 does not generate or send a password in this email. + +### Reset flow + +1. User requests a reset on the manager login screen (`allow_manager_login_forgot_password` must be enabled). +2. MODX stores a hash and emails the lexicon message with `?modhash=[[+hash]]`. +3. Opening that URL loads the login screen in password-change mode. +4. The user enters and confirms a new password. + +### Legacy `forgot_login_email` setting + +Revolution 2.x used the `forgot_login_email` system setting for this template. That setting is removed in MODX 3. Upgraded sites that still have a customized value in the database should move the HTML into the `login_forgot_email` lexicon entry and drop any `[[+password]]` line. diff --git a/en/building-sites/tag-syntax/index.md b/en/building-sites/tag-syntax/index.md index d49e9ac0b..65fdee31d 100644 --- a/en/building-sites/tag-syntax/index.md +++ b/en/building-sites/tag-syntax/index.md @@ -62,6 +62,20 @@ A good rule-of-thumb is that your tags should fit onto one line, even if you mul ]] ``` +## Literal square brackets inside tags + +MODX 3 can keep literal single `[` and `]` characters inside tag property values (for example in an output filter) without breaking tag collection. [#13904](https://github.com/modxcms/revolution/pull/13904) + +```php +[[+label:notempty=`[required]`]] +``` + +Standard tags still use double brackets: `[[ ... ]]`. + +## Array values in element properties (extras / custom parsers) + +When a snippet, chunk, or other element receives **array** property values (typical in PHP API calls rather than tag strings), MODX builds a stable cache/tag signature by serializing those arrays. Custom parser or element subclasses that forge tag signatures should treat array properties the same way so cache keys stay sortable and consistent. [#14689](https://github.com/modxcms/revolution/pull/14689) + ## Properties All MODX tags can accept [properties](building-sites/properties-and-property-sets), not just Snippets. diff --git a/en/building-sites/tag-syntax/output-filters/index.md b/en/building-sites/tag-syntax/output-filters/index.md index ccd06d0a2..e956bbc26 100644 --- a/en/building-sites/tag-syntax/output-filters/index.md +++ b/en/building-sites/tag-syntax/output-filters/index.md @@ -121,6 +121,30 @@ The following table lists some of the existing modifiers and shows examples of t | urldecode | Converts the input from an URL-friendly string Similar to PHP's [urldecode](http://www.php.net/manual/en/function.urldecode.php) | `[[+myparam:urldecode]]` | | filterPathSegment | Added in 2.7. Converts the input into a URL-friendly string with the same mechanism that turns a pagetitle into an alias, including transliteration if enabled. Useful for custom urls. | `[[+pagetitle:filterPathSegment]]` | +### File path output modifiers + +Added in MODX 3.0. These modifiers wrap PHP [`pathinfo()`](https://www.php.net/manual/en/function.pathinfo.php). They do not check whether the path exists on disk. Options after the modifier are ignored. + +| Modifier | Description | Example | +| ---------- | ----------- | ------- | +| dirname | Directory portion of the path | `[[+filepath:dirname]]` → `/assets/images` for `/assets/images/logo.jpg` | +| basename | File name including extension | `[[+filepath:basename]]` → `logo.jpg` | +| filename | File name without the final extension | `[[+filepath:filename]]` → `logo` | +| extension | Final extension only (singular name; not `extensions`) | `[[+filepath:extension]]` → `jpg` | + +Edge cases worth knowing: + +- `test.inc.php` → filename `test.inc`, extension `php` +- `file.tar.gz` → filename `file.tar`, extension `gz` +- `.htaccess` → empty filename, extension `htaccess` +- A path with no extension returns an empty extension string + +```php +[[*myImageTV:basename]] +[[*myImageTV:dirname]]/thumbs/[[*myImageTV:filename]].webp +[[+file:extension:lcase:is=`pdf`:then=`PDF`:else=`Other`]] +``` + ### Caching In general, any content in a placeholder that you think **might change dynamically** should be uncached. For example: diff --git a/en/extending-modx/custom-manager-pages/modext/modext-modx-object.md b/en/extending-modx/custom-manager-pages/modext/modext-modx-object.md index f937fc502..115f7e57b 100644 --- a/en/extending-modx/custom-manager-pages/modext/modext-modx-object.md +++ b/en/extending-modx/custom-manager-pages/modext/modext-modx-object.md @@ -76,26 +76,17 @@ var userId = MODx.user.id; ### MODx.perm -This will contain the following permissions should they be granted to the user (they will not exist if the user does not have the permission): - -| Name | Description | -| --------------------------- | --------------------------------------------------- | -| MODx.perm.resource\_tree | To view the Resources tree. | -| MODx.perm.element\_tree | To view the Elements tree. | -| MODx.perm.file\_tree | To view the Files tree. | -| MODx.perm.file\_upload | To be able to upload files. | -| MODx.perm.file\_manager | To use the MODX file browser. | -| MODx.perm.new\_chunk | To create a new Chunk. | -| MODx.perm.new\_plugin | To create a new Plugin. | -| MODx.perm.new\_snippet | To create a new Snippet. | -| MODx.perm.new\_template | To create a new Template. | -| MODx.perm.new\_tv | To create a new Template Variable. | -| MODx.perm.directory\_create | To be able to create a directory on the filesystem. | +`MODx.perm` is a map of **every** manager permission name to a boolean for the current user. Config JS loads distinct rows from `modAccessPermission` and sets each key with `hasPermission()`. There is no fixed subset. [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425) -``` javascript +Use any permission key your Extra or CMP checks, for example: + +```javascript if (MODx.perm.file_upload) { /* ...code... */ } +if (MODx.perm.view_document) { /* ... */ } ``` +Common keys still include `resource_tree`, `element_tree`, `file_tree`, `file_upload`, `file_manager`, `new_chunk`, `new_plugin`, `new_snippet`, `new_template`, `new_tv`, and `directory_create`. Missing keys mean the user does not have that permission (treat as falsy). + ## Custom Methods The MODx object also has quite a few custom methods available to it: diff --git a/en/extending-modx/custom-manager-pages/modext/modx.grid.grid.md b/en/extending-modx/custom-manager-pages/modext/modx.grid.grid.md index dc25bf23a..9736c664f 100644 --- a/en/extending-modx/custom-manager-pages/modext/modx.grid.grid.md +++ b/en/extending-modx/custom-manager-pages/modext/modx.grid.grid.md @@ -84,9 +84,60 @@ MODx.grid.Grid adds a few unique parameters not found in typical Ext.grid.Grid o | preventSaveRefresh | If autosave is true, after saving, will prevent the grid from refreshing. Makes for a more seamless editing experience. | 1 | | primaryKey | If your grid items have a primary key that's not ID, set it here. | id | | storeId | A custom ID to give the store for this grid. Will default to a unique Ext ID. | Ext.id() | +| showActionsColumn | If true, append an actions column (`modx-actions`) with icon buttons. Added in MODX 3.0. | true | +| actionsColumnWidth | Width of the actions column. Auto: `50` for pixel column models, `0.1` when all column widths are ≤ 1. | auto | +| disableContextMenuAction | If true, omit the default gear icon that opens the row context menu, and suppress that actions menu path. | false | For a complete list of all parameters not listed here for grids, see the [ExtJS](http://sencha.com) documentation. +## Actions column (MODX 3.0+) + +`MODx.grid.Grid` and `MODx.grid.LocalGrid` share `MODx.grid.GridBase`. When `showActionsColumn` is true, MODX adds a fixed column whose renderer calls `getActions()`. + +Override `getActions` to return extra icon buttons. Each item needs `action`, `icon`, and `text`. A click looks for a method named after `action` (or Capitalized `action`) on the grid. + +``` javascript +getActions: function(value, metaData, record, rowIndex, colIndex, store) { + return [{ + action: 'removeElement', + icon: 'trash-o', + text: _('delete') + }]; +} +``` + +Unless `disableContextMenuAction` is true, MODX also appends a gear action that opens the same menu as a right-click (`getMenu` / processor `menu` data). + +Turn the whole column off: + +``` javascript +Ext.applyIf(config, { + showActionsColumn: false +}); +``` + +## Editable column hover (MODX 3.0+) + +Columns that define an `editor` automatically receive the CSS class `x-editable-column` through `renderEditableColumn`. The manager theme shows a hover cue (pen icon). There is no separate config flag: add an `editor` when the cell is inline-editable. + +## Column links (MODX 3.0+) + +Use `renderLink(content, attributes, isSimulated, isSimulatedTag)` in a column renderer to wrap values in an `<a class="x-grid-link">` (or a simulated span link). + +``` javascript +renderer: { + fn: function(value, metaData, record) { + return this.renderLink(value, { + href: '?a=context/update&key=' + record.data.key, + title: _('edit') + }); + }, + scope: this +} +``` + +Related helper: `getLinkTemplate(controllerPath, displayValueIndex, options)` for `xtype: 'templatecolumn'` layouts. + ## Custom Events MODx.grid.Grid adds a few extra events not found in Ext.grid.Grid objects: diff --git a/en/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md b/en/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md index 3a177ea07..9763098b0 100644 --- a/en/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md +++ b/en/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md @@ -11,6 +11,8 @@ _old_uri: "2.x/developing-in-modx/advanced-development/custom-manager-pages/mode The MODExt LocalGrid class is similar to the [MODx.grid.Grid](extending-modx/custom-manager-pages/modext/modx.grid.grid "MODx.grid.Grid") class, however rather than using a connector to populate it with data, it must be loaded through a local store. +LocalGrid inherits the same GridBase defaults as remote grids: `showActionsColumn`, `getActions()`, editable-column hover, and `renderLink()`. + When instantiating this into a tabbed interface, it's recommended to set preventRender: true in its config to prevent JS rendering issues. ## See Also diff --git a/en/extending-modx/developing-restful-api.md b/en/extending-modx/developing-restful-api.md index 8ba2fc903..f6f1a059c 100644 --- a/en/extending-modx/developing-restful-api.md +++ b/en/extending-modx/developing-restful-api.md @@ -334,6 +334,8 @@ Failed auth becomes HTTP 401 with the standard error payload. Pair this with HTT JSON is the default. Request XML with a `.xml` suffix when the format is enabled (`/rest/items.xml`), or set `defaultResponseFormat` to `xml`. +When the service parses inbound XML request bodies, an empty XML element becomes an empty string (`''`) in the resulting PHP array, not an empty array. [#14305](https://github.com/modxcms/revolution/pull/14305) Controllers that treat “empty” with `empty()` or strict `=== ''` checks stay consistent with JSON clients sending `""`. + Success and failure bodies use keys from the service config (`success`, `message`, `object`, plus `errors` when field errors exist). List calls use `results` and `total`. Default HTTP status for both success and failure is `200`. Pass a third argument to `success()` / `failure()`, or change `defaultSuccessStatusCode` / `defaultFailureStatusCode`, when you need 201/404-style codes. diff --git a/en/extending-modx/transport-packages/build-script.md b/en/extending-modx/transport-packages/build-script.md index 709efe1d3..d6fd778ef 100644 --- a/en/extending-modx/transport-packages/build-script.md +++ b/en/extending-modx/transport-packages/build-script.md @@ -419,8 +419,11 @@ Each package has what are called 'package attributes', which can be passed to an - **license** (string) - This represents your license agreement. Should MODX find this not empty during install, it will prompt the user to agree to it before they can proceed to install the package. - **readme** (string) - This holds the readme. Before installing, if this is not empty, the user will be able to view the readme. This can be useful to make sure people see any requirements before they install. +- **changelog** (string) - Optional release notes shown with the package attributes. - **setup-options** (string) - And here is the best part - this can be an HTML form (minus the form tags) that will pass any user-inputted options to the resolvers or validators. This means that you can take in user input before install, and process it during install! +**Markdown in package attributes (MODX 3+):** when the installer shows `license`, `readme`, or `changelog`, MODX renders those strings as Markdown (Parsedown, safe mode) before display. [#13853](https://github.com/modxcms/revolution/pull/13853) You can keep plain text or HTML-ish content, but Markdown headings, lists, and links work without shipping a separate HTML file for those three keys. + So let's use these in our build script: ```php diff --git a/en/getting-started/upgrading-to-3.0/breaking-changes.md b/en/getting-started/upgrading-to-3.0/breaking-changes.md index 9062a6d2d..e2fcbc6f8 100644 --- a/en/getting-started/upgrading-to-3.0/breaking-changes.md +++ b/en/getting-started/upgrading-to-3.0/breaking-changes.md @@ -21,8 +21,24 @@ The biggest breaking changes can be summarised as follows: ## Legacy functionality cleanup -- `modResource->contentType` field has been removed; that was replaced in Revolution 2.0 with a `content_type` field that maps to a `modContentType` instance. [#14057](https://github.com/modxcms/revolution/pull/14057) -- `modParser095`, `modTranslate095`, and `modTranslator` have been removed. Those were utilities for migrating templates from Evolution syntax. [#14133](https://github.com/modxcms/revolution/pull/14133) +- `modResource->contentType` field has been removed. Use the `content_type` integer field (FK to `modContentType`) instead. [#14057](https://github.com/modxcms/revolution/pull/14057) + + Before (legacy / broken in 3.0): + + ```php + $mime = $resource->get('contentType'); // removed field + ``` + + After: + + ```php + $contentTypeId = $resource->get('content_type'); + $contentType = $resource->getOne('ContentType'); // or $modx->getObject(modContentType::class, $contentTypeId) + $mime = $contentType ? $contentType->get('mime_type') : ''; + ``` + +- `modParser095`, `modTranslate095`, and `modTranslator` have been removed. They only helped migrate Evolution (0.9.x) tag syntax into Revolution. Do not call them for Evo→Revo migrations anymore: convert templates to standard `[[...]]` tags manually or with your own tooling, then rely on the normal `modParser`. [#14133](https://github.com/modxcms/revolution/pull/14133) +- Flash-based copy-to-clipboard in ExtJS has been removed. Manager copy actions use the browser clipboard APIs instead. [#13697](https://github.com/modxcms/revolution/pull/13697) - `/manager/min/` directory has been removed; was unused since 2.5. [#12778](https://github.com/modxcms/revolution/pull/12778), [#13194](https://github.com/modxcms/revolution/pull/13194), [#14416](https://github.com/modxcms/revolution/pull/14416) - Unused ExtJS grids have been removed: assets/modext/widgets/resource/modx.grid.resource.security.js, assets/modext/widgets/security/modx.grid.role.user.js, assets/modext/workspace/lexicon/language.grid.js, assets/modext/workspace/lexicon/lexicon.topic.grid.js [#14895](https://github.com/modxcms/revolution/pull/14895) - `@EVAL` binding has been removed from TVs [#13865](https://github.com/modxcms/revolution/pull/13865) diff --git a/en/getting-started/upgrading-to-3.0/class-names.md b/en/getting-started/upgrading-to-3.0/class-names.md index 7dae91297..0858189c2 100644 --- a/en/getting-started/upgrading-to-3.0/class-names.md +++ b/en/getting-started/upgrading-to-3.0/class-names.md @@ -79,6 +79,8 @@ These classes were permanently removed from 3.0 with no alternative: - All classes and functions related to the `xmlrpc` and `jsonrpc` services/utilities: `modXMLRPCResponse`, `modJSONRPCResponse`, `modXMLRPCResource` (+ platform classes), `modJSONRPCResource` (+ platform classes) - `modManagerControllerDeprecated` +Flash clipboard helpers previously used by ExtJS for copy-to-clipboard are gone with the Flash removal [#13697](https://github.com/modxcms/revolution/pull/13697). Use the browser clipboard APIs instead. + ## Signature changes - `modResponse::_construct` (and inherited `modManagerResponse`/`modConnectorResponse`) is now marked `public` and no longer includes the ampersand as objects are always passed by reference. diff --git a/en/getting-started/upgrading-to-3.0/index.md b/en/getting-started/upgrading-to-3.0/index.md index c8778ca7b..8d841862b 100644 --- a/en/getting-started/upgrading-to-3.0/index.md +++ b/en/getting-started/upgrading-to-3.0/index.md @@ -30,20 +30,30 @@ After upgrading the core and upgrading your extras, you may encounter some break - Redesigned installer [#14507](https://github.com/modxcms/revolution/pull/14507) and login [#13773](https://github.com/modxcms/revolution/pull/13773). - Manager has been redesigned. Improved manager on mobile devices [#14700](https://github.com/modxcms/revolution/pull/14700), [#14735](https://github.com/modxcms/revolution/pull/14735). Changed resource styles in the tree [#14832](https://github.com/modxcms/revolution/pull/14832) - Language can now be switched on the fly [#14046](https://github.com/modxcms/revolution/pull/14046) -- All manager permissions are automatically made available in `MODx.perm` [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425) +- All manager permissions are automatically made available in `MODx.perm` [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425). See [The MODx Object](extending-modx/custom-manager-pages/modext/modext-modx-object). - Google translations are now disabled in the manager [#14414](https://github.com/modxcms/revolution/pull/14414) - More consistent resource/element duplication [#14411](https://github.com/modxcms/revolution/pull/14411) ### Packages -- Markdown is now parsed in package attributes (changelog/readme/license) [#13853](https://github.com/modxcms/revolution/pull/13853) +- Markdown is now parsed in package attributes (changelog/readme/license) [#13853](https://github.com/modxcms/revolution/pull/13853). See [Creating a Build Script](extending-modx/transport-packages/build-script). ### Files & Media -- Media sources now use Flysystem [#13709](https://github.com/modxcms/revolution/pull/13709) -- Core directories are now protected from being renamed/removed from the manager [#14374](https://github.com/modxcms/revolution/pull/14374) +- Media sources now use Flysystem [#13709](https://github.com/modxcms/revolution/pull/13709). See [File System](building-sites/media-sources/types/media-source-type-file-system) and [S3](building-sites/media-sources/types/media-source-type-s3) media source types. +- Core directories are now protected from being renamed/removed from the manager [#14374](https://github.com/modxcms/revolution/pull/14374). See [File System media sources](building-sites/media-sources/types/media-source-type-file-system). ### Resources & Templates -- Resources can now get an icon based on their content type [#14383](https://github.com/modxcms/revolution/pull/14383) -- New output modifiers related to files: `dirname`, `basename`, `filename`, `extensions` [#14198](https://github.com/modxcms/revolution/pull/14198) +- Resources can now get an icon based on their content type [#14383](https://github.com/modxcms/revolution/pull/14383). See [Content Types](building-sites/resources/content-types). +- New output modifiers related to files: `dirname`, `basename`, `filename`, `extension` [#14198](https://github.com/modxcms/revolution/pull/14198). See [Output Filter/Modifiers](building-sites/tag-syntax/output-filters). + +### Security & email + +- Forgot-password email uses a reset link (`modhash`) instead of sending a password [#13786](https://github.com/modxcms/revolution/pull/13786). See [forgot_login_email](building-sites/settings/forgot_login_email). + +### Parser & REST + +- Literal single `[` / `]` inside tag values are supported [#13904](https://github.com/modxcms/revolution/pull/13904). See [Tag Syntax](building-sites/tag-syntax). +- Array property values get a stable serialized tag signature [#14689](https://github.com/modxcms/revolution/pull/14689). See [Tag Syntax](building-sites/tag-syntax). +- Empty XML elements in `modRestService` request bodies map to `''` [#14305](https://github.com/modxcms/revolution/pull/14305). See [Developing a RESTful API](extending-modx/developing-restful-api). diff --git a/en/getting-started/upgrading-to-3.0/system-settings.md b/en/getting-started/upgrading-to-3.0/system-settings.md index 542213b41..f17985432 100644 --- a/en/getting-started/upgrading-to-3.0/system-settings.md +++ b/en/getting-started/upgrading-to-3.0/system-settings.md @@ -7,6 +7,7 @@ MODX 3.0 cleaned up a significant number of old system settings and changed the ## Removed - `allow_tv_eval`, the `@EVAL` binding is no longer supported for TVs for security reasons [#13865](https://github.com/modxcms/revolution/pull/13865) +- `forgot_login_email`, password-reset mail now uses the `login_forgot_email` lexicon and a reset link instead of emailing a password [#13786](https://github.com/modxcms/revolution/pull/13786). See [forgot_login_email](building-sites/settings/forgot_login_email) - `compress_js_max_files`, `manager_js_zlib_output_compression`, `manager_js_cache_file_locking`, `manager_js_cache_max_age`, `manager_js_document_root` which were related to the old dynamic manager js minification [#13859](https://github.com/modxcms/revolution/pull/13859), [#14868](https://github.com/modxcms/revolution/pull/14868) - `editor_css_path` and `editor_css_selectors` have been removed [#14843](https://github.com/modxcms/revolution/pull/14843). These settings may be in by [TinyMCE](https://github.com/modxcms/TinyMCE/issues/30) or other third-party extras which may need to accommodate the setting not being available.) - `manager_language` [#13786](https://github.com/modxcms/revolution/pull/13786), replaced by automatic language detection and on-the-fly switching in the manager [#14046](https://github.com/modxcms/revolution/pull/14046). [Learn more about the manager language in 3.0](getting-started/maintenance/upgrading/3.0/manager-language) diff --git a/ru/building-sites/client-proofing/dashboards/index.md b/ru/building-sites/client-proofing/dashboards/index.md index 0826db8f7..9ef847550 100644 --- a/ru/building-sites/client-proofing/dashboards/index.md +++ b/ru/building-sites/client-proofing/dashboards/index.md @@ -28,6 +28,23 @@ translation: "building-sites/client-proofing/dashboards" Изменения, которые вы делаете прямо на странице панели пользователя (например, закрываете виджет кнопкой или добавляете виджет с самой панели), затрагивают только этого пользователя и не меняют шаблон. +## Настраиваемые панели + +У панелей есть параметр **Customizable** / «Настраиваемая». Если он включён (так по умолчанию), MODX при первой загрузке панели клонирует раскладку виджетов для каждого пользователя. У пользователя появляется личная копия: можно менять порядок, добавлять и убирать виджеты, не затрагивая остальных. + +Если **Customizable** выключен, все пользователи делят одну раскладку и не правят её лично. + +### Как изменения шаблона доходят до пользователей + +Раскладка виджетов на странице Dashboards → Update Dashboard — это **шаблон** настраиваемой панели. Добавление или удаление виджетов в шаблоне применяется ко всем, у кого уже есть личная копия: + +- **Добавленные** в шаблон виджеты появятся у всех пользователей этой панели. +- **Удалённые** из шаблона виджеты пропадут у всех личных копий. + +Личный порядок виджетов от правок шаблона не сбрасывается. + +Правки прямо на странице панели пользователя (кнопка закрытия виджета или добавление с самой панели) затрагивают только этого пользователя и не меняют шаблон. + ## Использование панелей - [Редактирование панели управления](building-sites/client-proofing/dashboards/managing "Редактирование панели управления") diff --git a/ru/building-sites/client-proofing/dashboards/managing.md b/ru/building-sites/client-proofing/dashboards/managing.md index f670b07fd..837a69604 100644 --- a/ru/building-sites/client-proofing/dashboards/managing.md +++ b/ru/building-sites/client-proofing/dashboards/managing.md @@ -24,6 +24,17 @@ translation: "building-sites/client-proofing/dashboards/managing" Если вы хотите применить изменение виджета ко всем пользователям, сделайте это на этой странице управления. Если нужно настроить только свою панель, меняйте её прямо на странице панели. +## Шаблон и личные правки + +Изменения на этой странице обновляют **шаблон** панели. Для [настраиваемых панелей](building-sites/client-proofing/dashboards "Панели управления") правки шаблона доходят до всех пользователей с личной копией: + +- **Добавление виджета** здесь покажет его всем текущим пользователям панели. +- **Удаление виджета** здесь уберёт его из всех личных панелей. + +Это отличается от правок прямо на странице панели (кнопка закрытия виджета или добавление с панели). Такие правки касаются только текущего пользователя. + +Чтобы изменить виджеты для всех, правьте эту страницу управления. Чтобы поправить только свою панель, меняйте её на самой странице Dashboard. + ## Смотрите также 1. [Редактирование панели управления](building-sites/client-proofing/dashboards/managing) diff --git a/ru/building-sites/client-proofing/security/passwordless-login/index.md b/ru/building-sites/client-proofing/security/passwordless-login/index.md index d2cf96e4b..4fa4226bd 100644 --- a/ru/building-sites/client-proofing/security/passwordless-login/index.md +++ b/ru/building-sites/client-proofing/security/passwordless-login/index.md @@ -14,7 +14,7 @@ MODX3 имеет новую функцию под названием "Вход ## Как включить пароль без логина -Чтобы активировать вход без пароля, необходимо установить системный параметр `passwordless_activation` в области «Аутентификация и безопасность» основных настроек системы на «Да». При следующем входе в систему вам будет представлен следующий экран входа в систему: +Чтобы активировать вход без пароля, необходимо установить системный параметр `passwordless_activated` в области «Аутентификация и безопасность» основных настроек системы на «Да». При следующем входе в систему вам будет представлен следующий экран входа в систему: ![](passwordless-login-screen.jpg) diff --git a/ru/building-sites/elements/template-variables/bindings/chunk-binding.md b/ru/building-sites/elements/template-variables/bindings/chunk-binding.md index 2489b90de..e24e27cb8 100644 --- a/ru/building-sites/elements/template-variables/bindings/chunk-binding.md +++ b/ru/building-sites/elements/template-variables/bindings/chunk-binding.md @@ -5,9 +5,9 @@ translation: "building-sites/elements/template-variables/bindings/chunk-binding" ## Что такое @CHUNK привязка? -Привязка @CHUNK возвращает проанализированный контент любого указанного чанка, если @CHUNK используется в переменной шаблона (TV). +Привязка @CHUNK возвращает разобранное содержимое указанного чанка, когда @CHUNK используется в переменной шаблона (TV). -Другими словами, если @CHUNK Hello - это значение TV с именем MyChunk, следующий тег в шаблоне или в поле Resource Content ресурса будет заменен содержимым блока Hello: +Другими словами, если @CHUNK Hello — значение TV с именем MyChunk, следующий тег в шаблоне или в поле содержимого ресурса будет заменён содержимым чанка Hello: ```php [[*MyChunk]] @@ -16,12 +16,12 @@ translation: "building-sites/elements/template-variables/bindings/chunk-binding" ## Синтаксис ```php -@CHUNK chunk_name +@CHUNK chunk_name [properties_as_json] ``` -Привязывает переменную к документу. Где `chunk_name` - это имя чанка. Возвращаемое значение является строкой, содержащей содержимое чанка. +Привязывает переменную к чанку. `chunk_name` — имя чанка. Возвращаемое значение — разобранный вывод чанка. -Это связывание очень похоже на [@RESOURCE привязку](building-sites/elements/template-variables/bindings/resource-binding "RESOURCE привязка") за исключением того, что он будет привязывать TV к [чанку](building-sites/elements/chunks "Чанки"). +Необязательные JSON-свойства (MODX 3.0+) передаются в `getChunk()` как массив плейсхолдеров / свойств чанка. ## Использование @@ -29,7 +29,18 @@ translation: "building-sites/elements/template-variables/bindings/chunk-binding" @CHUNK MycontactForm ``` +Со свойствами: + +```php +@CHUNK MycontactForm {"submitLabel":"Отправить","showTitle":"1"} +``` + +Некорректный JSON после имени чанка пишется в лог ошибок и игнорируется. Чанк всё равно выполняется без этих свойств. + +Эта привязка похожа на [@RESOURCE](building-sites/elements/template-variables/bindings/resource-binding "RESOURCE привязка"), но связывает TV с [чанком](building-sites/elements/chunks "Чанки"). Для выполнения PHP используйте [@SNIPPET](building-sites/elements/template-variables/bindings/snippet-binding "SNIPPET привязка"). + ## Смотрите также -- [Переменные шаблона](building-sites/elements/template-variables "Переменные шаблона") -- [Привязки](building-sites/elements/template-variables/bindings "Привязки") +- [Переменные шаблона](building-sites/elements/template-variables "Переменные шаблона") +- [Привязки](building-sites/elements/template-variables/bindings "Привязки") +- [Привязка SNIPPET](building-sites/elements/template-variables/bindings/snippet-binding "SNIPPET привязка") diff --git a/ru/building-sites/elements/template-variables/bindings/index.md b/ru/building-sites/elements/template-variables/bindings/index.md index 6c703ff3b..905f98010 100644 --- a/ru/building-sites/elements/template-variables/bindings/index.md +++ b/ru/building-sites/elements/template-variables/bindings/index.md @@ -17,7 +17,8 @@ translation: "building-sites/elements/template-variables/bindings" - @FILE file\_path - @RESOURCE resource\_id -- @CHUNK chunk\_name +- @CHUNK chunk\_name \[properties\_as\_json\] +- @SNIPPET snippet\_name \[properties\_as\_json\] - @SELECT sql\_query - @DIRECTORY path\_relative\_to\_base\_path - @INLINE доступный в некоторых дополнительных объектах (например, getResources), это указывает блок форматирования in-line в виде строки. @@ -44,6 +45,7 @@ col1row1Value==col2row1Value||col1row2Value==col2row2Value,... - [@RESOURCE](building-sites/elements/template-variables/bindings/resource-binding "RESOURCE привязка") - [@CHUNK](building-sites/elements/template-variables/bindings/chunk-binding "CHUNK привязка") - [@SELECT](building-sites/elements/template-variables/bindings/select-binding "SELECT привязка") +- [@SNIPPET](building-sites/elements/template-variables/bindings/snippet-binding "SNIPPET привязка") - [@DIRECTORY](building-sites/elements/template-variables/bindings/directory-binding "DIRECTORY привязка") - [@INHERIT](building-sites/elements/template-variables/bindings/inherit-binding "INHERIT привязка") diff --git a/ru/building-sites/elements/template-variables/bindings/snippet-binding.md b/ru/building-sites/elements/template-variables/bindings/snippet-binding.md index ae3f51b15..2494e0cf9 100644 --- a/ru/building-sites/elements/template-variables/bindings/snippet-binding.md +++ b/ru/building-sites/elements/template-variables/bindings/snippet-binding.md @@ -14,7 +14,7 @@ translation: "building-sites/elements/template-variables/bindings/snippet-bindin ``` Привязывает переменную к сниппету. Где `snippet_name` - это имя сниппета. Возвращаемое значение - вывод сниппета.\ -Свойства в формате JSON необязательны и передаются сниппету как scriptProperties. +Свойства в формате JSON необязательны (MODX 3.0+) и передаются сниппету как scriptProperties. ## Использование diff --git a/ru/building-sites/elements/templates.md b/ru/building-sites/elements/templates.md index 5cdf4344e..cec8045b7 100644 --- a/ru/building-sites/elements/templates.md +++ b/ru/building-sites/elements/templates.md @@ -48,6 +48,12 @@ MODX по умолчанию хранит шаблоны в своей базе Шаблоны могут содержать любые теги, в том числе [Переменные шаблона TV](building-sites/elements/template-variables "Переменные шаблона TV"), [Чанки](building-sites/elements/chunks "Чанки"), [Сниппеты](extending-modx/snippets "Сниппеты"), и другие. +### Класс иконки в менеджере + +При создании или редактировании шаблона поле **Класс иконки** / Manager Icon Class (`template_icon`) задаёт CSS-класс для ресурсов с этим шаблоном в дереве ресурсов. Подходят классы в стиле Font Awesome, например `icon-home` или `fa-home`. + +Если поле заполнено, оно имеет приоритет над иконкой типа содержимого. Оставьте его пустым, когда нужна [иконка типа содержимого](building-sites/resources/content-types) или стандартная иконка ресурса / папки. + ### Использование полей ресурса в шаблоне Как вы заметили из нашего примера кода шаблона выше, на поля ресурса можно ссылаться с помощью синтаксиса `[[*fieldName]]`. Список доступных полей ресурсов можно найти [здесь](building-sites/resources). Например, если мы хотим показать заголовок текущего ресурса в нашем теге `<title>`, мы просто сделаем это: diff --git a/ru/building-sites/media-sources/types/media-source-type-file-system.md b/ru/building-sites/media-sources/types/media-source-type-file-system.md index 7b31d01f0..098278bb2 100644 --- a/ru/building-sites/media-sources/types/media-source-type-file-system.md +++ b/ru/building-sites/media-sources/types/media-source-type-file-system.md @@ -7,6 +7,8 @@ translation: "building-sites/media-sources/types/media-source-type-file-system" Этот тип источника позволяет вам просматривать файловую систему, в которой находится ваша установка MODX. +В MODX 3 драйвер — League Flysystem с локальным адаптером. + ## Доступные свойства | Имя | Описание | @@ -20,6 +22,22 @@ translation: "building-sites/media-sources/types/media-source-type-file-system" | `thumbnailType` | Когда отображается миниатюра, тип изображения будет отображаться как. **Значение по умолчанию**: `png` | | `thumbnailQuality` | Качество отрисованного превью, по шкале от 0 до 100. **Значение по умолчанию**: `90` | | `skipFiles` | Разделенный запятыми список имен файлов, которые нужно пропустить при просмотре источника. **Значение по умолчанию**: `.svn,.git,notes,nbproject,.idea,.DS_Store` | +| `visibility` | Видимость Flysystem по умолчанию для **новых** файлов и папок: `public` или `private`. **По умолчанию**: `public`. Добавлено в MODX 3.0. | + +### Видимость файлов и папок (MODX 3.0+) + +Источники файловой системы поддерживают видимость Flysystem и для файлов, и для папок. + +- У private-объектов в дереве Files вместо обычной иконки показывается `icon-eye-slash`. +- Правый клик по файлу или папке → **Указать видимость** / Set Visibility → Public или Private. +- Свойство источника `visibility` задаёт только default для новых объектов. Уже существующие элементы оно не переписывает. +- Для смены видимости нужны права save у media source. В меню папки также нужно `directory_chmod`. В меню файла — `file_update` (процессор всё равно проверяет `directory_chmod`). + +Некоторые remote-адаптеры и отдельные типы файлов (например часть путей `.php`) могут отклонить смену видимости. Если Set Visibility падает, смотрите error log. + +### Защищённые системные каталоги (MODX 3.0+) + +Процессоры браузера **не переименовывают и не удаляют** каталоги, которые совпадают с путями установки: assets, base, connectors, core, manager, processors и путь xPDO core. [#14374](https://github.com/modxcms/revolution/pull/14374) Источник на корень MODX не даст снести эти папки из дерева Files. Для повседневной работы с медиа указывайте `basePath` на `assets/` или другое дерево вне core. ## Смотрите также diff --git a/ru/building-sites/media-sources/types/media-source-type-s3.md b/ru/building-sites/media-sources/types/media-source-type-s3.md index 2ba194e70..e80ad7df7 100644 --- a/ru/building-sites/media-sources/types/media-source-type-s3.md +++ b/ru/building-sites/media-sources/types/media-source-type-s3.md @@ -23,6 +23,9 @@ translation: "building-sites/media-sources/types/media-source-type-s3" | `thumbnailType` | Формат превью. **По умолчанию**: `png` | | `thumbnailQuality` | Качество превью от 0 до 100. **По умолчанию**: `90` | | `skipFiles` | Имена через запятую, которые скрывать при просмотре. **По умолчанию**: `.svn,.git,_notes,nbproject,.idea,.DS_Store` | +| `visibility` | Видимость Flysystem по умолчанию для **новых файлов**: `public` или `private`. **По умолчанию**: `private`. У S3 поддерживается видимость файлов, не папок (`visibility_dirs` = false), поэтому Set Visibility для каталогов недоступен. | + +В MODX 3 источники медиа работают через League Flysystem (для этого типа — AWS SDK v3). Кастомные классы источников должны опираться на Flysystem API, а не на хелперы файловой системы до 3.0. ## Смотрите также diff --git a/ru/building-sites/resources/content-types.md b/ru/building-sites/resources/content-types.md index 03a2c0d5c..952b627fb 100644 --- a/ru/building-sites/resources/content-types.md +++ b/ru/building-sites/resources/content-types.md @@ -30,13 +30,28 @@ description: "Типы содержимого - это то, что MODX буд Вы увидите следующие поля: -- **Имя** - Имя типа контента. Это в основном для организационных целей и маркировки и не влияет на функцию типа. +- **Имя** - Имя типа контента. Это в основном для организационных целей и маркировки и не влияет на функцию типа. - **MIME тип** - Здесь вы можете установить тип MIME для расширения, которое сообщит браузеру, какой тип файла [Ресурсы](building-sites/resources "Ресурсы"). Список доступных типов MIME можно найти [здесь](http://www.iana.org/assignments/media-types/) или [здесь](http://www.feedforall.com/mime-types.htm). - **Расширения файла** - это расширение файла вашего ресурса. Указывается с точкой, например «.docx», «.xlsx». -- **Двоичный** - двоичный тип файла или `text/ascii` ? +- **Иконка** - необязательный CSS-класс иконки в дереве ресурсов (MODX 3.0+). Примеры: `icon-css`, `icon-json`, `icon-pdf` или класс Font Awesome вроде `icon-home` / `fa-home`. Пустое значение оставляет иконку шаблона или стандартную иконку ресурса. +- **Двоичный** - двоичный тип файла или `text/ascii`? - **Описание** - необязательное поле для описания типа содержимого. -Как только вы заполнили все поля, нажмите кнопку «сохранить», и в списке типов, появится ваш новый тип содержимого. После этого его можно будет выбрать в настройках ресурса. +Как только вы заполнили все поля, нажмите кнопку «сохранить», и в списке типов появится ваш новый тип содержимого. После этого его можно будет выбрать в настройках ресурса. + +### Иконки в дереве ресурсов (MODX 3.0+) + +MODX собирает классы иконок для узла ресурса. При выборе иконки ориентируйтесь на такой порядок: + +1. **Класс иконки шаблона** (Manager Icon Class), если он задан у шаблона. +2. **Иконка типа содержимого**, если она задана у Content Type. +3. Значение по умолчанию `mgr_tree_icon_{classKey}` (например `tree-resource`), плюс иконки weblink / symlink / static resource, когда тип ресурса это требует. + +У системных типов содержимого для не-HTML MIME уже есть удобные значения (`icon-xml`, `icon-css`, `icon-js`, `icon-json`, `icon-pdf` и похожие). У HTML иконка обычно пустая, чтобы осталась обычная иконка документа или папки. + +Иконку можно править прямо в сетке типов содержимого или в окне создания/редактирования. У защищённых системных типов по-прежнему можно менять иконку и расширения файла. + +См. также [Шаблоны](building-sites/elements/templates) про поле Manager Icon Class. **Псевдоним ресурсов** Когда вы создаете ресурс с нужным типом содержимого, к его алиасу будет добавляться расширение файла этого типа содержимого. Например, создал ресурс с типом содержимого `JSON` и алиасом `example`, на выходе вы получите алиас `example.json` (если у вас включены дружественные URL). diff --git a/ru/building-sites/settings/forgot_login_email.md b/ru/building-sites/settings/forgot_login_email.md index 98e80385e..b11d4a1b1 100644 --- a/ru/building-sites/settings/forgot_login_email.md +++ b/ru/building-sites/settings/forgot_login_email.md @@ -3,36 +3,39 @@ title: "forgot_login_email" translation: "building-sites/settings/forgot_login_email" --- -## forgot_login_email +## Письмо сброса пароля (MODX 3) -- **Имя**: Письмо восстановления пароля -- **Тип**: textarea -- **По умолчанию**: (see below) -- **Доступно в**: Revolution 2.0.0+ +В MODX 3 поток «забыли пароль» в менеджере больше не отправляет временный пароль по почте. Пользователь получает одноразовую ссылку сброса, открывает экран входа и задаёт новый пароль. [#13786](https://github.com/modxcms/revolution/pull/13786) -Шаблон для электронного письма, которое отправляется, когда пользователь забыл свое имя пользователя и/или пароль MODX. +Текст письма берётся из лексикона `login_forgot_email` (namespace `core`, topic `login`), а не из системной настройки. Правьте ключ в System → Lexicon Management или переопределите в своём лексиконе. -По умолчанию это: +Русский текст по умолчанию: ```html -<p>Hello [[+username]],</p> -<p> - A request for a password reset has been issued for your MODX user. If you - sent this, you may follow this link and use this password to login. If you - did not send this request, please ignore this email. -</p> - -<p> - <strong>Activation Link:</strong> - [[+url_scheme]][[+http_host]][[+manager_url]]?modahsh=[[+hash]]<br /> - <strong>Username:</strong> [[+username]]<br /> - <strong>Password:</strong> [[+password]]<br /> -</p> - -<p> - After you log into the MODX Manager, you can change your password again, if - you wish. -</p> - -<p>Regards,<br />Site Administrator</p> +<h2>Забыли пароль?</h2> +<p>Мы получили запрос на изменение пароля вашего аккаунта. Вы можете сбросить пароль, нажав кнопку ниже и следуя инструкциям на экране.</p> +<p class="center"><a href="[[+url_scheme]][[+http_host]][[+manager_url]]?modhash=[[+hash]]" class="btn">Сбросить пароль</a></p> +<p class="small">Если вы не отправляли такого запроса, просто проигнорируйте это письмо.</p> ``` + +### Плейсхолдеры + +| Плейсхолдер | Назначение | +| --- | --- | +| `[[+hash]]` | Одноразовый hash активации (в URL сброса как `modhash`) | +| `[[+url_scheme]]`, `[[+http_host]]`, `[[+manager_url]]` | Абсолютный URL менеджера | +| `[[+username]]` и другие поля пользователя | Доступны при разборе сообщения | +| Плейсхолдеры из конфига | Подмешиваются из `$modx->config` перед parse | + +Не вставляйте `[[+password]]`. В MODX 3 пароль в этом письме не генерируется и не отправляется. + +### Поток сброса + +1. Пользователь запрашивает сброс на экране входа (`allow_manager_login_forgot_password` должен быть включён). +2. MODX сохраняет hash и шлёт лексиконное письмо со ссылкой `?modhash=[[+hash]]`. +3. Переход по ссылке открывает вход в режиме смены пароля. +4. Пользователь вводит и подтверждает новый пароль. + +### Устаревшая настройка `forgot_login_email` + +В Revolution 2.x шаблон лежал в системной настройке `forgot_login_email`. В MODX 3 настройка удалена. Если после апгрейда в БД ещё есть кастомное значение, перенесите HTML в лексикон `login_forgot_email` и уберите строку с `[[+password]]`. diff --git a/ru/building-sites/tag-syntax/index.md b/ru/building-sites/tag-syntax/index.md index 91b4c23aa..7d180b16e 100644 --- a/ru/building-sites/tag-syntax/index.md +++ b/ru/building-sites/tag-syntax/index.md @@ -59,6 +59,20 @@ MODX предоставляет удобный массив тегов, разл ]] ``` +## Одинарные квадратные скобки внутри тегов + +В MODX 3 внутри значений свойств тега (например в output filter) можно оставлять литеральные `[` и `]`, не ломая сбор тегов. [#13904](https://github.com/modxcms/revolution/pull/13904) + +```php +[[+label:notempty=`[required]`]] +``` + +Сами теги по-прежнему пишутся в двойных скобках: `[[ ... ]]`. + +## Значения-массивы в свойствах элементов (extras / кастомные парсеры) + +Если сниппет, чанк или другой элемент получает свойства-**массивы** (часто через PHP API, а не строку тега), MODX строит стабильную cache/tag-подпись через serialize этих массивов. Кастомные парсеры и подклассы элементов, которые сами собирают подпись тега, должны обрабатывать array-свойства так же, чтобы ключи кеша оставались сортируемыми и согласованными. [#14689](https://github.com/modxcms/revolution/pull/14689) + ## Свойства Все теги MODX могут принимать [свойства](building-sites/properties-and-property-sets), не только Сниппеты. diff --git a/ru/building-sites/tag-syntax/output-filters/index.md b/ru/building-sites/tag-syntax/output-filters/index.md index 8f0a18a22..47cba3410 100644 --- a/ru/building-sites/tag-syntax/output-filters/index.md +++ b/ru/building-sites/tag-syntax/output-filters/index.md @@ -123,6 +123,30 @@ translation: "building-sites/tag-syntax/output-filters" | urldecode | Преобразует входные данные из строки, удобной для URL, аналогично PHP [urldecode](http://www.php.net/manual/en/function.urldecode.php) | `[[+myparam:urldecode]]` | | filterPathSegment | Добавлено в 2.7. Преобразует ввод в удобную для URL строку с тем же механизмом, который превращает заголовок страницы в псевдоним, включая транслитерацию, если она включена. Полезно для пользовательских URL. | `[[+pagetitle:filterPathSegment]]` | +### Модификаторы пути к файлу + +Добавлены в MODX 3.0. Это обёртки над PHP [`pathinfo()`](https://www.php.net/manual/en/function.pathinfo.php). Они не проверяют, существует ли путь на диске. Параметры после модификатора игнорируются. + +| Модификатор | Описание | Пример | +| ----------- | -------- | ------ | +| dirname | Каталог без имени файла | `[[+filepath:dirname]]` → `/assets/images` для `/assets/images/logo.jpg` | +| basename | Имя файла с расширением | `[[+filepath:basename]]` → `logo.jpg` | +| filename | Имя файла без последнего расширения | `[[+filepath:filename]]` → `logo` | +| extension | Только последнее расширение (единственное число; не `extensions`) | `[[+filepath:extension]]` → `jpg` | + +Полезные краевые случаи: + +- `test.inc.php` → filename `test.inc`, extension `php` +- `file.tar.gz` → filename `file.tar`, extension `gz` +- `.htaccess` → пустой filename, extension `htaccess` +- Путь без расширения даёт пустую строку extension + +```php +[[*myImageTV:basename]] +[[*myImageTV:dirname]]/thumbs/[[*myImageTV:filename]].webp +[[+file:extension:lcase:is=`pdf`:then=`PDF`:else=`Other`]] +``` + ### Кэширование Как правило, любой контент в заполнителе, который, по вашему мнению, **может изменяться динамически**, должен быть кэширован. Например: diff --git a/ru/extending-modx/custom-manager-pages/modext/modext-modx-object.md b/ru/extending-modx/custom-manager-pages/modext/modext-modx-object.md index 9ff732e76..7a9558d3a 100644 --- a/ru/extending-modx/custom-manager-pages/modext/modext-modx-object.md +++ b/ru/extending-modx/custom-manager-pages/modext/modext-modx-object.md @@ -75,28 +75,21 @@ var userId = MODx.user.id; ### MODx.perm -Будет содержать следующие разрешения, если они будут предоставлены пользователю (они не будут существовать, если у пользователя нет разрешения): - -| Название | Описание | -| -------------------------- | ----------------------------------- | -| MODx.perm.resource_tree | Для просмотра дерева ресурсов. | -| MODx.perm.element_tree | Для просмотра дерева элементов. | -| MODx.perm.file_tree | Для просмотра дерева файлов. | -| MODx.perm.file_upload | Загружать файлы. | -| MODx.perm.file_manager | Использовать файловый браузер MODX. | -| MODx.perm.new_chunk | Создать новый чанк. | -| MODx.perm.new_plugin | Создать новый плагин. | -| MODx.perm.new_snippet | Создать новый сниппет. | -| MODx.perm.new_template | Создать новый шаблон. | -| MODx.perm.new_tv | Создать новую переменную шаблона. | -| MODx.perm.directory_create | Создать каталог в файловой системе. | +`MODx.perm` — карта **всех** имён manager-разрешений на boolean для текущего пользователя. Config JS читает distinct-строки `modAccessPermission` и заполняет ключи через `hasPermission()`. Фиксированного subset нет. [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425) + +Проверяйте любой ключ, который нужен Extra или CMP: ```javascript if (MODx.perm.file_upload) { /* ...код... */ } +if (MODx.perm.view_document) { + /* ... */ +} ``` +Частые ключи по-прежнему включают `resource_tree`, `element_tree`, `file_tree`, `file_upload`, `file_manager`, `new_chunk`, `new_plugin`, `new_snippet`, `new_template`, `new_tv` и `directory_create`. Отсутствующий ключ означает, что разрешения нет (считайте falsy). + ## Пользовательские методы Объект MODx также имеет довольно много пользовательских методов: diff --git a/ru/extending-modx/custom-manager-pages/modext/modx.grid.grid.md b/ru/extending-modx/custom-manager-pages/modext/modx.grid.grid.md index 8927c8a7b..1fe8ee1c8 100644 --- a/ru/extending-modx/custom-manager-pages/modext/modx.grid.grid.md +++ b/ru/extending-modx/custom-manager-pages/modext/modx.grid.grid.md @@ -84,9 +84,60 @@ MODx.grid.Grid добавляет несколько уникальных пар | preventSaveRefresh | Если автосохранение имеет значение true, после сохранения будет препятствовать обновлению сетки. Используется для более плавного редактирования. | 1 | | primaryKey | Если у ваших элементов сетки есть первичный ключ, который не является идентификатором, установите его здесь. | id | | storeId | Пользовательский идентификатор для предоставления хранилища в данной сетке. По умолчанию будет использоваться уникальный Ext ID. | Ext.id() | +| showActionsColumn | Если true, добавляет колонку действий (`modx-actions`) с иконками. Добавлено в MODX 3.0. | true | +| actionsColumnWidth | Ширина колонки действий. Авто: `50` для пиксельных колонок, `0.1` если все ширины ≤ 1. | auto | +| disableContextMenuAction | Если true, убирает шестерёнку контекстного меню и соответствующий путь меню действий. | false | Полный список всех параметров, не перечисленных здесь, см. в документации [ExtJS](http://sencha.com). +## Колонка действий (MODX 3.0+) + +`MODx.grid.Grid` и `MODx.grid.LocalGrid` используют общий `MODx.grid.GridBase`. При `showActionsColumn: true` MODX добавляет фиксированную колонку, renderer которой вызывает `getActions()`. + +Переопределите `getActions`, чтобы вернуть дополнительные кнопки-иконки. У каждого элемента нужны `action`, `icon` и `text`. Клик ищет на сетке метод с именем `action` (или Capitalized `action`). + +```javascript +getActions: function(value, metaData, record, rowIndex, colIndex, store) { + return [{ + action: 'removeElement', + icon: 'trash-o', + text: _('delete') + }]; +} +``` + +Если `disableContextMenuAction` не true, MODX также добавляет шестерёнку, которая открывает то же меню, что и правый клик (`getMenu` / данные `menu` процессора). + +Отключить колонку целиком: + +```javascript +Ext.applyIf(config, { + showActionsColumn: false +}); +``` + +## Подсветка редактируемых колонок (MODX 3.0+) + +Колонки с `editor` автоматически получают CSS-класс `x-editable-column` через `renderEditableColumn`. Тема менеджера показывает подсказку при наведении (иконка карандаша). Отдельного флага нет: задайте `editor`, если ячейка редактируется inline. + +## Ссылки в колонках (MODX 3.0+) + +В renderer используйте `renderLink(content, attributes, isSimulated, isSimulatedTag)`, чтобы обернуть значение в `<a class="x-grid-link">` (или имитацию ссылки через span). + +```javascript +renderer: { + fn: function(value, metaData, record) { + return this.renderLink(value, { + href: '?a=context/update&key=' + record.data.key, + title: _('edit') + }); + }, + scope: this +} +``` + +Смежный helper: `getLinkTemplate(controllerPath, displayValueIndex, options)` для колонок `xtype: 'templatecolumn'`. + ## Пользовательские события MODx.grid.Grid добавляет несколько дополнительных событий, не найденных в объектах Ext.grid.Grid: diff --git a/ru/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md b/ru/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md index b3b2c9a8f..42769f16a 100644 --- a/ru/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md +++ b/ru/extending-modx/custom-manager-pages/modext/modx.grid.localgrid.md @@ -11,7 +11,9 @@ translation: "extending-modx/custom-manager-pages/modext/modx.grid.localgrid" Класс MODExt LocalGrid аналогичен классу [MODx.grid.Grid](extending-modx/custom-manager-pages/modext/modx.grid.grid "MODx.grid.Grid"), однако вместо того, чтобы использовать коннектор для заполнения его данными, он должен быть загружен через локальное хранилище. -При создании этого экземпляра в интерфейсе с вкладками рекомендуется установить в своей конфигурации protectRender: true, чтобы предотвратить проблемы с отображением JS. +LocalGrid наследует те же defaults GridBase, что и удалённые сетки: `showActionsColumn`, `getActions()`, подсветку editable-колонок и `renderLink()`. + +При создании этого экземпляра в интерфейсе с вкладками рекомендуется установить в своей конфигурации preventRender: true, чтобы предотвратить проблемы с отображением JS. ## Смотрите также diff --git a/ru/extending-modx/developing-restful-api.md b/ru/extending-modx/developing-restful-api.md index 792d1835a..2f1a8c836 100644 --- a/ru/extending-modx/developing-restful-api.md +++ b/ru/extending-modx/developing-restful-api.md @@ -333,6 +333,8 @@ public function verifyAuthentication() По умолчанию JSON. XML запрашивайте суффиксом `.xml` (`/rest/items.xml`) или через `defaultResponseFormat => 'xml'`. +При разборе входящего XML пустой XML-элемент в PHP-массиве становится пустой строкой (`''`), а не пустым массивом. [#14305](https://github.com/modxcms/revolution/pull/14305) Контроллеры с `empty()` или строгой проверкой `=== ''` ведут себя так же, как при JSON с `""`. + Тела success/failure используют ключи из конфига сервиса (`success`, `message`, `object`, плюс `errors` при ошибках полей). Списки используют `results` и `total`. HTTP-статус по умолчанию для успеха и ошибки: `200`. Передайте третий аргумент в `success()` / `failure()` или смените `defaultSuccessStatusCode` / `defaultFailureStatusCode`, если нужны коды вроде 201 или 404. diff --git a/ru/extending-modx/transport-packages/build-script.md b/ru/extending-modx/transport-packages/build-script.md index 61a8380a7..54262a37a 100644 --- a/ru/extending-modx/transport-packages/build-script.md +++ b/ru/extending-modx/transport-packages/build-script.md @@ -437,8 +437,11 @@ $builder->putVehicle($vehicle); Каждый пакет имеет так называемые "атрибуты пакета", которые можно передать любому Резольверу или Валидатору. Вы можете передать почти все, что хотите, в функцию `modPackageBuilder::setPackageAttributes()` в формате массива. Однако есть три специальных ключа, с которыми мы будем иметь дело. - **license** (string) - Это ваше лицензионное соглашение. Если MODX обнаружит во время установки, что этот файл не пуст, он предложит пользователю согласиться с этим, прежде чем он сможет продолжить установку пакета. -- **readme** (string) - Это содержит файл `readme`. Перед установкой, если файл не пуст, пользователь сможет просмотреть файл. Это может быть полезно, чтобы убедиться, что люди видят какие-либо требования перед установкой. -- **setup-options** (string) - И вот что самое интересное - это может быть HTML-форма (без тегов `form`), которая будет передавать любые введенные пользователем параметры в Резольверы или Валидаторы. Это означает, что вы можете принимать вводимые пользователем данные перед установкой и обрабатывать их во время установки! +- **readme** (string) - Это содержит файл `readme`. Перед установкой, если файл не пуст, пользователь сможет просмотреть файл. Это может быть полезно, чтобы убедиться, что люди видят какие-либо требования перед установкой. +- **changelog** (string) - Необязательные заметки о релизе в атрибутах пакета. +- **setup-options** (string) - И вот что самое интересное - это может быть HTML-форма (без тегов `form`), которая будет передавать любые введенные пользователем параметры в Резольверы или Валидаторы. Это означает, что вы можете принимать вводимые пользователем данные перед установкой и обрабатывать их во время установки! + +**Markdown в атрибутах пакета (MODX 3+):** при показе `license`, `readme` или `changelog` установщик рендерит строки как Markdown (Parsedown, safe mode). [#13853](https://github.com/modxcms/revolution/pull/13853) Можно оставить plain text, но заголовки, списки и ссылки Markdown работают без отдельного HTML-файла для этих трёх ключей. Итак, давайте использовать их в нашем скрипте сборки: diff --git a/ru/getting-started/upgrading-to-3.0/breaking-changes.md b/ru/getting-started/upgrading-to-3.0/breaking-changes.md index db88866f6..afec07dd3 100644 --- a/ru/getting-started/upgrading-to-3.0/breaking-changes.md +++ b/ru/getting-started/upgrading-to-3.0/breaking-changes.md @@ -21,8 +21,24 @@ translation: "getting-started/upgrading-to-3.0/breaking-changes" ## Очистка устаревшего функционала -- Поле `modResource->contentType` удалено. В Revolution 2.0 его заменило поле `content_type`, которое ссылается на экземпляр `modContentType`. [#14057](https://github.com/modxcms/revolution/pull/14057) -- `modParser095`, `modTranslate095` и `modTranslator` удалены. Это утилиты для переноса шаблонов из синтаксиса Evolution. [#14133](https://github.com/modxcms/revolution/pull/14133) +- Поле `modResource->contentType` удалено. Используйте целочисленное поле `content_type` (FK на `modContentType`). [#14057](https://github.com/modxcms/revolution/pull/14057) + + Было (в 3.0 не работает): + + ```php + $mime = $resource->get('contentType'); // поле удалено + ``` + + Стало: + + ```php + $contentTypeId = $resource->get('content_type'); + $contentType = $resource->getOne('ContentType'); // или $modx->getObject(modContentType::class, $contentTypeId) + $mime = $contentType ? $contentType->get('mime_type') : ''; + ``` + +- `modParser095`, `modTranslate095` и `modTranslator` удалены. Они только помогали переносить синтаксис тегов Evolution (0.9.x) в Revolution. Для миграции Evo→Revo их больше не вызывайте: конвертируйте шаблоны в обычные теги `[[...]]` вручную или своим инструментом и используйте стандартный `modParser`. [#14133](https://github.com/modxcms/revolution/pull/14133) +- Flash-based copy-to-clipboard в ExtJS удалён. Копирование в менеджере идёт через clipboard API браузера. [#13697](https://github.com/modxcms/revolution/pull/13697) - Каталог `/manager/min/` удалён. Не использовался с 2.5. [#12778](https://github.com/modxcms/revolution/pull/12778), [#13194](https://github.com/modxcms/revolution/pull/13194), [#14416](https://github.com/modxcms/revolution/pull/14416) - Удалены неиспользуемые сетки ExtJS: assets/modext/widgets/resource/modx.grid.resource.security.js, assets/modext/widgets/security/modx.grid.role.user.js, assets/modext/workspace/lexicon/language.grid.js, assets/modext/workspace/lexicon/lexicon.topic.grid.js [#14895](https://github.com/modxcms/revolution/pull/14895) - Привязка `@EVAL` удалена у TV [#13865](https://github.com/modxcms/revolution/pull/13865) diff --git a/ru/getting-started/upgrading-to-3.0/class-names.md b/ru/getting-started/upgrading-to-3.0/class-names.md index c44aed059..fafc88416 100644 --- a/ru/getting-started/upgrading-to-3.0/class-names.md +++ b/ru/getting-started/upgrading-to-3.0/class-names.md @@ -91,6 +91,8 @@ translation: "getting-started/upgrading-to-3.0/class-names" - All classes and functions related to the `xmlrpc` and `jsonrpc` services/utilities: `modXMLRPCResponse`, `modJSONRPCResponse`, `modXMLRPCResource` (+ platform classes), `modJSONRPCResource` (+ platform classes) - `modManagerControllerDeprecated` +Flash-хелперы copy-to-clipboard из ExtJS удалены вместе с Flash [#13697](https://github.com/modxcms/revolution/pull/13697). Используйте clipboard API браузера. + ## Изменения подписи - `modResponse::_construct` (и унаследовал `modManagerResponse`/`modConnectorResponse`) теперь помечен как «открытый» и больше не содержит амперсанд, поскольку объекты всегда передаются по ссылке. diff --git a/ru/getting-started/upgrading-to-3.0/index.md b/ru/getting-started/upgrading-to-3.0/index.md index 31102d31d..29074ce78 100644 --- a/ru/getting-started/upgrading-to-3.0/index.md +++ b/ru/getting-started/upgrading-to-3.0/index.md @@ -29,20 +29,30 @@ translation: "getting-started/upgrading-to-3.0" - Переработан установщик [#14507](https://github.com/modxcms/revolution/pull/14507) и вход в менеджер [#13773](https://github.com/modxcms/revolution/pull/13773). - Менеджер переработан. Улучшена работа на мобильных [#14700](https://github.com/modxcms/revolution/pull/14700), [#14735](https://github.com/modxcms/revolution/pull/14735). Изменены стили ресурсов в дереве [#14832](https://github.com/modxcms/revolution/pull/14832) - Язык можно переключать на лету [#14046](https://github.com/modxcms/revolution/pull/14046) -- Все разрешения менеджера автоматически доступны в `MODx.perm` [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425) +- Все разрешения менеджера автоматически доступны в `MODx.perm` [#13924](https://github.com/modxcms/revolution/pull/13924), [#14425](https://github.com/modxcms/revolution/pull/14425). См. [Объект MODx](extending-modx/custom-manager-pages/modext/modext-modx-object). - Перевод Google отключён в менеджере [#14414](https://github.com/modxcms/revolution/pull/14414) - Более последовательное дублирование ресурсов и элементов [#14411](https://github.com/modxcms/revolution/pull/14411) ### Пакеты -- Markdown теперь разбирается в атрибутах пакета (changelog, readme, license) [#13853](https://github.com/modxcms/revolution/pull/13853) +- Markdown теперь разбирается в атрибутах пакета (changelog, readme, license) [#13853](https://github.com/modxcms/revolution/pull/13853). См. [Создание скрипта сборки](extending-modx/transport-packages/build-script). ### Файлы и медиа -- Медиаисточники теперь используют Flysystem [#13709](https://github.com/modxcms/revolution/pull/13709) -- Каталоги ядра защищены от переименования и удаления из менеджера [#14374](https://github.com/modxcms/revolution/pull/14374) +- Медиаисточники теперь используют Flysystem [#13709](https://github.com/modxcms/revolution/pull/13709). См. [Файловая система](building-sites/media-sources/types/media-source-type-file-system) и [S3](building-sites/media-sources/types/media-source-type-s3). +- Каталоги ядра защищены от переименования и удаления из менеджера [#14374](https://github.com/modxcms/revolution/pull/14374). См. [источник File System](building-sites/media-sources/types/media-source-type-file-system). ### Ресурсы и шаблоны -- Ресурсы могут получить иконку по типу контента [#14383](https://github.com/modxcms/revolution/pull/14383) -- Новые модификаторы вывода для файлов: `dirname`, `basename`, `filename`, `extensions` [#14198](https://github.com/modxcms/revolution/pull/14198) +- Ресурсы могут получить иконку по типу контента [#14383](https://github.com/modxcms/revolution/pull/14383). См. [Типы содержимого](building-sites/resources/content-types). +- Новые модификаторы вывода для файлов: `dirname`, `basename`, `filename`, `extension` [#14198](https://github.com/modxcms/revolution/pull/14198). См. [Фильтры/модификаторы вывода](building-sites/tag-syntax/output-filters). + +### Безопасность и почта + +- Письмо «забыли пароль» использует ссылку сброса (`modhash`), а не пароль в письме [#13786](https://github.com/modxcms/revolution/pull/13786). См. [forgot_login_email](building-sites/settings/forgot_login_email). + +### Парсер и REST + +- Литеральные одинарные `[` / `]` внутри значений тегов поддерживаются [#13904](https://github.com/modxcms/revolution/pull/13904). См. [Синтаксис тегов](building-sites/tag-syntax). +- Значения-массивы в свойствах получают стабильную serialize-подпись тега [#14689](https://github.com/modxcms/revolution/pull/14689). См. [Синтаксис тегов](building-sites/tag-syntax). +- Пустые XML-элементы во входящем теле `modRestService` становятся `''` [#14305](https://github.com/modxcms/revolution/pull/14305). См. [RESTful API](extending-modx/developing-restful-api). diff --git a/ru/getting-started/upgrading-to-3.0/system-settings.md b/ru/getting-started/upgrading-to-3.0/system-settings.md index f005d2433..c929c0545 100644 --- a/ru/getting-started/upgrading-to-3.0/system-settings.md +++ b/ru/getting-started/upgrading-to-3.0/system-settings.md @@ -8,6 +8,7 @@ MODX 3.0 очистил значительное количество стары ## Удалены - `allow_tv_eval`, привязка `@EVAL` больше не поддерживается для TVs по соображениям безопасности [#13865](https://github.com/modxcms/revolution/pull/13865) +- `forgot_login_email`, письмо сброса пароля теперь из лексикона `login_forgot_email` и ссылки сброса, без пароля в письме [#13786](https://github.com/modxcms/revolution/pull/13786). См. [forgot_login_email](building-sites/settings/forgot_login_email) - `compress_js_max_files`, `manager_js_zlib_output_compression`, `manager_js_cache_file_locking`, `manager_js_cache_max_age`, `manager_js_document_root` что связано со старым динамическим менеджером JS minification [#13859](https://github.com/modxcms/revolution/pull/13859), [#14868](https://github.com/modxcms/revolution/pull/14868) - `editor_css_path` и `editor_css_selectors` был удален [#14843](https://github.com/modxcms/revolution/pull/14843). Эти настройки могут быть в [TinyMCE](https://github.com/modxcms/TinyMCE/issues/30) или других сторонних дополнениях, которые могут потребоваться для настройки недоступных настроек.) - `manager_language` [#13786](https://github.com/modxcms/revolution/pull/13786), заменено автоматическое определение языка и переключение на лету в менеджере [#14046](https://github.com/modxcms/revolution/pull/14046). [Узнайте больше о языке менеджера в 3.0](getting-started/upgrading-to-3.0/manager-language)