Daandelange / k3-translations

Translations menu replacement, field and section for Kirby 3.
29 stars 0 forks source link

Kirby 4 compatibility ? #14

Open Yoh7 opened 1 year ago

Yoh7 commented 1 year ago

The plugin seems to work with kirby4 alpha-4 but i can't delete a translation :

Error in the delete pop-up : The internal $model->contentFile() method has been deprecated. You can use $model->storage()->contentFile() instead, however please note that this method is also internal and may be removed in the future.

index.php line 118 : $filePath = $page->contentFile($languageCode, true);

with this change : $filePath = $page->storage()->contentFile($languageCode, true); error in the same delete pop-up : Invalid language: 1

Thanks !

Daandelange commented 1 year ago

Hi, thanks for the report. I didn't test k4 yet but it's great news to hear that it seems to work almost correctly. :)

Regarding the error, it seems there's an API change and we'll have to find a new way to access the content object of a page object. I'll leave this open until I test k4 (not so soon) but I'll be happy to merge a PR and/or help fixing it further.

Here, the Kirby team states that the provided fallback that you tried will still be available within the whole v4 lifecycle (removed in v5).

andreasba commented 1 year ago

I cannot confirm v4 alpha-5 compatability. With this version, a new Panel UI was launched and for me the plugin breaks the language options in the panel:

image

Once I disable the replacement in the panel by config.php, it goes back to normal:

image

Also, when using the section in a blueprint, it does not visibly output anything :)

Any way I can help debug this @Daandelange ?

Daandelange commented 1 year ago

Hi, thanks for the report too.