Mailing List Archive

This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use
Any ideas?

An error occurred while processing your request:

Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use at /var/home/tyee/bricolage2/lib/Bric/App/Callback/Desk.pm line 377, <GEN14> line 853.

Error Details (hide)

Fault Class
Bric::Util::Fault
Description
Bricolage Exception
Timestamp
2011-10-19 08:52:31.000000
Package
Bric::App::Handler
Filename
/var/home/tyee/bricolage2/lib/Bric/App/Handler.pm
Line
382
Stack:

Trace begun at /var/home/tyee/bricolage2/lib/Bric/App/Handler.pm line 382
Bric::App::Handler::cb_exception_handler('Can\'t use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use at /var/home/tyee/bricolage2/lib/Bric/App/Callback/Desk.pm line 377,
line 853.^J') called at /usr/lib/perl5/vendor_perl/5.8.4/Params/CallbackRequest.pm line 310
Params::CallbackRequest::request('Params::CallbackRequest=HASH(0x93c5af8)', 'HASH(0x8fe1bcc)', 'apache_req', 'HTML::Mason::Apache::Request=HASH(0xae555b4)') called at /usr/lib/perl5/vendor_perl/5.8.4/MasonX/Interp/WithCallbacks.pm line 115
MasonX::Interp::WithCallbacks::make_request('MasonX::Interp::WithCallbacks=HASH(0xad0a59c)', 'comp', '/workflow/profile/story/20403', 'args', 'ARRAY(0xb0206dc)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0xad0a4d0)', 'apache_req', 'HTML::Mason::Apache::Request=HASH(0xae555b4)') called at /usr/lib/perl5/vendor_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 868
eval {...} at /usr/lib/perl5/vendor_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 867
HTML::Mason::ApacheHandler::prepare_request('HTML::Mason::ApacheHandler=HASH(0xad0a4d0)', 'Apache=SCALAR(0xb1295c8)') called at /usr/lib/perl5/vendor_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 822
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xad0a4d0)', 'Apache=SCALAR(0xb1295c8)') called at /var/home/tyee/bricolage2/lib/Bric/App/Handler.pm line 307
eval {...} at /var/home/tyee/bricolage2/lib/Bric/App/Handler.pm line 296
Bric::App::Handler::handler('Apache=SCALAR(0xb1295c8)') called at PerlHandler subroutine `Bric::App::Handler::handler' line 1
eval {...} at PerlHandler subroutine `Bric::App::Handler::handler' line 1


--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith

Save our in-boxes! http://emailcharter.org
Re: This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use [ In reply to ]
On Oct 19, 2011, at 8:53 AM, Phillip Smith wrote:

