Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import form is missing a file input #419

Open
mauritsvanrees opened this issue Nov 9, 2023 · 1 comment
Open

Import form is missing a file input #419

mauritsvanrees opened this issue Nov 9, 2023 · 1 comment

Comments

@mauritsvanrees
Copy link
Member

The import form looks like this:

Screenshot 2023-11-09 at 20 34 37

It is a text input instead of a file input.
For good measure I tried a path to a locally exported file, but that failed.

The field is defined as zope.schema.Bytes. Does this need an extra widget hint? Completely different field?

Has this ever worked in a previous version? Trying with latest release and Plone 6.0.8, but also 4.1.1 and Plone 6.0.6, with same result.

@szakitibi
Copy link
Contributor

The issue is not present in Plone 6.1 - see https://classic.demo.plone.org/en/demo/a-form/@@import-easyform.

With Plone 6.0-latest version (using minimalplone6 buildout) and collective.easyform it is present. It can be trace back up to the point of FileWidget's template lookup in widget.py#L123, however it is not clear why the queryMultiAdapter returns the text_input.pt template for Plone 6.0.

The IFileWidget is based on ITextWidget, but there were no changes in the z3c.form file.zcml or text.zml in the last 18 years.

There is a more specific layer registration for the ITextWidget in plone.app.z3cform widgets.zcml, but that is present in latest version too here. As far as I see it should not affect the lookup for a more specific IFileWidget interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants