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

Kirby 4 compatibility ? #14

Open
Yoh7 opened this issue Jul 18, 2023 · 3 comments
Open

Kirby 4 compatibility ? #14

Yoh7 opened this issue Jul 18, 2023 · 3 comments

Comments

@Yoh7
Copy link

Yoh7 commented Jul 18, 2023

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 !

@Yoh7 Yoh7 changed the title Kirby 4 compatibility Kirby 4 compatibility ? Jul 18, 2023
@Daandelange
Copy link
Owner

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
Copy link

andreasba commented Aug 2, 2023

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
Copy link
Owner

Hi, thanks for the report too.

  • The menu replacement :
    If you're familiar with kirbyup and Vue.js you can have a look at the panel components that have been changed. See k4/LanguagesDropdown.vue and TranslationsMenu.vue, which are injected by index.js and called by k4/Header.vue. The Vue.js dev browser extension will probably also point to broken/changed components.

  • The section blueprint :
    I'd say check the panel API response for the section content (devtools network inspector), check if the data is there. If so, the Vue component is probably broken, otherwise Kirby's PHP API changes probably prevents the component from parsing the data, check the php part.

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

3 participants