-
-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Description
Expected Behavior
A user can extend a plugin's blueprints if the plugin has enabled this behavior.
Actual Behavior
After using extends@
with the expected structure, the server refuses to restart.
Specifications
Grav v1.7.49.1 + Admin v1.10.49, Windows 10 x64, PHP v8.2.29 x64
Steps to Reproduce the Problem
Repository with file differences
- Downloaded Grav v1.7.49.1 + Admin v1.10.49 and unzipped it
- Ran
php bin/grav server
using PHP v8.2.29, and created an Admin-user - Added
public $features = ['blueprints' => 10,];
inuser/plugins/markdown-notices/markdown-notices.php
per #1804 - Modified
user/plugins/markdown-notices/blueprints.yaml
to import properties:
form:
validation: strict
import@:
type: options
context: blueprints://plugins/markdown-notices
- Added
user/plugins/markdown-notices/blueprints/plugins/markdown-notices/options.yaml
with the original fields:
form:
fields:
enabled:
type: toggle
label: PLUGIN_ADMIN.PLUGIN_STATUS
highlight: 1
default: 0
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
built_in_css:
type: toggle
label: PLUGIN_MARKDOWN_NOTICES.USE_BUILT_IN_CSS
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
base_classes:
type: selectize
label: PLUGIN_MARKDOWN_NOTICES.BASE_CLASSES
size: large
placeholder: PLUGIN_MARKDOWN_NOTICES.BASE_CLASSES_PLACEHOLDER
help: PLUGIN_MARKDOWN_NOTICES.BASE_CLASSES_HELP
classes: fancy
validate:
type: string
level_classes:
type: selectize
label: PLUGIN_MARKDOWN_NOTICES.LEVEL_CLASSES
size: large
placeholder: PLUGIN_MARKDOWN_NOTICES.LEVEL_CLASSES_PLACEHOLDER
help: PLUGIN_MARKDOWN_NOTICES.LEVEL_CLASSES_HELP
classes: fancy
validate:
type: commalist
- Cleared cache with
php bin/grav clearcache
, restarted server, and forced browser refresh - Options show up as expected, and persist without error past a cleared cache
- Added
user/blueprints/markdown-notices/options.yaml
to override a property of a field by extending the base type:
extends@:
type: options
context: blueprints://plugins/markdown-notices
form:
fields:
enabled:
label: Modified label
- Verified that the label shows the changed text
- Stopped server and cleared cache
- Trying to start server again now results in a fatal error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in ...\grav-admin-blueprints-crash\vendor\rockettheme\toolbox\ResourceLocator\src\UniformResourceLocator.php on line 271
Referring to this line in RocketTheme/Toolbox
, which contains
$uri = (string)preg_replace('|\\\\|u', '/', $uri);
Metadata
Metadata
Assignees
Labels
No labels