The DT JS is loaded within the content-core slot of the template. Nothing changed here.
I fhink I am fine with 5.2.2
Tested with three projects...
I wonder it was working before. To me, it looks like a side-effect of RequireJS wanting to register it as a module. For scripts outside the RequireJS toolchain in Plone you should normally register them as "legacy bundle" - that is setting the "compile" flag of the bundle to false. Then the bundle is wrapped within a de- and re-registration of requirejs, like here: https://github.com/plone/Products.CMFPlone/blob/009f785e450430ee7b143624480aef9268491c0b/Products/CMFPlone/resources/browser/scripts.pt#L6
<script> var _old_define = define; var _old_require = require; define = undefined; require = undefined; </script> <script src="YOURSCRIPT"/> <script> define = _old_define; require = _old_require; </script>
I myself know many swearwords about this. This will change in Plone 6 by getting rid of RequireJS and simplifying the resource registry.
I am using this approach usually everywhere when I need a particular JS functionality only in one template. This worked and still works on Plone 4 and Plone 5. Except for the jQuery issue between 5.2.1 and 5.2.2...so I justed added jQuery locally here...but my issue might be related to some trickery in the theming ...but no time to hunt this down...case closed with the mentioned workaround.
Nitpicking here, but I'd like to test if I understand what's happening here.
Requirejs is not registering anything, right? It might be in this situation that the datatables js file is wrapped in AMD boilerplate, which detects the global require object and then tries to register datatables into the requirejs registry.
If you hide the require object temporarily, this cannot happen.
Exactly. I looked into the datatables source code and it is registering as a AMD module if it can find requirejs:
@zopyx is using its own version of datatables (1.0.15) in his package, not the one in Plone (1.0.16).
I am really glad to say that using Plone 5.2.2-pending and adding the following pins that I extracted diffing the versions.cfg between Zope 4.5 and Zope 4.4.4 all my test pass!
Zope = 4.5 BTrees = 4.7.2 Chameleon = 3.8.1 Products.ZCatalog = 5.1 ZODB = 5.6.0 persistent = 4.6.4 pytz = 2020.1 six = 1.15.0 zope.configuration = 4.4.0 zope.container = 4.4.0 zope.filerepresentation = 5.0.0 zope.formlib = 4.7.1 zope.interface = 5.1.0 zope.publisher = 5.2.1 zope.schema = 6.0.0 zope.site = 4.3.0 zope.tales = 5.1 zope.traversing = 4.4.1
Thanks a lot to all the people involved!
The automatic wrapping by just setting compile to false is not working as expected.
I was debuggin this this week to find out why, but so far the code is still a bit confusing and does not make sense to me in all cases.
The expectation is, that hen i register only a bundle without extra resources and set compile to False, that 1. it will not be compiled and 2. it should be wrapped to deactivated/activate requirejs. The last step is not happening. First of all, the code tells me that it can't work without an extra resource. Than when there is not resource defined for the bundle it skips the wrapping at all. But even with a resource, it want work for me. Need more digging. Maybe @thet we could have a look together on this soon.
I'm not sure if this was intended, we talked about these changes and said that it should go into Plone 6, not 5.2. As small as they are, these are features. But I'm ok if it stays, compared to the changes on the zope level, the risks are small.
plone.app.theming: 4.0.4 → 4.1.1
Insert diazo bundle without rules. [santonelli] (#176) Add custom CSS settings and view to theming control panel. Ddepends on https://github.com/plone/Products.CMFPlone/pull/3089 [MrTango] (#178)
I setup a Plone 5.2.0 and migrated it to 5.2.2 without seeing any Problems.
The custom css part of the theming control panel is working as expected.
I have had vacation, and then a few non-Plone days (Django, Flask). Now I am back and see that much has been fixed. Thanks a lot!
Many small but welcome fixes, a lot of them for translations and UI fixes. But biggest is Zope 4.5. That should fix various problems with page templates.
- We will want a Zope 4.5.1 release with more template fixes: https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
- We may need an adapter in CMFPlone for the final template fixes: https://github.com/plone/Products.CMFPlone/issues/3141#issuecomment-658207014, unless this gets done in Zope itself.
extends = https://zopefoundation.github.io/Zope/releases/4.5/versions.cfg mockup = 3.2.1 plone.app.content = 3.8.5 plone.app.contentmenu = 2.3.2 plone.app.contenttypes = 2.1.9 plone.app.layout = 3.4.4 plone.app.locales = 5.1.24 plone.app.querystring = 1.4.14 plone.app.users = 2.6.5 plone.restapi = 6.13.7 plone.staticresources = 1.3.1 plonetheme.barceloneta = 2.1.8 Products.CMFCore = 2.4.8 Products.CMFPlone = 5.2.2rc2 Products.MimetypesRegistry = 2.1.7
I have updated https://dist.plone.org/release/5.2.2-pending.
Note that the files there are cached, which is useful, except for
constraints.txt). If near the top you see an extends of Zope 4.5, then you have the correct version. Otherwise add something like
versions.cfg?yourname=1 to the url to avoid the cache.
Has anyone tried tinyMCE image captioning in 5.2.2?
I failed to do a rigorous before-and-after test on my build, and behold, when I go to TinyMCE and try to 'include caption with image' I don't see the option. And it's been months since I played with it.
If it is there, can someone screenshot it?
Our imported content is showing captions, so the resolveuid-and-caption transform is doing it's job on our system.
Update: it was my fault. I had plone.staticresources pinned at 1.2.0 in my buildout.
We (@nilshofer my intern and I) are trying to make things work on Windows again are making good progress. The branch is here:
And it has an Github Action to test if buildout runs on window, macos and linux with the different Python versions 2.7, 3.6-3.8):
@mauritsvanrees There are changes in
zope.sendmail and a change in
requirements.txt and in core.cfg (not release relevant, but probably for the Installer) I would like to get into the 5.2.2 release.
With those in, buildout works in Windows 10 in an Administrator Powershell.
At the moment we are struggling with
plone.recipe.zope2instance and its usage of
zdaemon. We may need to invoke waitress directly if we can not get it fixed.
We also already touched the Installer and merged a PR there. But maybe more work need to be done there.
[update] Draft PR here https://github.com/plone/buildout.coredev/pull/668 [/update]
zdaemon - which is not supposed to work on Windows - its completly broken. Bug Report:
To me this is is a critical problem. We now try to move around this by using
waitress directly w/o the
paste.server_factory = plone.recipe.zope2instance:main.
Any ideas how to fix
Windows 10 support update:
- branches are merged.
- a Github Action checks now if the buildout runs w/o failure on linux, ubuntu and macos.
- Plone Core Development under Windows is possible to a certain degree
- tests are failing on Windows.
To whom it concerns:
- Install Git and Python 3 using its installers.
- use a PowerShell in administrator mode.
- clone buildout.coredev 5.2 or 6.0
- cd into the buildout folder
- create virtual Python environment:
python -m venv py
- run pip:
.\py\Scripts\pip.exe -U pipand
.\py\Scripts\pip.exe -r requirements.txt
- run buildout:
- it case of
PermissionErrorsjust re-run buildout. Those are random and something Windows specific. After some runs all should be installed (usually 2-3 here) sigh
- edit the copied
zope.iniand change/ replace section
[server:main] use = egg:waitress#main host = 127.0.0.1 port = 8080
- start Plone with
.\bin\runwsgi.exe -v zope.ini
I could use some assistance to get a fix in mockup merged into plone.staticressources.
See https://github.com/plone/mockup/pull/1005 and https://github.com/plone/plone.staticresources/pull/94.
The process required to update plone.staticresources is freaking me out.
Well, if it's freaking you out, with the updated instructions from Vincent Fretin in the package, can we all please imagine how difficult it is for others to update anything in the core Plone frontend story at the moment?
(Trying to overwrite/fix something in the TinyMCE pattern today myself....)
I found a small blocker for 5.2.2 that was recently introduced: