TinyMCE icons are back in a more normal way. I noticed also a nice new feature, an advertisement for Tinymce displayed with the editor. [actually it can be disabled by setting:
in the other settings tabs of TinyMce.]
Some details for people (like me) not familiar with Plone dev on how to test Plone 5.1.1 with nice TinyMCE icons and beautiful branding without waiting for the Plone release manager to release a 5.1.1rc1 version. Warning, that's only my uninformed interpretation of what happened in my tests.
First it's necessary to get the latest updates from github. Since I am mainly interested in Tinymce for now, I got only the updates to mockup since I posted my first ramblings.
- "mockup = git https://github.com/plone/mockup.git"
And I launched buildout again. Well in fact I don't launch buildout directly, I ask ansible and it does the laundry for me.
After that I got a new directory under the src subdir with the latest commits to mockup, all confirmed by 'git log'.
Then I wanted to have these goodies in Plone in production mode.
I launched plone-compile-resources, everything worked nicely this time, I got a bunch of new js and css and compiled css and js in Products.CMFPlone/static. So far, so good.
I looked again at Plone code and convinced myself that the way to go was to enable dev mode in Resource Registry and to disable it again. In fact I got that by reading combine.py, there is a combine_bundles routine that is doing that. In fact doing the enable dev/ disable dev trick does a full 'cooking' of legacy bundle and meta-bundles rebuild, that's the true meaning of the word 'Save' in the UI.
Sort of, because it did not work. My changes were not used.
So I took another look at the beast.
[('resource_overrides', <BTreeFolder2 at /Plone/portal_resources/resource_overrides>)]
[('production', <BTreeFolder2 at /Plone/portal_resources/resource_overrides/production>), ('static', <BTreeFolder2 at /Plone/portal_resources/resource_overrides/static>)]
[('default.css', <File at /Plone/portal_resources/resource_overrides/production/default.css>), ('default.js', <File at /Plone/portal_resources/resource_overrides/production/default.js>), ('logged-in.css', <File at /Plone/portal_resources/resource_overrides/production/logged-in.css>), ('logged-in.js', <File at /Plone/portal_resources/resource_overrides/production/logged-in.js>), ('plone-logged-in-compiled.css', <File at /Plone/portal_resources/resource_overrides/production/plone-logged-in-compiled.css>), ('timestamp.txt', <File at /Plone/portal_resources/resource_overrides/production/timestamp.txt>)]
Under the 'production' resource dir can be found the 'metabundles' that are really sent to the browser. Metabundles can be in concept bundles of bundles, that are built by mere concatenation of the bundle compilation results. They don't exist anywhere on the file system. In practice the logged-in.js metabundle (the one interesting me) is built only from the plone-logged-in-compiled.js bundle
[('plone-legacy-compiled.css', <File at /Plone/portal_resources/resource_overrides/static/plone-legacy-compiled.css>), ('plone-legacy-compiled.js', <File at /Plone/portal_resources/resource_overrides/static/plone-legacy-compiled.js>), ('plone-logged-in-compiled.css', <File at /Plone/portal_resources/resource_overrides/static/plone-logged-in-compiled.css>), ('plone-logged-in-compiled.js', <File at /Plone/portal_resources/resource_overrides/static/plone-logged-in-compiled.js>)]
items under the static pseudodirectory are in fact 'personalisations' of file resources in the 'static' file system directory under Products.CMFPlone.
If they exists, they are joined to the metabundles in place of the system file bundles they represent. That was my problem; probably because at some point I had used TTW compilation, a personalisation existed and was taken in the logged-in.js metabundle instead of the plone-logged-in-compiled.js system file produced by plone-compile-resources.
The schema is as following:
plone-compile-resources -> system files (bundles) under the Products.CMFPlone/static directory
(system files OR personalisations with personalisations having priority) -> meta-bundles
meta-bundles -> browser
I had only to test my hypothesis:
Reconnected to Plone, enable/disable dev mode in resources manager -> reload browser with Ctrl F5 -> success, TinyMCE icons are back, proof that the meta-bundles were successfully rebuilt from the system files produced by plone-compile-resources.
That was that easy.