plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 187 forks source link

ACE editor is not loaded for easyform #2095

Closed tomgross closed 7 years ago

tomgross commented 7 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

What I expect to happen:

What actually happened:

grafik

The ACE editor is accessible and useable for a Dexterity schema. On a migrated site it is not accessible (see #2093 )

What version of Plone/ Addons I am using:

It worked with the same setup on Plone 5.1b3.

agitator commented 7 years ago

Tested with the same site as https://github.com/plone/Products.CMFPlone/issues/2093

I also have the missing .../Plone/++resource++plone.resourceeditor/ace/ace.js

thet commented 7 years ago

I cannot reproduce the problem. I installed a fresh 5.1 site, all is working - with resource registry in dev mode and production mode. Then I re-run all upgrade steps from 5.0 to 5.1 (to maybe reproduce any upgrade issues) - still working. I also tried to use a VHM mapping, to reproduce any url-mapping problems.

@tomgross what was the Plone version from which you migrated your site?

Besides, the correct path is: ++plone++static/components/ace-builds/src/ace.js

tomgross commented 7 years ago

@thet It happens on a fresh minimalplone too. This is my buildout:

[buildout]
parts = instance
extends =
    https://dist.plone.org/release/5.1b4-pending/versions.cfg
versions = versions

[instance]
recipe = plone.recipe.zope2instance
eggs =
    Plone
    Pillow
    collective.easyform==2.0.0b1
  1. Run buildout
  2. Create a site
  3. Install easyform addon
  4. Create a form a-form-with-ace
  5. Go to http://localhost:8080/Plone/a-form-with-ace/@@fields/@@modeleditor

The same thing (editing XML) works with Plone 5.1b3, so I assume it is a Plone issue and not an easyform issue.

agitator commented 7 years ago

After a restart of the instance the ace.js is found at the correct location ++plone++static/components/ace-builds/src/ace.js

But the editor still doesn't work, also in a newly created site ... the schema content is not laoded and plone specific styles for the editor are imho missing

screen shot 2017-07-07 at 09 49 02
thet commented 7 years ago

@tomgross fixed: https://github.com/collective/collective.easyform/commit/d1495d46ee5510f4803e7d434b5ff5f373bd4f48

@agitator I can reproduce the problem with the schema editor in Dexterity control panel too. Not sure, why that happens. IMO, that's a different issue - I created one here: https://github.com/plone/Products.CMFPlone/issues/2099

tomgross commented 7 years ago

Thanks @thet for fixing. Why needs the ACE editor be loaded for easyform separately? Isn't it included in the bundle in Plone 5. collective.easyform >= 2 is for Plone 5.1 anyways.

thet commented 7 years ago

The ACE editor is loaded for easyform like it's done with the model editor in plone.app.dexterity (see: https://github.com/plone/plone.app.dexterity/blob/master/plone/app/dexterity/browser/modeleditor.pt#L66 ). The ACE editor is not part of the plone or plone-logged-in bundle. It is an dependency of the texteditor pattern, which itself is a dependency of the filemanager pattern which is bundled for the thememapper (plone.app.theming) bundle. But for the schema model editor, it's included via a script tag directly.

IMO, that's fine enough as long we do not run into any weird dependency issues.

tomgross commented 7 years ago

OK. @thet Thanks for the clarification.