Hi there,
thanks for this great idea ??
So, I can see the plugin installed – I can also configure it.
But then nothing happens. No service worker is loaded or activated in Chrome.
Any idea?
Thanks!
The plugin seems to work correctly and I don’t see any error in front-end, but the error_log under wp-admin contains this PHP error every few minutes:
[01-Jun-2017 16:22:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_create_nonce() in /home/user/public_html/wp-includes/functions.php:1465
Stack trace:
#0 /home/user/public_html/wp-admin/includes/file.php(1277): wp_nonce_field('filesystem-cred...', '_fs_nonce', false, true)
#1 /home/user/public_html/wp-content/plugins/offline-content/vendor/marco-c/wp_serve_file/WP_Serve_File.php(16): request_filesystem_credentials('https://user...')
#2 /home/user/public_html/wp-content/plugins/offline-content/vendor/marco-c/wp_serve_file/WP_Serve_File.php(28): Mozilla\WP_Serve_File->__construct()
#3 /home/user/public_html/wp-content/plugins/offline-content/vendor/mozilla/wp-sw-manager/WP_SW_Manager.php(76): Mozilla\WP_Serve_File::getInstance()
#4 /home/user/public_html/wp-content/plugins/offline-content/vendor/mozilla/wp-sw-manager/WP_SW_Manager.php(64): Mozilla\WP_SW_Manager->__construct()
#5 /home/user/public_html/wp-content/plugins/offline-content/class-wp-offline-content-plugin.php(31): Mozilla\WP_SW_Manager::get_mana in /home/user/public_html/wp-includes/functions.php on line 1465
]]>
Hi ,
Thanks for the nice concept.
I am getting this error when i activated this plugin .
Uncaught (in promise) TypeError: Failed to register a ServiceWorker: A bad HTTP response code (500) was received when fetching the script.
]]>Plugin could not be activated because it triggered a fatal error.
Fatal error: Uncaught Error: Class 'Mozilla\WP_SW_Manager' not found in /home/xxxxx/public_html/wp-content/plugins/offline-content/class-wp-offline-content-plugin.php:31 Stack trace: #0 /home/xxxxxxx/public_html/wp-content/plugins/offline-content/class-wp-offline-content-plugin.php(21): WP_Offline_Content_Plugin->setup_sw() #1 /home/xxxxxxx/public_html/wp-content/plugins/offline-content/class-wp-offline-content-plugin.php(10): WP_Offline_Content_Plugin->__construct() #2 /home/xxxxxx/public_html/wp-content/plugins/offline-content/wp-offline-content.php(22): WP_Offline_Content_Plugin::init() #3 /home/xxxxxx/public_html/wp-admin/includes/plugin.php(1882): include('/home/xxxxxx/...') #4 /home/xxxxxx/public_html/wp-admin/plugins.php(164): plugin_sandbox_scrape('offline-content...') #5 {main} thrown in /home/xxxxx/public_html/wp-content/plugins/offline-content/class-wp-offline-content-plugin.php on line 31
This has happened on multiple sites running WP 4.7.
]]>I couldn’t use the plug-in with OneSignal – Free Web Push Notifications
OneSignal – Free Web Push Notifications has its own service worker, before activating Offline Content Onesignal was working well.
After I activated Offline Content, it blocked Onesignal.
Is there a way to importScripts for other service workers like Onesignal?
I read your document for wp-sw-manager @ github . I’m not a developer, I did’t understand how I can use it. If this article is related to my problem above, could you please explain it a little bit more?
Thanks,
]]>This plugin is just what we have been looking for, and it works great, but I do have a small suggestion.
Is there any way to show a page for non-cached pages, I think this is important as the plugin works great for pages that have been cached, it does not for those that have not, as such users will think they are getting a poor experience upon reaching a non-cached page.
It would be great if we could show a page for those non-cached pages.
]]>