Bug 43750

Summary: [Patch] editor problems in non-root context
Product: Lenya Reporter: Richard Frovarp <rfrovarp>
Component: MiscellaneousAssignee: Lenya Developers <dev>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: Trunk   
Target Milestone: 2.0   
Hardware: Other   
OS: other   
Bug Depends on: 43813    
Bug Blocks:    
Attachments: Add URL rewriting for xhtml:iframe[@id='kupu-linkdrawer-preview']/@src

Description Richard Frovarp 2007-10-31 07:51:34 UTC
Testing Jetty 6 has shown that the three editors don't work outside of the root
context. That is at least my assumption at the moment. Will need to test with
Tomcat first to confirm.
Comment 1 Richard Frovarp 2007-10-31 08:08:10 UTC
Yeah, it doesn't work under tomcat either. So this certainly is an issue with
lenya not being in the root context. Raised to blocker as Kupu is our standard
IE compatible editor, and it doesn't work outside of root context. 

BXE does work fine.
Comment 2 J 2007-10-31 08:18:54 UTC
there may be an issue with the proxy transformer (which should take care of
context) - i did a commit with my brains turned off a few hours ago, adding the
context prefix manually to the profile module because it did not work. andreas
pointed out it's probably a proxy transformer bug.

have you been working outside of root context for long? i've only been testing
this for 2 days, so i don't know whether it's a regression or it just never worked.
Comment 3 Richard Frovarp 2007-10-31 08:20:34 UTC
(In reply to comment #2)
> have you been working outside of root context for long? i've only been testing
> this for 2 days, so i don't know whether it's a regression or it just never
worked.
> 

Just today to test Jetty6 without the proxy. And then today with tomcat to
confirm it isn't a jetty6 issue.
Comment 4 J 2007-10-31 08:28:33 UTC
for the record, the profiling module is affected as well.
Comment 5 J 2007-11-04 12:18:27 UTC
at least for code i wrote myself (tinymce and profiling), i'm now convinced that
the proxy module is ok and the problems were caused by programming errors on my
part, so i'm withdrawing this bug report. richard, if you still have problems,
please re-open.
Comment 6 Richard Frovarp 2007-11-04 13:12:27 UTC
Did you fix Kupu as well? My initial problem is that Kupu doesn't work outside
of the root context, which I consider a blocker to release.
Comment 7 J 2007-11-05 11:07:46 UTC
ah, sorry. i remember now i hijacked your original bug report because i was sooo
sure it's a proxy transformer problem... no, i didn't look into kupu. will try
later, but kupu has never worked very well for me.
Comment 8 Richard Frovarp 2007-11-05 11:46:29 UTC
kupu is just plain broken at the moment. Somehow whatever was causing
kupublank.html to match is now broken. I don't see any changes that would have
caused this directly.
Comment 9 J 2007-11-08 04:30:04 UTC
this bug persists after the latest core fixes to contexts and redirection, so it
must be due to programming errors in the modules themselves.
the problems in the profiling and tinymce modules should be fixed now. what
about fck?
the only working standard editor remains oneform. bxe can't load the validation
document and hence won't let you do anything, kupu seems not to find its styles
and javascripts, forms does not display input fields to actually edit text.
shouldn't be too hard to fix...
richard, if you're working on this: can you give the test setup in
tools/proxytest a spin as well? that way, we'll have the same environment and
can reproduce stuff more easily.
Comment 10 Richard Frovarp 2007-11-08 08:56:01 UTC
I have not had a chance to work on this at all lately. I agree it is a problem
with the modules. Kupu won't even work from the root context at the moment. I am
leaving shortly and won't be back until Tuesday or Wednesday of next week. I can
take a look at FCK and others when I get back. 
Comment 11 J 2007-11-13 12:20:42 UTC
bxe should be fixed now, please test.
Comment 12 J 2007-11-13 13:13:19 UTC
kupu should be fixed as well.
Comment 13 Andreas Hartmann 2007-11-15 03:40:17 UTC
Kupu doesn't work for me:

- the layout is broken
- javascript console errors (startKupu is not defined)
- double context paths in the XHTML source

    <script type="text/javascript"
src="/lenyatrunk/lenyatrunk/default/modules/kupu/kupu/common/sarissa.js"> </script>

Comment 14 Andreas Hartmann 2007-11-15 03:44:42 UTC
I guess the context path is added twice:

- by the kupu.open pipeline in modules/kupu/sitemap.xmap
- in modules-core/usecase/usecase.xmap

Can't we just remove the proxy module from the kupu.open pipeline?
Comment 15 Andreas Hartmann 2007-11-15 03:54:07 UTC
After removing the proxy module from the context-prefix parameter passed to the
kupumacros.xsl transformation, it looks much better. The document isn't styled
yet, though.
Comment 16 Andreas Hartmann 2007-11-15 04:05:35 UTC
There are still double context paths:

http://localhost:8080/lenyatrunk/lenyatrunk/default/authoring/css/page.css

Comment 17 Andreas Hartmann 2007-11-15 04:07:24 UTC
After removing the proxy module from the css parameter in the content step it
looks good.
Comment 18 Andreas Hartmann 2007-11-15 04:09:00 UTC
It works for me after revision 595282.
Comment 19 jann forrer 2007-11-16 11:40:26 UTC
It works for me too (revision 595621) in tomcat non root context using mod_proxy_ajp
Comment 20 Richard Frovarp 2007-11-20 14:05:42 UTC
FCK should be fixed as of 596845.
Comment 21 Andreas Hartmann 2007-11-21 03:18:19 UTC
Can we close this issue?
Comment 22 Richard Frovarp 2007-11-21 10:38:56 UTC
Kupu is not fixed. Try inserting a link or image. I get all sorts of weird 404s.
Some of which are proxy related:

/default/authoring/kupublank.html
/default/authoring/kupudrawerstyles.css
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/page-image.png
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/sitetree-link.png
Comment 23 Richard Frovarp 2007-11-21 10:39:37 UTC
(In reply to comment #22)
> Kupu is not fixed. Try inserting a link or image. I get all sorts of weird 404s.

Oh, this is from a non-proxied root context.
Comment 24 J 2007-11-21 10:48:49 UTC
(In reply to comment #22)
> Kupu is not fixed. Try inserting a link or image. I get all sorts of weird 404s.
> Some of which are proxy related:
> 
> /default/authoring/kupublank.html
> /default/authoring/kupudrawerstyles.css
>
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/page-image.png
>
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/sitetree-link.png

woops. well, i applied the fixes shotgun-style. the last two lines look like i
used the proxy module in a context where it is not resolved... 
Comment 25 Richard Frovarp 2007-11-21 15:01:38 UTC
(In reply to comment #24)
> (In reply to comment #22)
> > Kupu is not fixed. Try inserting a link or image. I get all sorts of weird 404s.
> > Some of which are proxy related:
> > 
> > /default/authoring/kupublank.html
> > /default/authoring/kupudrawerstyles.css
> >
>
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/page-image.png
> >
>
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/sitetree-link.png
> 
> woops. well, i applied the fixes shotgun-style. the last two lines look like i
> used the proxy module in a context where it is not resolved... 

Yeah, found that. global-variables in kupu's sitemap.xmap. Substituting the text
for the variables in the sitemap does make it work, partially. Not sure if there
is a way to get the global variables to evaluate or not.
Comment 26 Andreas Hartmann 2007-11-23 07:24:51 UTC
Created attachment 21178 [details]
Add URL rewriting for xhtml:iframe[@id='kupu-linkdrawer-preview']/@src

The patch affects apache-lenya/lenya/kupumacros.xsl. It adds the Lenya-specific
URL rewriting for the XPath "xhtml:iframe[@id='kupu-linkdrawer-preview']/@src".
Comment 27 Andreas Hartmann 2007-11-23 07:27:43 UTC
(In reply to comment #25)
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/page-image.png
/default/authoring/%7Bproxy:/modules/kupu/kupu/apache-lenya/lenya/images%7D/sitetree-link.png

These should be fixed in revision 597677.
Comment 28 J 2008-01-04 04:11:38 UTC
can this one be closed?
Comment 29 Andreas Hartmann 2008-01-04 04:12:59 UTC
From my POV yes.