Skip to content
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

Translations not working anymore #55

Open
gldrenthe89 opened this issue Nov 19, 2019 · 5 comments
Open

Translations not working anymore #55

gldrenthe89 opened this issue Nov 19, 2019 · 5 comments

Comments

@gldrenthe89
Copy link

Argument 2 passed to Spatie\NovaTranslatable\Translatable::Spatie\NovaTranslatable{closure}() must be an instance of Illuminate\Database\Eloquent\Model, instance of App\Nova\Templates\Home given

Using Spatie\NovaTranslatable.

@toonvandenbos
Copy link
Member

The error mentions a closure, which one is it ? Is it a closure in Spatie's package or one you defined ?

If it's in Spatie's package, that means they published a release that breaks compatibility with this package. I'd suggest to open an issue on their repository explaining they shouldn't type-hint model classes in fonction arguments for scenarios like these where the package isn't used on models.

@gldrenthe89
Copy link
Author

I have also tried to use the mrmonat/nova-translatable wich gives met the same error.

When i have time i will reproduce both errors from both packages en post them here.

@toonvandenbos
Copy link
Member

Both packages use spatie/laravel-translatable, the issue could come from a closure defined in that package.

@gldrenthe89
Copy link
Author

now i there is happening something really weird.

when using mrmonat/nova-translatable the field is stored in the database as expected.
But it is not readable in Nova. Also when updating it is getting messed up

"breadcrumb" : [
		"{",
		"\"",
		"d",
		"e",
		"\"",
		":",
		"\"",
		"t",
		"e",
		"s",
		"t",
		"\"",
		",",
		"\"",
		"n",
		"l",
		"\"",
		":",
		"\"",
		"t",
		"e",
		"s",
		"t",
		"\"",
		"}"
	],

@gldrenthe89
Copy link
Author

gldrenthe89 commented Dec 9, 2019

i also tried Spatie\NovaTranslatable again and that is giving a different error:
Method App\Nova\Templates\TermsPage::setTranslation does not exist.

i understand this message and it doesn;t really bother me because i wanna use the other package noted above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants