-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] Translate function doesn't work with field values anymore #5185
Comments
@tobimori if you have any quick way to double check that this isn't already broken in3.9.4, would be helpful. If not, don't worry - just won't get myself on a laptop that soon to do myself and trying to debug via GitHub on my phone 🤣 |
@distantnative I've tested on 3.9.4 and works great. |
Yep, works on the sites where this plugin is running with v3.9.4. |
Does ist work for you when removing |
That would be my current hunch - that previously the |
I can't see |
Also not working with |
@afbora https://github.com/getkirby/kirby/blob/v4/main/src/Query/Query.php#L3 - and @tobimori described that it's working with |
@distantnative Sorry, I tested on |
But
|
It doesn't seem to fix it. |
Observation: works on |
Works when removing strict mode from |
Description
I use the following code to get a translated label for a value from a site field, which worked fine in Kirby 3:
https://github.com/tobimori/kirby-seo/blob/main/blueprints/fields/og-group.yml#L35
Yet, with Kirby 4, I'm missing the output for the translated card type:
![CleanShot 2023-05-25 at 12 06 11@2x](https://private-user-images.githubusercontent.com/29142128/240878929-15bf45fb-11cb-4ed8-bf3a-1c6b31bcb10c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDMzNTksIm5iZiI6MTczOTE0MzA1OSwicGF0aCI6Ii8yOTE0MjEyOC8yNDA4Nzg5MjktMTViZjQ1ZmItMTFjYi00ZWQ4LWJmM2EtMWM2YjMxYmNiMTBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIzMTczOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkYzJkNGY5YmRjNTg4M2QwMzMzMTYwODVmOGVjNzc2MjY5YmI3ZjhiYjlhZGQxYWFhYjNlMDcwOThkZGU5OTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.koh-2oVvWfY4DCLH3HHdKIZf4LR1cT1XQMplFYLY_Co)
When removing the translation helpers, I can see that the data can be accessed correctly.
![CleanShot 2023-05-25 at 12 06 38@2x](https://private-user-images.githubusercontent.com/29142128/240879103-05b2ed83-2c9c-485e-971b-4f15163725e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDMzNTksIm5iZiI6MTczOTE0MzA1OSwicGF0aCI6Ii8yOTE0MjEyOC8yNDA4NzkxMDMtMDViMmVkODMtMmM5Yy00ODVlLTk3MWItNGYxNTE2MzcyNWU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIzMTczOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzNDEwMWIwOTNlMjkyNmIzOTFiMjM4ZDIyOTBhYmU2YzU3NTE3YWUzOTMxYzc5OWUwOGZjZjI0OWMzODAyNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nJx0OCXXYjrOiCJRR70XyeRxGpKeNzBocMO3osfyYoA)
It works correctly when appending
.value
tosite.twitterCardType
:To reproduce
Install my SEO plugin with Kirby 4.0, or test using the code snippets above.
Your setup
Kirby Version 4.0-alpha.1
The text was updated successfully, but these errors were encountered: