Comments (7)
I think the filter @xPhantomNL mentioned not only filters but also merges the field data to the original fields wrapped by Translatable
and thus the panel information is copied over to the original field and removed from Translatable
field.
Removing lines 192 & 193, as in below, fixes the issue. I'd create a PR but I'm not sure how to patch this without breaking backward compatibility.
class Translatable extends MergeValue
{
// ....
protected function createTranslatedField(Field $originalField, string $locale): Field
{
// ....
$translatedField
->resolveUsing(function ($value, Model $model) use ($translatedField, $locale, $originalAttribute) {
$translatedField->attribute = 'translations_'.$originalAttribute.'_'.$locale;
// $translatedField->panel = $this->panel;
// $translatedField->assignedPanel = $this->assignedPanel;
return $model->translations[$originalAttribute][$locale] ?? '';
});
from nova-translatable.
This is still a problem, I opened a PR #99
from nova-translatable.
Changes made in #77 don't seem to do the trick anymore.
from nova-translatable.
Combining a Nova field and a Translatable field into the same new Panel results in the Nova field showing in the new Panel and the Translatable field showing in the main Panel.
from nova-translatable.
Running into this issue as well, any update or a workaround?
Downgrading Nova to 4.21.0 does seem to work on my end, so whatever was done in 4.22.0 breaks this package.
After some further inspection, in Nova 4.22 they're using the ConditionallyLoadsAttributes trait, which has a filter
method (vendor/laravel/nova/src/Panel.php:125). That eventually leads to breaking the creation of new panels per locale.
from nova-translatable.
I'd accept a PR that fixes this.
from nova-translatable.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
from nova-translatable.
Related Issues (20)
- Forced Trix field attachments
- Nova Markdown field preview fails HOT 1
- Nova Repeater field
- Different rules for each translation HOT 3
- Slug field loses functionality when using Translatable
- support spatie/laravel-translatable 6 HOT 1
- Make only one locale required HOT 1
- Nova 4 support
- Nova 4 Slug field Bug HOT 1
- Field -> displayUsing does not work HOT 1
- src/Translatable.php:233 - onIndexPage() throws error when there is no controller on the action HOT 1
- PHP 8.2 : Deprecation warning on creation of dynamic properties HOT 1
- Combining translatable with images in a Trix field does not work
- Maintenance of Nova 3 support HOT 9
- Name field shows as row JSON HOT 2
- Deprecation warning for dynamic property HOT 1
- KeyValue Field HOT 1
- Problem in combination with a Slug field
- Nova Markdown File upload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-translatable.