External Editor on Win32 -- downloading files with .html extension
Hi Casey, cc: hi All (on the list), I like your ExternalEditor product! It's really cool! I'am working under Win2k with Zope 2.5.1 and ExternalEditor 0.3. I have some problems editing object externaly. I could not solve them by reading the documenttaion or the mailing list. Netscape 4.79 ------------- With NS 4.79 it works as expected as long as zope objects do not have well known extensions like 'html'. I have to set the 'html' extension on objects because I'm working also with dreamweaver (via ftp/WebDAV). What happens if I click on the pencil icon of an object **with** .html as extension: NS 4.79 opens a alert box asking if the file has to be opened with mozilla.exe or saved to disk. (mozilla is my default browser for html-files) Seems to be a browser problem. The http headers of a file with or without a html extension are the same (I looked at them with tcpwatch). NS 4.79 Config: Application (correct IMO) Extension: ZOPE MIME type: application/x-zope-edit Handled by Application: d:\prog\Python22x\pythonw.exe D:\prog\ZopeEdit\zopeedit.py "%1" "%s" Mozilla ------- With Mozilla (1.0rc1) It doesn't even work to edit files without extensions. Instead I get the follwoing message box (it seems to be a mozilla box): Opening login_form.html <temp path>/login_form.html could not be opened, because an unknown error occured. Sorry about that. Try saving to disk first and then opening the file. The file containing the authentification information can be found in the temp directory (wasn't cleared). Mozille 1.0rc1 Config: Helper Applications (correct IMO) Extension: zope MIME type: application/x-zope-edit Handled by Application: d:\prog\Python22x\pythonw.exe D:\prog\ZopeEdit\zopeedit.py "%1" If you send me some instructions I woudl assist in finding the problems. Greetings, Greg ------------------------------------------------------------------------------- ExternalEditor ini file: # Zope External Editor helper application configuration [general] # General configuration options # Uncomment and specify an editor value to override the editor # specified in the environment editor = d:\prog\pfe32\pfe32.exe /m # editor = d:\winnt\system32\notepad.exe # works! # Automatic save interval, in seconds. Set to zero for # no auto save (save to Zope only on exit). save_interval = 1 # Temporary file cleanup. Set to false for debugging or # to waste disk space. Note: setting this to false is a # security risk to the zope server cleanup_files = 1 # Use WebDAV locking to prevent concurrent editing by # different users. Disable for single user use or for # better performance use_locks = 1 # Specific settings by content-type or meta-type. Specific # settings override general options above. Content-type settings # override meta-type settings for the same option. [meta-type:DTML Document] extension=.dtml [meta-type:DTML Method] extension=.dtml [meta-type:Script (Python)] extension=.py [meta-type:Page Template] extension=.pt [meta-type:Z SQL Method] extension=.sql [content-type:text/*] extension=.txt [content-type:text/html] editor = d:\prog\pfe32\pfe32.exe /m # this was only a try - didn't help [content-type:text/html] extension=.html [content-type:text/xml] extension=.xml [content-type:image/*] editor = D:\prog\PaintShopPro6\Psp.exe [content-type:image/gif] extension=.gif [content-type:image/jpeg] extension=.jpg [content-type:image/png] extension=.png _____________________________________ Grégoire Weber mailto:gregoire.weber@switzerland.org
I'm not sure you need the "%1" at the end for Netscape or Mozilla. Try getting rid of it in the Mozilla config especially. I doubt that will help Netscape. I'm a bit surprised that Netscape is sensitive to file extensions like that. weird. But try changing its config to omit the "%1" anyhow. I didn't test NS 4.x on Windows, but I will and I'll see if I can make it behave. -Casey On Mon, 2002-06-17 at 08:03, Grégoire Weber wrote:
Hi Casey, cc: hi All (on the list),
I like your ExternalEditor product! It's really cool!
I'am working under Win2k with Zope 2.5.1 and ExternalEditor 0.3.
I have some problems editing object externaly. I could not solve them by reading the documenttaion or the mailing list.
Netscape 4.79 -------------
With NS 4.79 it works as expected as long as zope objects do not have well known extensions like 'html'.
I have to set the 'html' extension on objects because I'm working also with dreamweaver (via ftp/WebDAV).
What happens if I click on the pencil icon of an object **with** .html as extension:
NS 4.79 opens a alert box asking if the file has to be opened with mozilla.exe or saved to disk. (mozilla is my default browser for html-files)
Seems to be a browser problem. The http headers of a file with or without a html extension are the same (I looked at them with tcpwatch).
NS 4.79 Config: Application (correct IMO)
Extension: ZOPE MIME type: application/x-zope-edit Handled by Application: d:\prog\Python22x\pythonw.exe D:\prog\ZopeEdit\zopeedit.py "%1" "%s"
Mozilla -------
With Mozilla (1.0rc1) It doesn't even work to edit files without extensions. Instead I get the follwoing message box (it seems to be a mozilla box):
Opening login_form.html
<temp path>/login_form.html could not be opened, because an unknown error occured. Sorry about that. Try saving to disk first and then opening the file.
The file containing the authentification information can be found in the temp directory (wasn't cleared).
Mozille 1.0rc1 Config: Helper Applications (correct IMO)
Extension: zope MIME type: application/x-zope-edit Handled by Application: d:\prog\Python22x\pythonw.exe D:\prog\ZopeEdit\zopeedit.py "%1"
If you send me some instructions I woudl assist in finding the problems.
Greetings, Greg
------------------------------------------------------------------------------- ExternalEditor ini file:
# Zope External Editor helper application configuration
[general] # General configuration options
# Uncomment and specify an editor value to override the editor # specified in the environment editor = d:\prog\pfe32\pfe32.exe /m # editor = d:\winnt\system32\notepad.exe # works!
# Automatic save interval, in seconds. Set to zero for # no auto save (save to Zope only on exit). save_interval = 1
# Temporary file cleanup. Set to false for debugging or # to waste disk space. Note: setting this to false is a # security risk to the zope server cleanup_files = 1
# Use WebDAV locking to prevent concurrent editing by # different users. Disable for single user use or for # better performance use_locks = 1
# Specific settings by content-type or meta-type. Specific # settings override general options above. Content-type settings # override meta-type settings for the same option.
[meta-type:DTML Document] extension=.dtml
[meta-type:DTML Method] extension=.dtml
[meta-type:Script (Python)] extension=.py
[meta-type:Page Template] extension=.pt
[meta-type:Z SQL Method] extension=.sql
[content-type:text/*] extension=.txt
[content-type:text/html] editor = d:\prog\pfe32\pfe32.exe /m # this was only a try - didn't help
[content-type:text/html] extension=.html
[content-type:text/xml] extension=.xml
[content-type:image/*] editor = D:\prog\PaintShopPro6\Psp.exe
[content-type:image/gif] extension=.gif
[content-type:image/jpeg] extension=.jpg
[content-type:image/png] extension=.png _____________________________________ Grégoire Weber mailto:gregoire.weber@switzerland.org
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hy Casey, hi Juergen, My conclusion after hours of testing: It seems that integration of NS and Mozilla into Win2k is not really good or Win2k has problems.
I'm not sure you need the "%1" at the end for Netscape or Mozilla.
I tried it with and without in NS and Moz and Win2k-Config. Without success.
How did you setup the application/x-zope-edit MIME type in win2k?
Action: Open D:\prog\Python22x\pythonw.exe D:\prog\ZopeEdit\zopeedit.py "%1" Should be correct. Tried the same also without "%1". NS 4.79 works (+/-) ------------------- It seems that the system file extension config and the config in NS and the config in Mozilla influence each other in a not so transparent manner :-(. In NS 4.79 I'am able now to open all types of objects independantly of the extension. In NS I see two Helper Applications configured. One coming from the system and one obviously coming from Mozilla (Now 1.0). Name: Zope External Editor (from system, not seen by Mozilla) Extension: zope Mime: -- App: d:\prog\Python22x\pythonw.exe d:\prog\ZopeEdit\zopeedit.py "%1" Name: Zoepedit File (from Mozilla, not seen by system) Extension: -- Mime: application/x-zope-edit App: d:\prog\Python22x\pythonw.exe d:\prog\ZopeEdit\zopeedit.py Normaly it is not possible to configure a Helper App without extension (System and NS 4.79). In Mozilla you can specify the extension but you don't have to. Mozilla 1.0 ----------- Mozilla saves the file into the temp directory but zopeedit.py seems not to be started. I even see a short flickering of the download window. If I start zopeedit.py manualy with the saved file the editor gets started. Duncan: If you like me doing some tests file me your instructions or code to make the tests. Greetings, Greg _____________________________________ Grégoire Weber mailto:gregoire.weber@switzerland.org
Hi Grégoire, How did you setup the application/x-zope-edit MIME type in win2k? Regards, Juergen --On Montag, 17. Juni 2002 14:03 +0200 Grégoire Weber <gregoire.weber@switzerland.org> wrote:
Hi Casey, cc: hi All (on the list),
I like your ExternalEditor product! It's really cool!
I'am working under Win2k with Zope 2.5.1 and ExternalEditor 0.3.
I have some problems editing object externaly. I could not solve them by reading the documenttaion or the mailing list.
On Tue, 2002-06-18 at 04:17, Juergen R. Plasser / Hexagon wrote:
Hi Grégoire,
How did you setup the application/x-zope-edit MIME type in win2k?
Regards, Juergen
Unfortunately, you don't 8^(. MS Kindly removed that field from the user interface on Win2k/XP (which has moved to Tools > Folder Options). The next release will have a setup script to do it for you. For now either hack the registry or use Mozilla (or upgrade to a posix OS of your choice... ;^) -Casey
participants (3)
-
Casey Duncan -
Grégoire Weber -
Juergen R. Plasser / Hexagon