From 5138a2ca3278680d9b26d9107ce4dc4e61e0722b Mon Sep 17 00:00:00 2001 From: Alessandro Proglio Date: Wed, 2 Nov 2022 11:03:38 +0100 Subject: [PATCH 01/13] added table properties, settings, examples Added tables for field properties and settings, but not all of them are explained, I miss some knowledge of the big picture. --- docs/development/models/channel-field.md | 182 ++++++++++++++++++++--- 1 file changed, 158 insertions(+), 24 deletions(-) diff --git a/docs/development/models/channel-field.md b/docs/development/models/channel-field.md index 55a120dba..1378d1bf4 100644 --- a/docs/development/models/channel-field.md +++ b/docs/development/models/channel-field.md @@ -20,32 +20,85 @@ lang: php ## Properties ### Required - -- `site_id` -- `field_name` -- `field_label` -- `field_type` -- `field_list_items` (can be empty) -- `field_order` +| Name | Validation | Type | Description | +| ----------------------- |------------ | ---------- | ----------- | +| `site_id` | required | integer | | +| `field_name` | required, alphaDash, unique(installation wide), validateNameIsNotReserved, maxLength[32]| | | +| `field_label` | required, maxLength[50] | | | +| `field_type` | required, validateIsCompatibleWithPreviousValue, enum[checkboxes, colorpicker, date, duration, email_address , file, file_grid, fluid_field, grid, multi_select, notes, radio, range_slider, relationship, rte, select, selectable_buttons, slider, text, textarea, toggle, url] (or the name of a custom field type)| |validateIsCompatibleWithPreviousValue is used when modifying the field_type of an existing field. Please see [Fieldtype Compatibility Options](../addon-setup-php-file.md#fieldtypes) for more details. | +| `field_order` | | integer | | +| `field_list_items` | required (can be an empty string) | | The simplest of three mutual exclusive ways to populate a list of items is using a string with items separated by line breaks \n. Used with listing field types (Checkboxes, Multi Select, Radio Buttons, Select Dropdown and Selectable Buttons) when field_settings['value_label_pairs'] is not set and 'field_pre_populate' == 'n' (do not populate from channel entries)| ### Optional +| Name | Validation | Type | Description | +| ----------------------- |------------ | ---------- | ----------- | +| `field_id` | | integer | | +| `field_instructions` | | | | +| `field_pre_populate` | enum[y,n,v] | boolString | if 'y' populate a list of items from channel entries. Used in conjunction with the two properties `field_pre_channel_id` and `field_pre_field_id` | +| `field_pre_channel_id` | | integer | | +| `field_pre_field_id` | | integer | | +| `field_ta_rows` | | integer | height of a textarea field in rows | +| `field_maxl` | | integer | max length of a text input field | +| `field_required` | enum[y,n] | boolString | | +| `field_text_direction` | enum[ltr,rtl] | | | +| `field_search` | enum[y,n] | boolString | | +| `field_is_hidden` | enum[y,n] | boolString | | +| `field_fmt` | | enum[br,xhtml,none] | used only by some field types, 'br' stands for auto line break | +| `field_show_fmt` | enum[y,n] | boolString | | +| `field_content_type` | enum[all,any,image,integer,text] | | | +| `field_settings` | | base64Serialized | Specific settings depending on the field type. See the following table. | +| `legacy_field_data` | | boolString | | + +## Field settings + +The property `field_settings` consists in an array of settings that depend on the field type. Here are the most common settings for the standard field types. field settings are stored in the database column 'field_settings' as a base64 encoded string of the serialized array. + +| Field types | Setting name | Values | Description | +| ------------------- |------------ | ---------- | ----------- | +| Checkboxes, Multi Select, Radio Buttons, Select Dropdown, Selectable Buttons | `value_label_pairs` | associative array | | +| Color Picker | `allowed_colors` | enum[any,swatches] | | +| Color Picker | `colorpicker_default_color` | | hex color code, or null | +| Color Picker | `value_swatches` | array | array of hex color codes, used when `populate_swatches` is set to 'v' (value) | +| Color Picker | `manual_swatches` | | hex color codes separated by line breaks, or null, used when `populate_swatches` is set to 'm' (manual) | +| Color Picker | `populate_swatches` | enum[m,v] | 'm' manual or 'v' value | +| Duration | `units` | enum[seconds,minutes,hours] | | +| File, file_grid | `field_content_type` | enum[image,all] | | +| File, file_grid | `allowed_directories` | 'all' (or integer for upload directory id) | required | +| File | `show_existing` | enum[y,n] | When enabled, a drop down with existing files will be shown to authors. | +| File | `num_existing` | integer | Maximum number of files to show in the drop down. | +| File, Rich text editor | `field_fmt` | 'none' | | +| file_grid, grid | `grid_min_rows` | integer | default 0 | +| file_grid, grid | `grid_max_rows` | integer | | +| file_grid, grid | `allow_reorder` | enum[y,n] | | +| fluid_field | `field_channel_fields` | array | channel IDs used in the fluid field | +| Notes | `note_content` | text | default is ''| +| Notes | `field_hide_title` | bool | default is true | +| Notes | `field_hide_publish_layout_collapse`| bool | default is true | +| Range slider, value slider | `field_min_value` | integer | default to 0 | +| Range slider, value slider | `field_max_value` | integer | default to 100| +| Range slider, value slider | `field_step` | integer | default to 1 | +| Range slider, value slider | `field_prefix`,`field_suffix` | | | +| Range slider, value slider, Text input | `field_content_type` | enum[all,number,integer,decimal] | | +| relationship | `channels` | array | channel IDs | +| relationship | `expired`, `future` | | Allow expired or future entries in this relationships field | +| relationship | `categories`, `authors`, `statuses`| array | limit the entries by categories, authors or statuses IDs | +| relationship | `limit` | integer | Sets the number of entries displayed in the field's dropdown | +| relationship | `order_field`, `order_dir` | enum[title,entry_date] , enum[asc,desc] | Default ordering of entries | +| relationship | `display_entry_id` | enum[y,n] | | +| relationship | `allow_multiple` | enum[y,n] | | +| Rich text editor | `toolset_id` | integer | see Rich Text Editor addon for details, for a standard installation: 1 CKEditor Basic, 2 CKEditor Full, 3 Redactor Basic, 4 Redactor Full | +| Rich text editor | `defer` | enum[y,n] | Defer Editor initialization | +| Rich text editor, Textarea | `db_column_type` | enum[text,mediumtext]| Column type in database: TEXT(64Kb) MEDIUMTEXT(16Mb) | +| Rich text editor | `field_wide` | bool | default true, full width | +| Rich text editor | `field_show_fmt` | enum[y,n] | default 'n' | +| Text input | `field_maxl` | integer | Maximum characters | +| Text input, Textarea | `field_show_smileys` | enum[y,n] | | +| Text input, Textarea | `field_show_file_selector` | enum[y,n] | | +| Textarea | `field_show_formatting_btns` | enum[y,n] | | +| Toggle | `field_default_value` | enum[0,1] | | +| URL | `allowed_url_schemes` | array | example ['http://','https://'] | +| URL | `url_scheme_placeholder` | | example 'http://' | -- `field_id` Key -- `field_instructions` -- `field_pre_populate` -- `field_pre_channel_id` -- `field_pre_field_id` -- `field_ta_rows` -- `field_maxl` -- `field_required` -- `field_text_direction` -- `field_search` -- `field_is_hidden` -- `field_fmt` -- `field_show_fmt` -- `field_content_type` -- `field_settings` -- `legacy_field_data` ## Relationships @@ -60,7 +113,7 @@ lang: php - `getContentType` - `getSettingsValues` - `getAllChannels` -- `validateNameIsNotReserved` +- `validateNameIsNotReserved` the list of reserved words is in /ee/legacy/libraries/Cp.php: invalid_custom_field_names() - `validateIsCompatibleWithPreviousValue` ## Events @@ -164,3 +217,84 @@ if ($result->isValid()) $field->save(); } ``` + +### Populate a field compatible with list field types + +For fields like Checkboxes, Multi Select, Radio Buttons, Select Dropdown and Selectable Buttons there are three ways to populate their options: value-labels pairs, manually or from other channel. + +```php +// populate manually +$field->setProperty('field_list_items', "first\nsecond\nthird"); +// Validate and Save. +``` +```php +// populate with value-labels pairs +$checkboxes_settings = array( + 'value_label_pairs' => array('winner' => 'first', 'player' => 'second', 'loser' => 'third') + ); +// change field settings +$changing_settings = $field->getSettingsValues()['field_settings']; +foreach ($checkboxes_settings as $s => $s_value) { + $changing_settings[$s] = $s_value; + } +$field->setProperty('field_settings', $changing_settings); +// Validate and Save. +``` +```php +// or populate from other channel field +$field->setProperty('field_pre_populate','y'); // default is 'n' +$field->setProperty('field_pre_channel_id',4); //channel id +$field->setProperty('field_pre_field_id',80); // field id +// Validate and Save. +``` + +### Create a relationship field + +```php +//Relationships with channel #4 + +//all properties are required +$relata_properties = array( + 'field_label' => 'relata', + 'field_name' => 'relata', + 'field_type' => 'relationship', + 'field_list_items' => '' +); + +//all settings are optional +$relata_settings = array( + 'channels' => array(4), // if missing relates to all channels + 'expired' => true, // if missing defaults to false + 'future' => true, // if missing defaults to false + 'categories' => array(), // if missing or empty allows relationships with all categories + 'authors' => array(), // if missing or empty allows relationships with all authors + 'statuses' => array('open'), // if missing or empty allows relationships with all statuses + 'order_field' => 'entry_date', // default is by title + 'order_dir' => 'desc', // default is ascending + 'display_entry_id' => null, //default is false + 'allow_multiple' => true, // default is true + 'rel_min' => 0, //Minimum number of related entries + 'rel_max' => null // Maximum number of related entries +); + +$field = ee('Model')->make('ChannelField'); + +$site_id = ee()->config->item('site_id'); +$field->site_id = $site_id; +// field_order: increment the last field order number of fields belonging to this site +$ordernumber = 1 + ee('Model')->get('ChannelField')->filter('site_id',$site_id)->order('field_order', 'DESC')->first()->field_order; +$field->field_order = $ordernumber; + +// field settings +$changing_settings = $field->getSettingsValues()['field_settings']; +foreach ($relata_settings as $s => $s_value) { + $changing_settings[$s] = $s_value; +} +$field->setProperty('field_settings', $changing_settings); + +// field properties +foreach ($relata_properties as $p => $p_val) { + $field->setProperty($p, $p_val); +} +// Validate and Save. +``` From 60b82cb25f700170a0a05a52539a5e96bf7fa29f Mon Sep 17 00:00:00 2001 From: River Kelly Date: Mon, 5 Dec 2022 12:22:26 -0700 Subject: [PATCH 02/13] Add missing comma --- docs/development/services/model/building-your-own.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/services/model/building-your-own.md b/docs/development/services/model/building-your-own.md index 1fa1cc0ab..930b0b9b5 100755 --- a/docs/development/services/model/building-your-own.md +++ b/docs/development/services/model/building-your-own.md @@ -195,7 +195,7 @@ Validation rules are added using the same format as the [Validation Service](dev You can also create your own local validation rules. These one-off rules can be added directly to the model class by creating a public method whose name starts with `validate`. The method will be treated as a [custom validation rule](development/services/validation.md#custom-rules). On validation it will receive the property name, current value, rule parameters, and the rule object. The method should return `TRUE` on success, and an error string or language key on failure: protected static $_validation_rules = array( - 'even_number' => 'validateMultipleOf[2]' + 'even_number' => 'validateMultipleOf[2]', 'decade' => 'validateMultipleOf[10]' ); From e9025807d3f9cfa0cae30664c14ade82dbfcf41b Mon Sep 17 00:00:00 2001 From: River Kelly Date: Mon, 5 Dec 2022 12:24:37 -0700 Subject: [PATCH 03/13] Remove trailing paren ')' --- docs/development/services/model/building-your-own.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/services/model/building-your-own.md b/docs/development/services/model/building-your-own.md index 930b0b9b5..6c6b79875 100755 --- a/docs/development/services/model/building-your-own.md +++ b/docs/development/services/model/building-your-own.md @@ -126,7 +126,7 @@ NOTE: **Note:** Event names typically start with a lowercase letter, but the met ## Relationships -_In-Depth Documentation:_ [Relating Models](development/services/model/relating-models.md)) +_In-Depth Documentation:_ [Relating Models](development/services/model/relating-models.md) Models can be related to other models using just a little bit of metadata. They are defined on a `$_relationships` metadata array. The array keys should be the relationship names, and their values will be a description of the relationship: From c2b5d1f089b71d47c03d135ae15d3f9976bd76ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:06:24 +0000 Subject: [PATCH 04/13] Bump qs from 6.5.2 to 6.5.3 Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index f722f27fa..1e8fcc360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6475,9 +6475,9 @@ } }, "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, "optional": true, "engines": { @@ -13784,9 +13784,9 @@ "optional": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, "optional": true }, From 5359c0810e046c8c6400ddf986256b3e1f9e80fb Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Thu, 2 Feb 2023 14:49:05 +0200 Subject: [PATCH 05/13] correct the text to state that signatures are only for Forums closes https://github.com/ExpressionEngine/ExpressionEngine/issues/1266 --- docs/general/system-configuration-overrides.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/general/system-configuration-overrides.md b/docs/general/system-configuration-overrides.md index c21ce9ba0..a940556f5 100755 --- a/docs/general/system-configuration-overrides.md +++ b/docs/general/system-configuration-overrides.md @@ -153,7 +153,7 @@ Example Usage: ### `allow_signatures` -Set whether member signatures are enabled. +Set whether member signatures are enabled when using Discussion Forum. | Value | Behavior | | ----- | ------------------------- | @@ -2711,7 +2711,7 @@ Example Usage: ### `sig_allow_img_hotlink` -Specify whether members can link to images hosted on other websites as their signature image. +Specify whether members can link to images hosted on other websites as their signature image for Discussion Forum. | Value | Behavior | | ----- | -------------------------------------------------------- | @@ -2724,7 +2724,7 @@ Example Usage: ### `sig_allow_img_upload` -Set whether members can upload their own signature image. +Set whether members can upload their own signature image for Discussion Forum. | Value | Behavior | | ----- | ------------------------------------------------------------------ | @@ -2737,7 +2737,7 @@ Example Usage: ### `sig_img_max_height` -Set the maximum height (in pixels) allowed for user-uploaded signature images. +Set the maximum height (in pixels) allowed for user-uploaded signature images in Discussion Forum. | Value | Description | | ------- | ---------------------- | @@ -2749,7 +2749,7 @@ Example Usage: ### `sig_img_max_kb` -Set the maximum file size (in kilobytes) allowed for user-uploaded signature images. +Set the maximum file size (in kilobytes) allowed for user-uploaded signature images in Discussion Forum. | Value | Description | | ------- | ---------------------------- | @@ -2761,7 +2761,7 @@ Example Usage: ### `sig_img_max_width` -Set the maximum width (in pixels) allowed for user-uploaded signature images. +Set the maximum width (in pixels) allowed for user-uploaded signature images in Discussion Forum. | Value | Description | | ------- | --------------------- | @@ -2797,7 +2797,7 @@ Example Usage: ### `sig_maxlength` -Set the maximum number of characters allowed in a member's signature. +Set the maximum number of characters allowed in a member's signature for Discussion Forum. | Value | Description | | ------- | ----------------------------------------------- | From 543934cedea73381003195e4b29187a93a83bb8a Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Fri, 3 Feb 2023 10:58:54 +0200 Subject: [PATCH 06/13] error logging --- docs/installation/best-practices.md | 2 +- docs/toc_sections/_best_practices_toc.yml | 4 ++- docs/troubleshooting/error-logging.md | 33 +++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 docs/troubleshooting/error-logging.md diff --git a/docs/installation/best-practices.md b/docs/installation/best-practices.md index 8441543fe..6273798a2 100755 --- a/docs/installation/best-practices.md +++ b/docs/installation/best-practices.md @@ -15,7 +15,7 @@ ExpressionEngine's system files and directories are typically safe from direct HTTP access on a properly configured server. -However, for increased security we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named public_html or referred to as simply "webroot") and that admin.php be renamed as well. This document describes the renaming process. +However, for increased security we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named `public_html` or referred to as simply "webroot") and that `admin.php` be renamed as well. This document describes the renaming process. ## Renaming the System Directory diff --git a/docs/toc_sections/_best_practices_toc.yml b/docs/toc_sections/_best_practices_toc.yml index 7de9556a1..290f1da07 100644 --- a/docs/toc_sections/_best_practices_toc.yml +++ b/docs/toc_sections/_best_practices_toc.yml @@ -44,4 +44,6 @@ - name: Simple Commerce Module href: troubleshooting/simple-commerce-module.md - name: Error Messages - href: troubleshooting/error-messages.md \ No newline at end of file + href: troubleshooting/error-messages.md + - name: Error Logging + href: troubleshooting/error-logging.md \ No newline at end of file diff --git a/docs/troubleshooting/error-logging.md b/docs/troubleshooting/error-logging.md new file mode 100644 index 000000000..4039a0e5e --- /dev/null +++ b/docs/troubleshooting/error-logging.md @@ -0,0 +1,33 @@ + + +# Error Logging + +[TOC] + +### Error Logging + +There could be situations when there is PHP error that is invisible to the user, but is preventing the code logic to be executed properly. + +To help finding those out, error logging could be enabled in ExpressionEngine. + +To enable error logging, you need to do the following: + +1. Create `logs` folder inside your `system/user` folder and make sure it's writable +2. Open `config.php` file and add following config overrides + - [`log_threshold`](general/system-configuration-overrides.md#log_threshold) (required) + - [`log_date_format`](general/system-configuration-overrides.md#log_date_format) (optional) + +Example: +``` + $config['log_date_format'] = 'Y-m-d H:i:s'; + $config['log_threshold'] = '1'; +``` + +Now, when a code issue is encountered within ExpressionEngine, error or warning message is added to the file for corresponding date inside `system/user/logs` folder. \ No newline at end of file From 9e123d7a4fcf05bf51a6408e6ce950d604a999c1 Mon Sep 17 00:00:00 2001 From: Tom Jaeger Date: Fri, 3 Feb 2023 14:46:43 -0500 Subject: [PATCH 07/13] Update error-logging.md Updating --- docs/troubleshooting/error-logging.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/troubleshooting/error-logging.md b/docs/troubleshooting/error-logging.md index 4039a0e5e..e862d8666 100644 --- a/docs/troubleshooting/error-logging.md +++ b/docs/troubleshooting/error-logging.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) + @copyright Copyright (c) 2003-2023, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -13,9 +13,9 @@ ### Error Logging -There could be situations when there is PHP error that is invisible to the user, but is preventing the code logic to be executed properly. +When debugging is disabled, there can be situations where PHP errors can cause a white screen, or there can be errors that are completley invisable to the user, but result in incorrect execution of a given page. -To help finding those out, error logging could be enabled in ExpressionEngine. +To find these errors, it's recommended to enabled logging in ExpressionEngine. To enable error logging, you need to do the following: @@ -29,5 +29,4 @@ Example: $config['log_date_format'] = 'Y-m-d H:i:s'; $config['log_threshold'] = '1'; ``` - -Now, when a code issue is encountered within ExpressionEngine, error or warning message is added to the file for corresponding date inside `system/user/logs` folder. \ No newline at end of file +After adding the two config file items above, PHP errors, warnings etc. will be added logged to a file with the corresponding date inside `system/user/logs` folder. From 2c0580fd3ecc8e5d41451febe454a017ea586db4 Mon Sep 17 00:00:00 2001 From: Tom Jaeger Date: Fri, 3 Feb 2023 15:25:03 -0500 Subject: [PATCH 08/13] small fix --- docs/development/models/channel-field.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/models/channel-field.md b/docs/development/models/channel-field.md index 1378d1bf4..b9e7ecf77 100644 --- a/docs/development/models/channel-field.md +++ b/docs/development/models/channel-field.md @@ -25,7 +25,7 @@ lang: php | `site_id` | required | integer | | | `field_name` | required, alphaDash, unique(installation wide), validateNameIsNotReserved, maxLength[32]| | | | `field_label` | required, maxLength[50] | | | -| `field_type` | required, validateIsCompatibleWithPreviousValue, enum[checkboxes, colorpicker, date, duration, email_address , file, file_grid, fluid_field, grid, multi_select, notes, radio, range_slider, relationship, rte, select, selectable_buttons, slider, text, textarea, toggle, url] (or the name of a custom field type)| |validateIsCompatibleWithPreviousValue is used when modifying the field_type of an existing field. Please see [Fieldtype Compatibility Options](../addon-setup-php-file.md#fieldtypes) for more details. | +| `field_type` | required, validateIsCompatibleWithPreviousValue, enum[checkboxes, colorpicker, date, duration, email_address , file, file_grid, fluid_field, grid, multi_select, notes, radio, range_slider, relationship, rte, select, selectable_buttons, slider, text, textarea, toggle, url] (or the name of a custom field type)| |validateIsCompatibleWithPreviousValue is used when modifying the field_type of an existing field. Please see [Fieldtype Compatibility Options](development//addon-setup-php-file.md#fieldtypes) for more details. | | `field_order` | | integer | | | `field_list_items` | required (can be an empty string) | | The simplest of three mutual exclusive ways to populate a list of items is using a string with items separated by line breaks \n. Used with listing field types (Checkboxes, Multi Select, Radio Buttons, Select Dropdown and Selectable Buttons) when field_settings['value_label_pairs'] is not set and 'field_pre_populate' == 'n' (do not populate from channel entries)| From 5f92909d99b5b60fd345b1e4cf5c35d9717078c0 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Fri, 3 Feb 2023 14:47:29 -0600 Subject: [PATCH 09/13] Update best-practices.md --- docs/installation/best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/best-practices.md b/docs/installation/best-practices.md index 6273798a2..fd67811db 100755 --- a/docs/installation/best-practices.md +++ b/docs/installation/best-practices.md @@ -15,7 +15,7 @@ ExpressionEngine's system files and directories are typically safe from direct HTTP access on a properly configured server. -However, for increased security we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named `public_html` or referred to as simply "webroot") and that `admin.php` be renamed as well. This document describes the renaming process. +However, for increased security, we recommend that the `system` folder either be renamed or moved entirely above the public web root folder (commonly named `public_html` or referred to as simply "webroot") and that `admin.php` be renamed as well. This document describes the renaming process. ## Renaming the System Directory From 376a8ac89d158c288deb1401e12afcded6aa07d7 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Fri, 3 Feb 2023 14:51:46 -0600 Subject: [PATCH 10/13] Update error-logging.md --- docs/troubleshooting/error-logging.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/troubleshooting/error-logging.md b/docs/troubleshooting/error-logging.md index e862d8666..d8da8c806 100644 --- a/docs/troubleshooting/error-logging.md +++ b/docs/troubleshooting/error-logging.md @@ -13,14 +13,14 @@ ### Error Logging -When debugging is disabled, there can be situations where PHP errors can cause a white screen, or there can be errors that are completley invisable to the user, but result in incorrect execution of a given page. +When debugging is disabled, there can be situations where PHP errors can cause a white screen, or there can be errors that are completely invisible to the user but result in incorrect execution of a given page. -To find these errors, it's recommended to enabled logging in ExpressionEngine. +To find these errors, it is recommended to enable logging in ExpressionEngine. To enable error logging, you need to do the following: -1. Create `logs` folder inside your `system/user` folder and make sure it's writable -2. Open `config.php` file and add following config overrides +1. Create a `logs` folder inside your `system/user` folder and make sure it's writable +2. Open the `config.php` file and add the following config overrides: - [`log_threshold`](general/system-configuration-overrides.md#log_threshold) (required) - [`log_date_format`](general/system-configuration-overrides.md#log_date_format) (optional) @@ -29,4 +29,4 @@ Example: $config['log_date_format'] = 'Y-m-d H:i:s'; $config['log_threshold'] = '1'; ``` -After adding the two config file items above, PHP errors, warnings etc. will be added logged to a file with the corresponding date inside `system/user/logs` folder. +After adding the two config file items above, PHP errors, warnings, etc. will be logged to a file with the corresponding date inside the `system/user/logs` folder. From 932143882799de42552dda14faef31e8690abeb7 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Mon, 6 Feb 2023 09:28:43 +0200 Subject: [PATCH 11/13] ExpressionEngine 7.2.9 --- docs/installation/changelog.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/installation/changelog.md b/docs/installation/changelog.md index 3a7fbfef1..528f5d64b 100755 --- a/docs/installation/changelog.md +++ b/docs/installation/changelog.md @@ -8,6 +8,31 @@ --> # ExpressionEngine v7 Change Log +## Version 7.2.9 +(Release: February 6, 2023) + +- **Contributors** 🙌 +
+
+ +
+
+ +**Bug Fixes** 💃🐛 +- Resolved [#2312](https://github.com/ExpressionEngine/ExpressionEngine/pull/2312) where conditional fields depending on radio button could be not loaded correctly when creating new entry +- Resolved [#2765](https://github.com/ExpressionEngine/ExpressionEngine/pull/2765) where using `ee()->table->set_data()` was not possible outside of Control Panel +- Resolved [#2356](https://github.com/ExpressionEngine/ExpressionEngine/pull/2356) where Preview button was still visible when preview turned off in channel preferences +- Resolved [#2808](https://github.com/ExpressionEngine/ExpressionEngine/pull/2808) where some servers did not accept SVG files to be uploaded into image-only directory +- Resolved [#2653](https://github.com/ExpressionEngine/ExpressionEngine/pull/2653) where Radio and Select fields were showing values and not labels in Entry Manager +- Resolved [#2784](https://github.com/ExpressionEngine/ExpressionEngine/pull/2784) where having ungrouped fields could cause group filter to malfunction in Field manager +- Resolved issue when password validation did not work properly in some cases + ## Version 7.2.8 (Release: January 30, 2023) @@ -29,9 +54,9 @@ **Bug Fixes** 💃🐛 - Resolved issue when files on non-local filesystem could not be resized or cropped from CP -- Resolved #2759 where checkbox field with the name of "statuses" did not always render correctly -- Resolved #2758 where reordering did not always work properly in third-party grids -- Resolved #2761 where Structure could show PHP warning when used with third-party forms +- Resolved [#2759](https://github.com/ExpressionEngine/ExpressionEngine/pull/2759) where checkbox field with the name of "statuses" did not always render correctly +- Resolved [#2758](https://github.com/ExpressionEngine/ExpressionEngine/pull/2758) where reordering did not always work properly in third-party grids +- Resolved [#2761](https://github.com/ExpressionEngine/ExpressionEngine/pull/2761) where Structure could show PHP warning when used with third-party forms - Resolved issue where validation error was not properly thrown when saving a Grid in a Pro Variable - Resolved issue where saving Fluid without fields could result in PHP error From 121e11628bcf3268adb338bb5955db8740d68ffc Mon Sep 17 00:00:00 2001 From: Doug Black Jr Date: Sat, 4 Feb 2023 14:27:05 -0500 Subject: [PATCH 12/13] Adding documentation for requires parameter --- docs/development/addon-setup-php-file.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/development/addon-setup-php-file.md b/docs/development/addon-setup-php-file.md index ec1f220cf..8fdb4f10b 100755 --- a/docs/development/addon-setup-php-file.md +++ b/docs/development/addon-setup-php-file.md @@ -236,5 +236,14 @@ It is also possible to set up class aliases to an arbitrary FQCN. The example be 'MyVendor\Services\ClassName' => 'AnotherVendor\Services\ClassName', ], +### `requires` + + 'requires' => [ + 'php' => '8.0', + 'ee' => '7.2.0' + ], + +If your add-on requires a particular version of ExpressionEngine, or a minimum version of PHP, adding `requires` to your addon.setup.php will check for minimum versions of the specified framework, and will stop installation if the minimum requirement is not meant. + ## Accessing Add-On Information From Another Add-on See the [Addon Service](development/services/addon.md) for API access. \ No newline at end of file From 482ee7a95848da339eca956d10404d63b0607256 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Tue, 7 Feb 2023 17:53:35 +0200 Subject: [PATCH 13/13] change release date --- docs/installation/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/changelog.md b/docs/installation/changelog.md index 528f5d64b..9a5002878 100755 --- a/docs/installation/changelog.md +++ b/docs/installation/changelog.md @@ -9,7 +9,7 @@ # ExpressionEngine v7 Change Log ## Version 7.2.9 -(Release: February 6, 2023) +(Release: February 7, 2023) - **Contributors** 🙌