#121 ✓resolved
bret (at pectopah)

Large number of contributors causes error in story

Reported by bret (at pectopah) | November 30th, 2009 @ 09:11 PM | in 1.10.10

(This is on 1.10.7, but probably applicable to newer Bricolages.)

When a story has a large number of contributors (larger than the pagination number), several bad behaviours emerge:

  1. The edit-contributors screen inside the story offers pagination and "show all" links, but these do nothing when clicked.
  2. The order of contributors set with the number-pulldowns is not respected. For example, set one contributor to #1, then save and stay. The #1 spot will be occupied by a contributor other than the one just selected.

My best guess is that pagination and user-controlled ordering are not playing well together. So if there are 55 contributors, and the first 50 show up on the edit screen, contribs 51-55 do not get order numbers at all, and this snaps them to the head of the line on a save.

I'm not sure there's an easy way to do user-controlled ordering without having all the elements (in this case, contributors) present at once.

Anyway, a quick fix that worked for me was a change to /comp/widgets/listManager.mc. Here's a summary:

I removed the line initializing $limit fron the <%init> block, and added $limit to the <%args> block, with the default value set to the same thing that used to be present in the <%init>:

Bric::Util::Pref->lookup_val( 'Search Results / Page' ) || 0

Then, in /comp/widgets/story_prof, in the call to listManager.mc, I set the limit to a number three times larger than the total number of contributors in the system. Now the screen shows all the contribs in the story, and everything works fine.

Obviously, this introduces a hard-coded value where there shouldn't be one. Would it just be smarter to have listManager.mc check for sorting by order, and have it set $limit to 0 whenever that is the case?

Comments and changes to this ticket

  • theory

    theory February 23rd, 2010 @ 10:35 PM

    • Assigned user changed from “Bugs (at bricolage)” to “theory”
    • Milestone set to 1.11.4
  • theory

    theory February 23rd, 2010 @ 10:37 PM

    • Milestone changed from 1.11.4 to 1.10.10
  • theory

    theory February 25th, 2010 @ 12:21 AM

    • State changed from “new” to “open”

    First thing I noticed, after creating a bunch of contributors, was that the Edit Contributors screen loaded with the search results from the contributors admin screen. I fixed that.

    Going to look at the other issues now.

  • theory

    theory February 25th, 2010 @ 12:26 AM

    Issues replicated. I'm thinking that perhaps contributors within a story should not be paginated. It will be rare to have so many contributors, and when you do, those problems should go away without pagination. I'm going to do that now and make sure it works.

  • Bugs (at bricolage)

    Bugs (at bricolage) February 25th, 2010 @ 12:51 AM

    • State changed from “open” to “resolved”

    (from [173f809567c4ad45b3a355bfcc0f60e80d87da9e]) Disable category and contributor pagination in docs.

    This commit fixes a few issues, discovered and fixed in reaction to Bug [#121 state:resolved]:

    • When editing contributors associated with a story or media document, they are no longer paginated. When there were more contributors than would fit on a paginated page, the pagination didn't work and reording didn't work. So by disabling pagination in this case, we get around that issue. Documents with that many contributors are rare, so the trade-off seems worthwhile.

    • The same turned out to be true for categories when they were displayed and the ENABLE_CATEGORY_BROWSER bricolage.conf directive was true. So pagination is now diabled there, too.

    • While at it, the ordering of categories displayed as such was borked, so I fixed it so that they display in URI order, which is what had been expected in the first place.

    • And finally, when associating contriutors with a media document, the user was prompted to select a role, even if there was only one. We now skip that step, as we had been doing with stories for a while now. http://github.com/bricoleurs/bricolage/commit/173f809567c4ad45b3a35...

  • theory

    theory March 26th, 2010 @ 02:01 AM

    • State changed from “resolved” to “open”
  • theory

    theory March 26th, 2010 @ 02:02 AM

    • State changed from “open” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Referenced by