getkirby-v2 / panel

This is the deprecated admin panel for Kirby v2.
http://getkirby.com
Other
134 stars 70 forks source link

Error on Panel when editing a type Structure on a multilanguage setup #1123

Closed isaactopo closed 3 years ago

isaactopo commented 6 years ago

If you are on a multilanguage setup,

  1. You fill a type structure from the panel on the default language. and save.
  2. Go to another language and try to Edit some of the type structure you have added previously on the default language
  3. You get this error:

Error The item could not be found

captura de pantalla 2017-11-23 a las 18 04 54

If you save the page and then edit is all ok, but i think it colud be better to not throw this error, get the default values from the default language and let the user edit and save without an error.

sen-zo commented 6 years ago

Also: After saving the second language, you can edit it. But if you go back to the default language and save it, the editing on the second language will be broken again.

This also breaks the Builder-Plugin: https://github.com/TimOetting/kirby-builder/issues/54

maltewassermann commented 6 years ago

@bastianallgeier you can fix it by using the current language:

https://github.com/getkirby/panel/blob/9c54ef6cfe68bfa9e1c618cbf42eeaf222f1d833/app/src/panel/structure/store.php#L73

$fileDefL = $this->structure->model()->textfile(null, site()->language()->code());

saltandbits commented 6 years ago

Hey, I'm afraid I still have this error, been trying to isolate the problem and this is how I get it; when I place an empty image field after a structure field in the panel, change the language 3 or 4 times and then try to edit the structure I get the above mentioned error. Tried this on an clean install of Kirby.