Image Captions from Plone 5.1


We know that in the version 5.1.x of plone the subtitles of images is not available in TinyMCE.

My team and I have set ourselves the goal of solving this problem with the intention of releasing a new version of plone 5.1.x

We do not see as a possible option to move to plone 5.2.2 which is the version that enables this functionality again.

Solutions that DIazo intervenes are discarded.

We will take this as the baseline:

We know that the solution involves 3 libraries

The first problem we see is how to do this update for static resources because in the version we have (5.1.x) this does not exist.

From there we can go forward.

Any help / suggestion is welcome.

We have to do this before this version is out of support.

Version Overview

Plone 5.1.6 (5116)
CMF 2.2.13
Zope 2.13.29

1 Like

In Plone 5.1, the content of the plone.staticresources package were in Products.CMFPlone/static. See the readme.

Note that you would need a PR for too.

cc @thet as he may know if image caption support in 5.1 is feasible, being the original author of those PRs for 5.2.

Ok, I got it on the list

I have also read this and I know that the time to do it, for version 5.1.6, is short.

I have replicated @thet's solution for Plone version 5.1.6

For this moment I have added the necessary code to enable the text box of the image caption and that it be shown in the publication.

My question now is what do I need for this to be officially released in a Plone version?

Files I have modified


@thet or someone else could you help me, what are the steps to follow to be able to put this in a new version?

Note: It is my first time in something like this


1 Like


I've already made my branches on my github based on

Cmfplone 5.16
mockup 2.7.8 2.0.28

I have a question for

How can I test the upgradeSteps, before sending the PR?

@uroboro tnx for caring about this issue!
to test an upgrade step manually:

  • install a plone site without your changes in place
  • then switch to the branches with your changes and run the upgrade step
  • see if everything is working as expected.

for an software test see this PR:

Thanks for the reply @thet
To which branch should i send the changes? @mauritsvanrees
Whereas it is a fix for Plone version 5.1.6.

Look here for which branches are used in 5.1. For it would be master, and it would need to be in the v51 folder and zcml.

1 Like

I have made these pull requests.

1 Like

@thet Can you help me, a revision is needed here.

I would really appreciate it.

The framework team voted against merging the related PRs into Plone 5.1, as there were too many possibly risky changes needed, which is not wise for a Plone release branch which is in maintenance/bugfix-only mode. Sorry if anyone, including me, gave the impression that it could maybe be included.

Going forward, if you really can't go to Plone 5.2 yet, I wonder how you could benefit from your work on 5.1 anyway. Something like this:

  • For plone.outputfilters, instead of your branch, you could use the master branch or the latest release, as Johannes suggested recently
  • You would need to allow figcaption, which you could add manually in the filter control panel.
  • In CMFPlone you would need the new IImagingSchema.image_captioning field, as you did in your PR 3099.
  • That new field would need an upgrade step to reload the IImagingSchema interface, which could be done in a registry.xml in the code of your project.
  • You did mockup changes, which you compiled into Products/CMFPlone/static/plone-logged-in-compiled.js. Those changes would be needed.

So maybe this could work for you:

  • Use plone.outputfilters 4.0.1.
  • Create an internal release of your Products.CMFPlone branch from PR 3099.
  • Create an internal release of your branch. That seems to be missing an upgrade step to reload the IImageSchema, and add the figcaption, but otherwise seems okay.

I have not tried this. But hopefully this helps you, and means your time was not wasted.

1 Like

@mauritsvanrees @uroboro
Also sorry from my side about the late canceling of this PR. I'll close it then but keep the branch for mockup alive.

Additions to @mauritsvanrees outline above:

Yes, use plone.outputfilters master branch. (Typo: was plone.staticresources before)

Regarding the CMFPlone branch - this should not be needed. A registry entry like the following should be sufficient, as plone.outputfilters doesn't query the registry by interface but just by name (See: ):

  <record name="plone.image_captioning">

For the mockup changes - you could try to install plone.staticresources in Plone 5.1. It might fail but there are chances that it works. (I'm currently testing this and will let you know).
Update: no it doesn't. plone.staticresources has conflicting configuration options with Products.CMFPlone.

If not, let your project depend on the branch of mockup you're using and provide a custom plone-logged-in bundle. I do this for another project like so:

Provide a resource directory like so:


A custom bundle resource with all the requirejs definitions you want to include:

    <value key="js"></value>
    <value key="css">

A custom plone-logged-in bundle:

  <records prefix="plone.bundles/plone-logged-in" interface="Products.CMFPlone.interfaces.IBundleRegistry">
    <value key="last_compilation">2020-06-01 20:16:00</value>
    <value key="jscompilation"></value>
    <value key="csscompilation"></value>
    <value key="develop_javascript">False</value>
    <value key="develop_css">False</value>
    <value key="merge_with">logged-in</value>
    <value key="depends">plone</value>
    <value key="resources">
    <value key="enabled">True</value>
    <value key="expression">python: member is not None</value>
    <value key="stub_js_modules">

Then you can run ./plone-compile-resources -b plone-logged-in and your bundle will be written to the directory which was defined for

Note: you have to create the files for and even if they are empty otherwise plone-compile-resources will fail.

@thet @mauritsvanrees Thanks for the reply.

I think this is a bug, because this functionality was always available until version 5.1.x. and this code could helped fix that.

And taking a look at version 5.2 it seems that there are a couple of complications with this too (TinyMCE) List of TinyMCE defects in Plone 5.2 / call for fixing issues and participation

We wanted to have this for this version available because we have third party packages that have not been migrated to python 3

I respect your decision.
And I appreciate your latest helpful comments.


Plone Foundation Code of Conduct