Voyager: Undefined index: en when saving post

Created on 16 May 2018  路  10Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.6
  • Voyager Version: 1.1
  • PHP Version: 7.1.17
  • Database Driver & Version: mysql 5.7

Description:

Error Exception on updating post when English language selected. Other post languages are working fine.

Steps To Reproduce:

Enable multi language and add few languages, then go to Posts section, click edit on any post, change some value and click on update post.

duplicate

Most helpful comment

Dear @emptynick, can you please explain why do you close all of the issues on account of "undefined index" and other problems with multilingual feature while none of them is solved. You only reference to one possible fix which is not helpful at all. Could you please explain this to me? Would be grateful. Thanks in advance.

All 10 comments

Dear @emptynick, can you please explain why do you close all of the issues on account of "undefined index" and other problems with multilingual feature while none of them is solved. You only reference to one possible fix which is not helpful at all. Could you please explain this to me? Would be grateful. Thanks in advance.

This particular issue is a duplicate of the issues I mentioned.
Having multiple issues about the same topic is pointless.
Imagine each issue having 5 duplicates, there would be a few thousan open issues.

The oldest issue will stay open until a bugfix is merged.
In this case it is #3089, and #3089 was automatically closed by Github when #3265 was merged.

3265 does fix the issue, but isn't released yet.

@emptynick it's not fixed yet in 2019 men.

You are the only one to say it's not working in 2019.

It's also not working for me. Working with the latest version available of Voyager (1.2) and Laravel 5.8

@emptynick
This screenshot was captured in 06.09.2019
image

How does your model look ?
My worked like this:

Capture

I also got this error if column was in INT (or other number) format.

Ok, I've found the reason why it's failing (at least in my project). Thanks to @siltais for pointing me in the right direction.

In my case, I was trying to configure a column in the database with the JSON data type and, the input type as "Code Editor" in the BREAD for the model.

It seems like, the translations can only work with text-based data types (CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, but not JSON) (on the database) and, with "text" or "textarea" as the type of input in the BREAD configuration for the translatable properties of the model.

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings