Did you deactivate the plugin? I don’t see it running.
Thread Starter
eddie
(@ediet)
It was active.
wp. serviceworker started working after I added the 512*512, 170*24 and retina logos in the theme settings.
I cleaned the cache, but I can’t find the manifest anywhere in the code.
Thread Starter
eddie
(@ediet)
The request to https://edieta.org/wp.serviceworker is not returning with JS code, however. It’s returning with an HTML page. So that’s wrong.
We did do some testing with translation plugins in https://github.com/GoogleChromeLabs/pwa-wp/issues/231
However, it seems that it is not compatible with Polylang.
To be honest I haven’t used Polylang really any other translation plugins myself, so I’m not sure about what is going on.
Thread Starter
eddie
(@ediet)
The request to https://edieta.org/wp.serviceworker is not returning with JS code, however. It’s returning with an HTML page. So that’s wrong.
Hmm, how can I fix this?
I use w3 total cache, but as I understand it, it does not affect this.
Thread Starter
eddie
(@ediet)
However, it seems that it is not compatible with Polylang.
To be honest I haven’t used Polylang really any other translation plugins myself, so I’m not sure about what is going on.
For compatibility with Polylang and WPML, perhaps this will be useful to you https://polylang.wordpress.com/documentation/documentation-for-developers/compatibility-with-the-wpml-api/ ?
These are API operators for both. Most of it is the same for both. You can pick up the home URL and the locale of the lang.
-
This reply was modified 4 years, 10 months ago by
eddie.
Thread Starter
eddie
(@ediet)
The request to https://edieta.org/wp.serviceworker is not returning with JS code, however. It’s returning with an HTML page. So that’s wrong.
Hmm, how can I fix this?
I use w3 total cache, but as I understand it, it does not affect this.
serviceworker is now running. But there is no manifest anywhere in the code. Как это исправить?
Thread Starter
eddie
(@ediet)
For compatibility with Polylang and WPML, perhaps this will be useful to you https://polylang.wordpress.com/documentation/documentation-for-developers/compatibility-with-the-wpml-api/ ?
These are API operators for both. Most of it is the same for both. You can pick up the home URL and the locale of the lang.
Have you looked at the operators that can be used in the manifest to get attributes start_url, lang and description?
icl_get_home_url
icl_get_languages ({$lang} can be used as placeholder for the language code (default: empty)).
Thread Starter
eddie
(@ediet)
I’m not a Polylang developer, so you may need to reach out to a developer familiar with Polylang to get it to work with PWA.
But as far as I understand, they will not be able to do anything. After all, your plugin needs to request the locale and language of the section. After all, your plugin outputs the result.
icl_get_home_url and icl_get_languages. And these operators are valid for both plugins: WPML and Polylang.
Thread Starter
eddie
(@ediet)