Mailing List Archive

Can't call method "get_min_occurrence" on an undefined value
Folks,

I'm getting an error when attempting to edit a story:

Can't call method "get_min_occurrence" on an undefined value at /usr/local/bricolage/comp/widgets/container_prof/container.mc line 89, <GEN51> line 42.

(The detailed error is pasted below.) I'm in the process of developing a new type of story—actively editing the template, element, and test story—and something has obviously gone wrong. The error is sufficiently verbose for me to figure out that the problem is that there's no specified minimum occurrence for a subelement, but as I look around, I'm finding a bunch of subelements with no specified minimum occurrence, and that's never been a problem before. (I assume Bricolage figures null == 0.) And I hadn't added or modified any subelements before this problem started, making it doubly confusing.

Can anybody tell me if I'm correct about what this error means, and if the solution is go through and specify a minimum occurrence of 0 for every subelement that's currently null?

Best,
Waldo


---
Virginia Quarterly Review
One West Range, Box 400223
University of Virginia
Charlottesville, VA 22904-4223
434-243-4995


------------cut------------
Can't call method "get_min_occurrence" on an undefined value at /usr/local/bricolage/comp/widgets/container_prof/container.mc line 89, <GEN51> line 42.

Fault Class
HTML::Mason::Exception
Description
generic base class for all Mason exceptions
Timestamp
2010-01-29 10:35:05.000000
Package
HTML::Mason::Exceptions
Filename
/usr/lib/perl5/site_perl/5.8.8/HTML/Mason/Exceptions.pm
Line
129
Stack:

Can't call method "get_min_occurrence" on an undefined value at /usr/local/bricolage/comp/widgets/container_prof/container.mc line 89,
line 42.

Stack:
[/usr/local/bricolage/comp/widgets/container_prof/container.mc:89]
[/usr/local/bricolage/comp/widgets/container_prof/container.mc:33]
[/usr/local/bricolage/comp/widgets/container_prof/edit.html:25]
[/usr/local/bricolage/comp/widgets/container_prof/container_prof.mc:54]
[/usr/local/bricolage/comp/widgets/story_prof/edit_meta.html:134]
[/usr/local/bricolage/comp/widgets/story_prof/story_prof.mc:163]
[/usr/local/bricolage/comp/workflow/profile/story/dhandler:32]
[/usr/local/bricolage/comp/autohandler:7]
Re: Can't call method "get_min_occurrence" on an undefined value [ In reply to ]
On Jan 29, 2010, at 8:05 AM, Waldo Jaquith wrote:

> Folks,
>
> I'm getting an error when attempting to edit a story:
>
> Can't call method "get_min_occurrence" on an undefined value at /usr/local/bricolage/comp/widgets/container_prof/container.mc line 89, <GEN51> line 42.

You should not get that error. What version of Bricolage, please?

> (The detailed error is pasted below.) I'm in the process of developing a new type of story—actively editing the template, element, and test story—and something has obviously gone wrong. The error is sufficiently verbose for me to figure out that the problem is that there's no specified minimum occurrence for a subelement, but as I look around, I'm finding a bunch of subelements with no specified minimum occurrence, and that's never been a problem before. (I assume Bricolage figures null == 0.) And I hadn't added or modified any subelements before this problem started, making it doubly confusing.
>
> Can anybody tell me if I'm correct about what this error means, and if the solution is go through and specify a minimum occurrence of 0 for every subelement that's currently null?

Yeah, it should be 0, but it should also do the right thing if it's null. Would you file a bug report, please?

Thanks,

David
Re: Can't call method "get_min_occurrence" on an undefined value [ In reply to ]
On Jan 29, 2010, at 12:01 PM, David E. Wheeler wrote:
>
> On Jan 29, 2010, at 8:05 AM, Waldo Jaquith wrote:
>
>> I'm getting an error when attempting to edit a story:
>>
>> Can't call method "get_min_occurrence" on an undefined value at /usr/local/bricolage/comp/widgets/container_prof/container.mc line 89, <GEN51> line 42.
>
> You should not get that error. What version of Bricolage, please?

So sorry, that's an important point: v1.11.1.


>> Can anybody tell me if I'm correct about what this error means, and if the solution is go through and specify a minimum occurrence of 0 for every subelement that's currently null?
>
> Yeah, it should be 0, but it should also do the right thing if it's null. Would you file a bug report, please?

Will do, although I feel a bit awkward about it, since I can't provide instructions to duplicate it. :)

Best,
Waldo

---
Virginia Quarterly Review
One West Range, Box 400223
University of Virginia
Charlottesville, VA 22904-4223
434-243-4995
Re: Can't call method "get_min_occurrence" on an undefined value [ In reply to ]
On Jan 29, 2010, at 1:27 PM, Waldo Jaquith wrote:

>> You should not get that error. What version of Bricolage, please?
>
> So sorry, that's an important point: v1.11.1.

Oh, pheh. May well have been fixed already.

>
> Will do, although I feel a bit awkward about it, since I can't provide instructions to duplicate it. :)

If you just say that it happens when min_occurrence is null, we'll be able to work it out, I'm sure.

David