Error in taglibs from MachIIDashboard

0 views
Skip to first unread message

Joseph Lamoree

unread,
Dec 7, 2009, 3:24:08 AM12/7/09
to Mach-II for CFML
I think I managed to update the framework and the dashboard to
versions that don't agree. I have rev 2022 of framework/1-8-0/trunk
and dashboard/1-1-0/trunk running on my dev box. Before updating from
a few weeks ago, it worked fine. Now there is something going on here:

https://greatbiztoolsllc.trac.cvsdude.com/mach-ii/browser/dashboard/1-1-0/trunk/views/layout/header.cfm?rev=2006#L48

The view:a tag leads to an error that the 'url' local var is a struct
({event:string}) rather than a string, causing an exception when it
ends up in MachII.util.Utils.escapeHtml().

I took a peek in the baseTagBuilder.makeUrl function, and see that
some special handling is being done for the view:a.
https://greatbiztoolsllc.trac.cvsdude.com/mach-ii/browser/framework/1-8-0/trunk/customtags/baseTagBuilder.cfm#L479

Here are the top items on the call stack:
/webroot/MachII/customtags/baseTagBuilder.cfm: line 492
/webroot/MachII/customtags/view/img.cfm: line 62
/webroot/MachIIDashboard/views/layout/header.cfm: line 56
/webroot/MachII/framework/ViewContext.cfc: line 107

I'd be happy to fix it, if I knew what was intended. However, I
imagine that it's just a refactoring that isn't finished yet.

-joseph

Peter J. Farrell

unread,
Dec 7, 2009, 2:21:17 PM12/7/09
to mach-ii-for...@googlegroups.com
Are you sure you are at the HEAD for both the framework and dashboard?
This works for me on both CF8 and OpenBD 1.2. What cfml engine are you
using? Also the BER of the dashboard doesn't work with the framework RC1
because we've added some helper methods to the framework after the RC1
was released for the dashboard.

.Peter


Joseph Lamoree said the following on 12/07/2009 02:24 AM:

Joseph Lamoree

unread,
Dec 8, 2009, 10:45:50 AM12/8/09
to Mach-II for CFML
Just to be sure I had the correct configuration, I started from
scratch:

Downloaded Raily 3.1.2 (railo-3.1.2.001-railo-express-macosx.zip)
Configure DSN; set Security Access = open (read)
svn co https://greatbiztoolsllc.svn.cvsdude.com/mach-ii/framework/1-8-0/trunk
MachII
svn co https://greatbiztoolsllc.svn.cvsdude.com/mach-ii/dashboard/1-1-0/trunk
MachIIDashboard
CVSROOT=:pserver:anoncvs:ano...@cvs.coldspringframework.org:/
coldspring cvs co coldspring
svn co http://svn.riaforge.org/transfer/transfer/trunk transfer
for D in admin model taglib tests webapp; do ln -s ~/Projects/
Workspace/MRI/trunk/src/$D .; done

When I opened my application, it loaded properly. When I opened the
MachII Dashboard, I got the error described yesterday.

To be fair, I pulled down the nightly build of Open BlueDragon
Ready2Run (the version named jetty-openbd.zip, heh). I don't know why,
but that worked fine (after explicitly starting Jetty with Java 6 and
256Mb heap).

It's not clear to me why there would be a problem in this specific
code with Railo. I still do wonder why the same name prefix for both
the view and form taglibs is used though.

-joseph

Matthew Woodward

unread,
Dec 8, 2009, 10:51:28 AM12/8/09
to mach-ii-for...@googlegroups.com
On Tue, Dec 8, 2009 at 7:45 AM, Joseph Lamoree <jlam...@gmail.com> wrote:
It's not clear to me why there would be a problem in this specific
code with Railo.


Me either, but this is great to know. Always helpful to have people running Mach-II-related code on the various engines to give us feedback. We'll look into it.

--
Matthew Woodward
ma...@mattwoodward.com
http://mpwoodward.posterous.com
identi.ca/Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Peter J. Farrell

unread,
Dec 8, 2009, 12:26:00 PM12/8/09
to mach-ii-for...@googlegroups.com
Joseph,

I removed the form tag import completely (since it's not needed and
wrongly put into the "view" prefix). I'm wondering if that was causing
the error or not on Railo. You can either update to head or just delete
that form cfimport in that view and retest.

