[Bug 617] New: Macros are handled incorrectly in (special) case of Root as prototype extent

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug 617] New: Macros are handled incorrectly in (special) case of Root as prototype extent

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=617

           Summary: Macros are handled incorrectly in (special) case of Root
                    as prototype extent
           Product: Helma
           Version: CVS trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Web Support
        AssignedTo: helma-dev@...
        ReportedBy: interface@...


I stumbled accross a (maybe special?) case where Helma suddenly would use the
wrong macro handler.

Because the setup is rather complex, I'll add a test case where I isolated the
behaviour.

It's obviously an interference between a persistently stored Root prototype
which is an extent of another (Site) Prototype and the macros in a User skin
which is rendered from within a site.

Thus, instead of using the site object as macro handler, root is handling the
macros -- with nasty results.

Of course it could be that something is missing or erroneously mapped in the
test case. Please have a look.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 617] Macros are handled incorrectly in (special) case of Root as prototype extent

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=617





------- Comment #1 from interface@...  2008-04-14 20:27 -------
Created an attachment (id=90)
 --> (http://helma.org/bugs/attachment.cgi?id=90&action=view)
Test case demonstrating the bug


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 617] Macros are handled incorrectly in (special) case of Root as prototype extent

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=617


hannes@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from hannes@...  2008-05-15 11:12 -------
The problem was that Helma tries to resolve macros in the parents of the this
object before looking at the macro handlers in res.handlers. Actually this is
really ugly legacy behaviour, and I think it should have been kicked out in
helma 1.5 or 1.6.

I now "lessened" the effects somehow by only resolving direct prototype hits in
the parent chain, i.e. extended prototypes will not match. But I really think
we should check if we can remove all of this, as it is behaviour that can't be
controlled from the outside and really confusing.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 617] Macros are handled incorrectly in (special) case of Root as prototype extent

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=617





------- Comment #3 from interface@...  2008-06-14 18:16 -------
OK, that solved the issue. I would be interested though what happened if we
really kicked out this feature completely.

It's now that I still cannot simply set res.handlers.foo to get precedence over
what's in the path -- which complicates the update of Antville.org to a current
Helma snapshot (needs processing of the users' skin files).


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 617] Macros are handled incorrectly in (special) case of Root as prototype extent

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=617





------- Comment #4 from interface@...  2008-06-15 20:37 -------
After commenting out lines 1093-1110 of helma/framework/core/Skin.java [1] as
you suggested via Jabber I made the following observations:

 * A "story" handler in a comment skin (with a comment being an extent of the
story prototype) results in an "unhandled macro error" even with a story object
in the path
 * Defining res.handlers.story with the appropriate comment works now
 * However, the "root" handler is not resolved correctly anymore at least when
using virtual hosts; <% root.href %> becomes http://[siteName].antville.org
instead of http://www.antville.org (Note: root is inherited from the site
prototype in Antville) -- I don't fully understand what's happening here, yet.

--
[1]
http://dev.helma.org/trac/helma/browser/helma/helma/trunk/src/helma/framework/core/Skin.java#L1093


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev