Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6777523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:09:29+00:00 2026-05-26T16:09:29+00:00

I have a dexterity behaviour that allows me to relate items and store the

  • 0

I have a dexterity behaviour that allows me to relate items and store the relations as UUIDs

relatedItems = schema.List(
            title=u"Related Items",
            description=u"Search for content that is related to this item",
            required=False,
            value_type=schema.Choice(
                source=UUIDSourceBinder(navigation_tree_query={'portal_type':
                   TYPES_WITH_TEASERS})))
form.widget(relatedItems='plone.formwidget.contenttree.widget.MultiContentTreeFieldWidget')

This works great except that if you have a few relations then every time you edit the item their order changes. We’re displaying the related items in the right hand column of the page (e.g. see this article about food) and want to control the order so that we can put more interesting teasers first.

Debugging it looks likely this reordering is down to the fact z3c.formwidget.query.widget.QuerySourceRadioWidget.update uses a set when processing request parameters. Presumably this is to prevent duplicates but has two nasty side effects:

  1. a field’s value gets updated when it hasn’t changed
  2. order is lost when it might be important

Is there an alternative to MultiContentTreeFieldWidget that works in a similar way but preserves the order you add items? Even better is there a widget that does this and also allows you to reorder items as well?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:09:29+00:00Added an answer on May 26, 2026 at 4:09 pm

    I didn’t find an alternative but subsequently z3c.formwidget.query has been updated to use a list instead of a set when processing request parameters. Version 0.7 fixes this

    http://pypi.python.org/pypi/z3c.formwidget.query/0.7

    Add the following to your [versions] section in buildout to resolve

    z3c.formwidget.query = 0.7
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just installed dexterity into our office's intranet site so that I can
Have a rails app that is supposed to display a list of products/managers. After
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have a bunch of WCF REST services hosted on Azure that access a SQL
I have two Dexterity content types - Participant & Criterion - the latter of
I have the code below that I wrote to get rid of a huge
We have a requirement for a dexterity content type to have exclude from navigation
I have a custom folderish Dexterity content-type in Plone. It can have only Documents
Have some dates in my local Oracle 11g database that are in this format:
I have a Dexterity-based content type with the IRelatedItems behavior enabled using: <property name=behaviors>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.