Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users
Re: Error when using $burner->preview()
 

Index | Next | Previous | View Flat


david at kineticode

Nov 14, 2011, 3:22 PM


Views: 329
Permalink
Re: Error when using $burner->preview() [In reply to]

On Nov 14, 2011, at 1:56 PM, Schults, Chris wrote:

> I'm trying to figure out if it possible to publish a story to an output channel for which the story is not assigned. I want to always output two versions of select story types, where the second is required. Basically, I don't want to go through the process of assigning the output channel to the thousands of existing stories, nor do I want users to have the ability to unassign this particular one.

I don’t think that’s possible, given the current API, without a lot of nasty hackery.

> In the <cleanup> section , I'm using $burner->preview(), which takes an OC ID as a fourth parameter, but getting the following error:
>
> Can't locate object method "apache_req" via package "HTML::Mason::Request" at /usr/local/bricolage/lib/Bric/App/Util.pm line 667, <GEN1> line 1215.
>
> It appears that the method "apache_req" is indeed not defined. However, it looks like it is in the most recent version of HTML::Mason::Request.

That method has been in HTML::Mason::ApacheHandler::Request since the beginning of time (I see a reference to it in Mason's changes from 2002). However, if you're using bric_queued, the templates do not run inside Apache, so it wouldn't be available.

> Here are my questions:
>
> 1) Assuming I fix this error, is it even possible to publish to an unassigned OC from a story template?

No.

> 2) Can I simply update my version of HTML::Mason::Request?

No.

> 3) Should I update my version of Mason, and if so, do I risk any issues as we're still using Bricolage 1.10.3?

Yeah, it’s good to have Mason up-to-date. No known issues.

> 4) Why is $burner->preview() not intended to be called from a template as the documentation states?

Because it’s designed to be called from the app running inside mod_perl, as you’re finding.

Best,

David

Subject User Time
Error when using $burner->preview() chris.schults at pccsea Nov 14, 2011, 1:56 PM
    Re: Error when using $burner->preview() david at kineticode Nov 14, 2011, 3:22 PM
    RE: Error when using $burner->preview() chris.schults at pccsea Nov 14, 2011, 3:30 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.