getgrav / getgrav/grav-plugin-form

Content of Taxonomy field should not be translated

Open
#534 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
64
Forks
80
Avg merge
10h 13m
Merged PRs (30d)
9

Description

Bug/Suggestion: Values for Taxonomy field should not be translated.

Why:
- Taxonomy values in page headers are taken literally and are not translated by Grav, Quark or eg. the TaxonomyList plugin.

- However, Taxonomy values are being translated by Form plugin when displayed in Admin. This has two side effects:
- When user enters any value which is a top-level **string** value in any translation file, it gets translated in Admin after saving. This might be confusing behaviour to the user.
The value in page header remains correct though when saving again.
- If value entered by user is a top-level **array** value, error "Array to string conversion" at */user/plugins/form/templates/forms/fields/select/select.html.twigL65* is being thrown in Admin

Reproduce:
- Create new page (with editor or Admin) and add taxonomy value GRAV
```
---
title: 'This is a test page'
taxonomy:
tag:
- TYPO3
- WordPress
- GRAV
---
```
- Open page in Admin
- Error is being thrown.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at user/plugins/form/templates/forms/fields/select/select.html.twig around line 65 and trace how taxonomy values are prepared for Admin forms. Reproduce with the YAML example using TYPO3, WordPress, and GRAV, then verify literal values remain unchanged and top-level array values no longer cause the reported conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.