> Trace begun at /var/home/tyee/bricolage2/lib/Bric/App/Handler.pm line 382
> Bric::App::Handler::cb_exception_handler('Can\'t use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use at /var/home/tyee/bricolage2/lib/Bric/App/Callback/Desk.pm line 377,

What's at this line in your install?

David
Re: This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use [ In reply to ]
On 2011-10-19, at 12:03 PM, David E. Wheeler wrote:

> On Oct 19, 2011, at 8:53 AM, Phillip Smith wrote:
>
>> Trace begun at /var/home/tyee/bricolage2/lib/Bric/App/Handler.pm line 382
>> Bric::App::Handler::cb_exception_handler('Can\'t use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use at /var/home/tyee/bricolage2/lib/Bric/App/Callback/Desk.pm line 377,
>
> What's at this line in your install?
>

Bric/App/Callback/Desk.pm: 'Some of the related assets were not published.';


Here's the block:

# By this point we now know if we're going to fail this publish
# if we set the fail behaviour to fail rather than warn
if (PUBLISH_RELATED_ASSETS && @messages) {
if (PUBLISH_RELATED_FAIL_BEHAVIOR eq 'fail') {
$self->add_message(@$_) for @messages;
my $msg = 'Publish aborted due to errors above. Please fix the '
. ' above problems and try again.';
throw_error error => $msg,
maketext => $msg;
} else {
# we are set to warn, should we add a further warning to the msg ?
$self->raise_conflict(@$_) for @messages,
'Some of the related assets were not published.';
}
} else {
$self->raise_conflict(@$_) for @messages;
}

--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith

Save our in-boxes! http://emailcharter.org
Re: This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use [ In reply to ]
On Oct 19, 2011, at 9:12 AM, Phillip Smith wrote:

>> What's at this line in your install?
>>
>
> Bric/App/Callback/Desk.pm: 'Some of the related assets were not published.';
>
>
> Here's the block:
>
> # By this point we now know if we're going to fail this publish
> # if we set the fail behaviour to fail rather than warn
> if (PUBLISH_RELATED_ASSETS && @messages) {
> if (PUBLISH_RELATED_FAIL_BEHAVIOR eq 'fail') {
> $self->add_message(@$_) for @messages;

Thanks. That was a bug fixed as part of this commit:

https://github.com/bricoleurs/bricolage/commit/1b0d4e8c39223670f0cefe4acc9ebf656de64ecf

I noticed when fixing it that those weren't array references, and so I fixed that. I was surprised no one had complained about it.

Anyway, should be fixed in the next release.

Best,

David
Re: This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use [ In reply to ]
On 2011-10-19, at 12:19 PM, David E. Wheeler wrote:

> On Oct 19, 2011, at 9:12 AM, Phillip Smith wrote:
>
>>> What's at this line in your install?
>>>
>>
>> Bric/App/Callback/Desk.pm: 'Some of the related assets were not published.';
>>
>>
>> Here's the block:
>>
>> # By this point we now know if we're going to fail this publish
>> # if we set the fail behaviour to fail rather than warn
>> if (PUBLISH_RELATED_ASSETS && @messages) {
>> if (PUBLISH_RELATED_FAIL_BEHAVIOR eq 'fail') {
>> $self->add_message(@$_) for @messages;
>
> Thanks. That was a bug fixed as part of this commit:
>
> https://github.com/bricoleurs/bricolage/commit/1b0d4e8c39223670f0cefe4acc9ebf656de64ecf
>
> I noticed when fixing it that those weren't array references, and so I fixed that. I was surprised no one had complained about it.
>
> Anyway, should be fixed in the next release.

Next release, you say? ;)

--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith

Save our in-boxes! http://emailcharter.org
Re: This is a new one for me: Can't use string ("Some of the related assets were ") as an ARRAY ref while "strict refs" in use [ In reply to ]
On Wed, Oct 19, 2011 at 01:54:32PM -0400, Phillip Smith wrote:
>
> On 2011-10-19, at 12:19 PM, David E. Wheeler wrote:
>
> > On Oct 19, 2011, at 9:12 AM, Phillip Smith wrote:
> >
> >>> What's at this line in your install?
> >>>
> >>
> >> Bric/App/Callback/Desk.pm: 'Some of the related assets were not published.';
> >>
> >>
> >> Here's the block:
> >>
> >> # By this point we now know if we're going to fail this publish
> >> # if we set the fail behaviour to fail rather than warn
> >> if (PUBLISH_RELATED_ASSETS && @messages) {
> >> if (PUBLISH_RELATED_FAIL_BEHAVIOR eq 'fail') {
> >> $self->add_message(@$_) for @messages;
> >
> > Thanks. That was a bug fixed as part of this commit:
> >
> > https://github.com/bricoleurs/bricolage/commit/1b0d4e8c39223670f0cefe4acc9ebf656de64ecf
> >
> > I noticed when fixing it that those weren't array references, and so I fixed that. I was surprised no one had complained about it.
> >
> > Anyway, should be fixed in the next release.
>
> Next release, you say? ;)

Maybe:

git checkout 1b0d4e8c39223670f0
git show > myjunkfile.txt
[.tease out 3 file diffs as necessary to patch1.diff, patch2.diff, patch3.diff]
cd [bricoage root]
patch < /path/to/patch1.diff
patch < /path/to/patch2.diff
patch < /path/to/patch3.diff

Please confirm or test on non-critical system before you apply ;)

-bch

> --
> Phillip Smith
> http://phillipadsmith.com
> http://twitter.com/phillipadsmith
> http://linkedin.com/in/phillipadsmith
>
> Save our in-boxes! http://emailcharter.org
>
>
>
>
>

--
Brad Harder
Method Logic Digital Consulting
http://methodlogic.net/
http://twitter.com/bcharder