pat-contentbrowser: search mode duplicates its content at every load
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start with the ContentBrowserFieldWidget implementation and the content browser search mode, then trace what happens when the modal is closed and opened again. Reproduce the steps in the issue using {"mode": "search"} and compare with the default browse mode. Done means reopening the modal shows each existing content item only once.
Written by the indexing model from the issue text.
Description
Describe the bug
By setting the configuration option "mode": "search" on a field that uses the ContentBrowserFieldWidget widget, on the add/edit form, every time that the widget is loaded, the list of elements gets duplicated, as if the widget fetches the default results and appends them rather than replacing the existing ones that are kept somewhere...
The default browse mode does not show this bug.
To Reproduce
Steps to reproduce the behavior:
- Go to `/Plone/portal_registry/
- Edit the
plone.patternoptionsoption addingcontentbrowseras a new key and{"mode": "search"}as its value and save it - Go to the Plone site root, try to create a Page document, select the
Categorizationtab and click onSelecton theRelated itemsfield. - A list of existing content will be shown
- close that modal and open it again
- The list of existing content gets duplicated
Note that the default modal to edit the registry configuration does not work as it closes the modal as soon as you click on Add you need to open it on its own browser tab, i.e. /Plone/portal_registry/edit/plone.patternoptions
Expected behavior
No duplicated content is shown
Software (please complete the following information):
Tested it locally but also reproducible in https://classic.demo.plone.org
- Dominant language
- JavaScript
- Stars
- 57
- Forks
- 103
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plone/mockup
-
wrong description text in the tinymce image insert modal dialogMay be free again @anya-xcode claimed this 475 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 62/100
plone/mockup#1489 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
plone/mockup#1483 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
plone/mockup#1402 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
plone/mockup#1373 · 3 comments ·
Maintainers usually reply within 2 days
-
pat-contentbrowser: Display review state indicators (styling) for itemsPossibly taken @luxcas claimed this 11 days ago. Open04 type: enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
mattabate/life-distributable#231 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sfbrigade/pocket-gardens#60 ·
Maintainers usually reply within 5 days
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3329 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
devarshishimpi/codra#178 ·
Maintainers usually reply within 1 day