getgrav / getgrav/grav-plugin-data-manager

bug when multiple use of item.html.twig

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
32
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Data-Manager is a great plugin for developing.!!! But it fails if used too often.

# Briefly my problem
- I have written two plugins, one customises the `type` list, called here `var-dumper`, the other customises the `type` details, called `content-edit`.
- However, when I enable `var-dumper`, which customises `type` **list**, the customised `type` **detail** for the other plugin disappears.
- Two `types` (using the terminology of **DataManager**) are involved.

# In more detail
- I have reduced the files to the bare minimum that causes the problem, so only the Admin part is in each plugin.
- I include the pared-done php files, the data-manager twig files, and two data files in the expected format for each plugin.
- When `var-dumper` is not enabled, then the file in the `data/content-edit` directory is rendered as customised.
- When `var-dumper` is enabled, the same file is rendered by **data-manager** as if it is a non-customised `*.yaml` file.

Unless I have missed something, it seems there maybe a bug in **data-manager** when multiple non-standard datatypes are defined.

[data-man-test.zip](https://github.com/getgrav/grav-plugin-data-manager/files/2216063/data-man-test.zip)

Update: If the priority on enabling the `onPluginsInitialized` is changed from 0 to 100, then this will affect which plugin over-rides which. I'm not sure which plugin comes first when both are on the same priority. But after editing `var-dumper` I had to increase its priority to 100, and then found that its items.html.twig was not being used.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.