FCKEditor for event description has problem with mod-rewrite

Bug #258951 reported by Steve Schmechel
Affects Status Importance Assigned to Milestone
Justas Sadzevičius
Gediminas Paulauskas

Bug Description

Technically this may be an upstream issue with zope/html/widget.py, however, if SchoolTool users commonly use Apache mod-rewrite to embed the application inside another site, there can be a problem with FCK Editor displaying a portion of the "upstream" site.

For example: If you are using rewrite rules similar to this:
      RewriteRule ^/schedule$ http://appserver:7080/++vh++http:www.example.com:80/schedule/++/$1 [L,P]
      RewriteRule ^/schedule/(.*+) http://appserver:7080/++vh++http:www.example.com:80/schedule/++/$1 [L,P]

so that the SchoolTool application appears under www.example.com/schedule, widget.py inserts the following script into the event editing page:

var oFCKeditor_description = new FCKeditor(
        "field.description", 430, 300, "schooltool");
    oFCKeditor_description.BasePath = "/@@/fckeditor/";
    oFCKeditor_description.Config["CustomConfigurationsPath"] = "http://www.example.com/schedule/@@/editor_config.js";

The problem is the line with "/@@/fckeditor/". It will go around the rewrite rule and try to display content from the www.example.com site.

I was able to work around the problem by adding an additional rule:
      RewriteRule ^/@@/(.*+) http://appserver:7080/++vh++http:www.example.com:80/++/@@/$1 [L,P]

Fortunately, my main site does not use "@@" in any URL's. If both sites were based on Zope3, this work around may not be feasible.

Maybe this should be a bug for Zope3 or maybe you would want to remember to add this to future deployment documentation.

Related branches

Revision history for this message
Ignas Mikalajūnas (ignas) wrote :

It seems to be zope.html doing it wrong, though I am pretty sure we can fix it on our side too. I will look at it.

Changed in schooltool:
assignee: nobody → ignas
importance: Undecided → Medium
status: New → Confirmed
tags: added: deployment
Changed in schooltool:
status: Confirmed → In Progress
assignee: Ignas Mikalajūnas (ignas) → Justas Sadzevičius (justas-pov)
Changed in schooltool:
status: In Progress → Fix Committed
milestone: none → next
Changed in schooltool:
milestone: next → 1.5.1
Changed in schooltool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers