Commit 03674992 authored by Jérome Perrin's avatar Jérome Perrin

web_renderjs_ui,officejs: don't use zope's favicon.ico

Most service worker precache scripts reference a favicon.ico, but this
is using the default favicon.ico from Zope and even though it was included
in all ERP5JS and OfficeJS web sites, this was mostly not used, only
web_renderjs_ui web pages reference favicon.ico.

There's a favicon.ico in erp5_xhtml_style skin folder, but the skin
folder is not in ERP5JS skin selection.

On Zope2, this caused ERP5JS and OfficeJS application use the default
Zope favicon. On Zope4, the service worker can not fill its cache
because of 404 errors, because since Zope commit 4f0770941 (Retired
icons from the `Zope Management Interface` and various smaller cleanups
of ZMI screens., 2011-07-02) there's no default favicon.ico anymore.

To solve this, provide a favicon.ico in ERP5JS skin selection, by
copying the one from erp5_xhtml_style. We also reference it explicitly in
web site layout properties so that it remain in the cache.

OfficeJS applications do not use favicon.ico explicitly. They use icons
in their web application manifest, but this does not seem to be use as
favicon unless the PWA is installed. This part is not addressed by this
commit.
parent 9dadb6dd
Pipeline #20262 failed with stage
in 0 seconds
url_list = [
"favicon.ico",
"font-awesome/font-awesome.css",
"URI.js",
"dygraph.js",
......
......@@ -5,7 +5,6 @@ url_list = [
'rsvp.js',
'renderjs.js',
'officejs-redirect.js',
'favicon.ico'
]
return list(set(url_list))
......@@ -309,6 +309,16 @@
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_icon_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -377,6 +387,10 @@
<none/>
</value>
</item>
<item>
<key> <string>configuration_icon_url</string> </key>
<value> <string>favicon.ico</string> </value>
</item>
<item>
<key> <string>configuration_jio_gadget_url</string> </key>
<value> <string>gadget_erp5_jio.html</string> </value>
......
......@@ -2,7 +2,6 @@ web_section = context
# Add all ERP5JS gadget
url_list = [
'favicon.ico',
'font-awesome/font-awesome-webfont.eot',
'font-awesome/font-awesome-webfont.woff',
'font-awesome/font-awesome-webfont.woff2',
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>favicon.ico</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>16</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>16</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment