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

ftw.keywordwidget plone 5 not compatible with IDublinCore behavior #40

Open
tinagerber opened this issue Oct 15, 2019 · 3 comments
Open

Comments

@tinagerber
Copy link
Member

If a dexterity type has keywordwidget behavior and IDublinCore behavior, the keywordwidget doesn't work.

With keywordwidget:
Bildschirmfoto 2019-10-15 um 16 53 02

With keywordwidget and IDublinCore:
Bildschirmfoto 2019-10-15 um 16 52 33

With keywordwidget and categorization:
Bildschirmfoto 2019-10-15 um 16 55 06

@maethu maethu assigned Nachtalb and unassigned maethu Oct 29, 2019
@Nachtalb
Copy link
Contributor

Nachtalb commented Oct 30, 2019

The problem here is that ICategorization (from which IDublinCore also inherits) and IKeywordCategorization both implement a field named subjects. As a result, they override each other depending on which order they are defined in the behaviours of any type.

When ICategorization is loaded before IKeywordCategorization then IKeywordCategorization will work. If IKeywordCategorization is loaded before ICategorization then ICategorization will work.

The problem seen in the second screenshot above has nothing to do with the behaviours itself. This is a case of javascript not initializing the widget is not in the tab that is loaded on page load. Meaning if you open the /edit form in the above's second case then the Standard tab is loaded and the widget is not initialized. If you then change to the Kategorisierung tab and reload the page, this tab will be the first to load and the javascript will initialize the widget. See #42

@Nachtalb
Copy link
Contributor

Nachtalb commented Oct 30, 2019

@4teamwork/plone how should we proceed here? The simplest solution is to just not use the ICategorization which is also implemented in IDublinCore.
So if we want the IDublinCore we just use the other three it implements instead: IOwnershipIPublicationIBasic

The caveat about this solution however is, that we don't get the language field that is implemented by ICategorization.

@maethu maethu closed this as completed Nov 14, 2019
@maethu maethu reopened this Nov 14, 2019
@djowett-ftw
Copy link
Contributor

The fix in #47 means the widgets from ICategorization and IKeywordCategorization now work next to each other, BUT they are editing the same field so one value overrides the other (can't remember which way off the top of my head). I wonder whether this product should stop adding fields in the behavior, in Plone 5, and instead just extend ICategorization to provide an override of the widget (through updateWidgets()).

Thoughts?

@Nachtalb Nachtalb removed their assignment Feb 4, 2020
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

4 participants