Bug#680796: Lazy workaround for failing tests

Florian Schlichting fschlich at ZEDAT.FU-Berlin.DE
Sun Aug 5 21:42:16 UTC 2012


On Sun, Aug 05, 2012 at 02:03:24AM +0200, gregor herrmann wrote:
> On Sat, 04 Aug 2012 23:40:36 +0200, Salvatore Bonaccorso wrote:
> > -# match against the start of the string, \A, to make sure no page cruft gets included besides the content
> > -content_like('/.jsrpc/render?content=%7B%7Binclude http://localhost/help%7D%7D', qr/\A<h1>Help/,
> > +content_like('/.jsrpc/render?content=%7B%7Binclude http://localhost/help%7D%7D', qr/<h1>Help/,
> >               'include part of wiki, absolute URL');
> 
> I have to admit that the comment about \A makes ma a bit nervous ...
> 
> 
> Hm, and what's also weird in the test output is the fact that quite a
> few HTML elements are wrapped in an additional <p>...</p> which seems
> wrong to me. So, maybe, there is a real problem somewhere?

I think you're right to be suspicious about this. I have to stop now,
but my debugging so far says this:

MojoMojo::Formatter::Include::inline() correctly determines that a page
from the same wiki is to be included, and starts a subreq for '/inline'
with the appropriate path set.

Yet, MojoMojo::Controller::Page::inline(), which sets the template for a
content-only version of the page, is never called, and the content is
rendered directly by the view script, with a wrong template (patching
view() to use page/inline.tt makes unmodified t/formatter_include.t
pass!)

Catalyst::Plugin::SubRequest has had an update recently "0.19 Fixed
non-propagation of parameters to subrequests"... but applying the diff
to my chroot-installed version didn't make a difference :-(

So: why does Catalyst::Action call MojoMojo::Controller::Page->view
rather than MojoMojo::Controller::Page->inline?

Florian



More information about the pkg-perl-maintainers mailing list