When I get a chance I'll pull down Railo and test. This isn't the first
time Mach-II has been caught out by a Railo bug (however there code base
is much newer than something like OpenBD -- so it's really not any fault
of their own).

Hopefully we can resolve this soon.

Best,
.Peter

Joseph Lamoree said the following on 12/08/2009 09:45 AM:

Joseph Lamoree

unread,
Dec 8, 2009, 3:36:01 PM12/8/09
to Mach-II for CFML
Using a different computer, I pulled Railo 3.1.2 Express down. To the
webroot, I added these items from Mach-II Subversion server:

/mach-ii/framework/1-8-0/trunk
/mach-ii/dashboard/1-1-0/trunk
/mach-ii/sampleApps/roulette/trunk

I see the change to header.cfm you made this morning (rev 2023), but
the error is still there.

I went digging for the cause of the problem. It seems that something
is stepping on the local variable 'url' in baseTagBuilder.makeUrl. I
changed that variable name to 'furl' locally, and the problem went
away. I tried to find a scope problem in the area, but it eluded me.

Here's a diff: http://lamoree.com/files/furl.diff

-joseph

Peter J. Farrell

unread,
Dec 8, 2009, 4:00:46 PM12/8/09
to mach-ii-for...@googlegroups.com
Ah, it just dawned on me. "url" is a *scope* -- looks like OpenBD and
Railo is respecting the var, but the Railo is not. Looks like there
order of resolution is different than the other engines.

I call this the side-effect of never having to use url/form scope
because I'm stuck in the framework always ;-)

Here's the ticket:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ticket/466

I'll be fixing this soon. It should be in the nightly tonight.

.Peter

Joseph Lamoree said the following on 12/08/2009 02:36 PM:

Matthew Woodward

unread,
Dec 8, 2009, 3:56:52 PM12/8/09
to mach-ii-for...@googlegroups.com
On Tue, Dec 8, 2009 at 1:00 PM, Peter J. Farrell <pe...@mach-ii.com> wrote:
Ah, it just dawned on me.  "url" is a *scope* -- looks like OpenBD and
Railo is respecting the var, but the Railo is not. Looks like there
order of resolution is different than the other engines.


I think you meant OpenBD and Adobe CF. ;-)

Might be worth it to submit this (and a small reproducible test case) to Railo since it would be a compatibility difference if nothing else. I know on the OpenBD project at least we love to know about little things like this so they can be on our radar.

Peter J. Farrell

unread,
Dec 8, 2009, 4:15:35 PM12/8/09
to mach-ii-for...@googlegroups.com
Matthew Woodward said the following on 12/08/2009 02:56 PM:
On Tue, Dec 8, 2009 at 1:00 PM, Peter J. Farrell <pe...@mach-ii.com> wrote:
Ah, it just dawned on me.  "url" is a *scope* -- looks like OpenBD and
Railo is respecting the var, but the Railo is not. Looks like there
order of resolution is different than the other engines.


I think you meant OpenBD and Adobe CF. ;-)

D'oh - thanks for the correction.  Anyways, the fix has been committed and a new nightly zip has been published.

Might be worth it to submit this (and a small reproducible test case) to Railo since it would be a compatibility difference if nothing else. I know on the OpenBD project at least we love to know about little things like this so they can be on our radar.
Well, I went and checked (it took a while because JBoss's JIRA is really slow).  Looks like what Joseph observed is part of issue #50:

https://jira.jboss.org/jira/browse/RAILO-50

It's clear from the ticket that the Railo folks know this is an known incompatibility and this Railo ticket is marked as "won't fix".

Best,
.Peter

Matthew Woodward

unread,
Dec 8, 2009, 4:09:31 PM12/8/09
to mach-ii-for...@googlegroups.com
On Tue, Dec 8, 2009 at 1:15 PM, Peter J. Farrell <pe...@mach-ii.com> wrote:
It's clear from the ticket that the Railo folks know this is an known incompatibility and this Railo ticket is marked as "won't fix".


Interesting ... guess at least we know.

Joseph Lamoree

unread,
Dec 8, 2009, 4:16:51 PM12/8/09
to mach-ii-for...@googlegroups.com
Updated to rev 2024, and it works like a champ. Thanks Peter.

-joseph
Reply all
Reply to author
Forward
0 new messages