Re: [Zope] Database conversion
--On 11. April 2008 17:12:07 -0700 Wes Modes <[EMAIL PROTECTED]> wrote: I am running Zope 2.10.5 I've just upgraded from Zope 2.7 I would like to move my database to the newly created instance. I followed the very reasonable and clear instructions here, http://svn.zope.org/*checkout*/Zope/trunk/doc/FAQ.txt (esentially, just moving the Data.fs file) However, the old data does not come up when I bring up the server again. Perhaps the old objects need conversion or some other juju? Even within the third new thread on this issue you have not told us about your "old" application. Is it core Zope? Using any third party-products? Please provide details about the things you have installed. We're not good in problem-solving-by-guessing. And please: don't create a new mail thread for followups. You have one issue and one mail thread is enough. We don't need three. Andreas pgpUteSHucpkF.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Database conversion
I am running Zope 2.10.5 I've just upgraded from Zope 2.7 I would like to move my database to the newly created instance. I followed the very reasonable and clear instructions here, http://svn.zope.org/*checkout*/Zope/trunk/doc/FAQ.txt (esentially, just moving the Data.fs file) However, the old data does not come up when I bring up the server again. Perhaps the old objects need conversion or some other juju? Any suggestions? W. -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Critical System Hosed, Plan B - upgrade zope, convert db
Okay, I accept that Zope is a mysterious god that requires sacrifice. And I wasn't able to solve the mysteries of how to get it up and running again with my old data after an unintentional "upgrade." However... I can upgrade Python from 2.4.2 to 2.4.4 and upgrade Zope from 2.7.2 to 2.10.5, get that working, and then hopefully convert my old data. I can handle the python and zope upgrades, but have no idea how to take my old zope database and use it with my brand new zope installation. Any ideas? Wes -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
have you used locate or any other utility to make sure you only have one Zope installed, like "locate zope.conf" ? Thomas On Friday 11 April 2008 15:14, Wes Modes wrote: > Better yet, here's a more informative debug output. It tells me that > zope thinks this is a new instance. Though the old database is it place > right where it should expect to see it. > > [EMAIL PROTECTED] zope]# bin/zopectl debug* > Starting debugger (the name "app" is bound to the top-level Zope > object) 2008-04-11 12:04:05 WARNING Init Class > Products.HappySession.HappySession.HappySession has a security > declaration for nonexistent method 'manage_menu' > [snipped a bunch of warnings...] > > *>>> import Zope, ZPublisher* > > *>>> ZPublisher.Zope('')* > > Status: 200 OK > X-Powered-By: Zope (www.zope.org), Python (www.python.org) > Content-Length: 4066 > Content-Type: text/html > > [snipped a bunch of html and helpful info] > Zope Quick Start > You have not created any users in this Zope instance. In order to > log in and manage this Zope instance, you'll need to add an > adminstrative > user account. > > If you're running Zope on UNIX or Linux, you can create an > administrative > user account via the "zopectl adduser" command from a shell. > Note: You'll > need to shut Zope itself down before "zopectl adduser" will work. > Restart > Zope after executing this command in order to log in. > > WARNING: you are running Zope 2.8.X with python 2.4.X, this is not a > supported > combination. Don't file bugreports or ask for support on zope.org. > > > > > And apparently, I'm running 2.8.7 not 2.7.2 as I thought. And I'm not > supposted to ask you for help. Help! > > W. > > > Dieter Maurer wrote: > >> Dieter Maurer wrote at 2008-4-11 19:13 +0200: > >>> Wes Modes wrote at 2008-4-10 21:04 -0700: > I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. > Honestly I'm not sure what the previous version I was running was (nor > am I sure how to find out). > > Now, every page results in > > Site Error > An error was encountered while publishing this resource. > Resource not found > Sorry, the requested resource does not exist. > Check the URL and try again. > Resource: Zope GET > >>> > >>> Difficult problems can be analyzed in interactive Python > >>> sessions. > >>> > >>> Under *nix, you start such a session with "bin/zopectl debug" > >>> (under Windows, this does not work but there are alternatives). > >>> > >>>from request import getRequest > >>>request = getRequest() > >>>obj = request.traverse('pathpart_of_your_url') > >>>obj() > >>> > >>> If authentication is required, you use > >>> > >>>from request import getAuthRequest > >>>request = getAuthRequest(user, password) > >>> > >>> > >>> If there are problems, you use "pdb.pm()" (or "dm.pdb.zpbd.pm()" > >>> for better Zope support) to analyse them. > >> > >> I forgot. You can download "request.py" from > >> > >> http://www.dieter.handshake.de/pyprojects/zope/request.py > >> > >> > >> In order to get rid of a deprecation warning, you must replace "Zope" > >> with "Zope2". > > > > -- > > > > Wes Modes > > Server Administrator & Programmer Analyst > > McHenry Library > > Computing & Network Services > > Information and Technology Services > > 459-5208 > > > > > > ___ > > Zope maillist - Zope@zope.org > > http://mail.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://mail.zope.org/mailman/listinfo/zope-announce > > http://mail.zope.org/mailman/listinfo/zope-dev ) -- Thomas McMillan Grant Bennett Appalachian State University Operations & Systems AnalystP O Box 32026 University Library Boone, North Carolina 28608 (828) 262 6587 "... using OpenOffice.org, and save them back to disk automatically, in MS Word format. They surf the Web, check e-mail, do instant messsaging, view YouTube videos, visit their Facebook pages, learn touch-typing skills and lots more. Our public library has been offering these Linux public stations for the past three years." - Phil Shapiro Linux Journal January 2008 Library Systems Help Desk: https://www.library.appstate.edu/help/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
Better yet, here's a more informative debug output. It tells me that zope thinks this is a new instance. Though the old database is it place right where it should expect to see it. [EMAIL PROTECTED] zope]# bin/zopectl debug* Starting debugger (the name "app" is bound to the top-level Zope object) 2008-04-11 12:04:05 WARNING Init Class Products.HappySession.HappySession.HappySession has a security declaration for nonexistent method 'manage_menu' [snipped a bunch of warnings...] *>>> import Zope, ZPublisher* *>>> ZPublisher.Zope('')* Status: 200 OK X-Powered-By: Zope (www.zope.org), Python (www.python.org) Content-Length: 4066 Content-Type: text/html [snipped a bunch of html and helpful info] Zope Quick Start You have not created any users in this Zope instance. In order to log in and manage this Zope instance, you'll need to add an adminstrative user account. If you're running Zope on UNIX or Linux, you can create an administrative user account via the "zopectl adduser" command from a shell. Note: You'll need to shut Zope itself down before "zopectl adduser" will work. Restart Zope after executing this command in order to log in. WARNING: you are running Zope 2.8.X with python 2.4.X, this is not a supported combination. Don't file bugreports or ask for support on zope.org. And apparently, I'm running 2.8.7 not 2.7.2 as I thought. And I'm not supposted to ask you for help. Help! W. Dieter Maurer wrote: Dieter Maurer wrote at 2008-4-11 19:13 +0200: Wes Modes wrote at 2008-4-10 21:04 -0700: I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. Honestly I'm not sure what the previous version I was running was (nor am I sure how to find out). Now, every page results in Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: Zope GET Difficult problems can be analyzed in interactive Python sessions. Under *nix, you start such a session with "bin/zopectl debug" (under Windows, this does not work but there are alternatives). from request import getRequest request = getRequest() obj = request.traverse('pathpart_of_your_url') obj() If authentication is required, you use from request import getAuthRequest request = getAuthRequest(user, password) If there are problems, you use "pdb.pm()" (or "dm.pdb.zpbd.pm()" for better Zope support) to analyse them. I forgot. You can download "request.py" from http://www.dieter.handshake.de/pyprojects/zope/request.py In order to get rid of a deprecation warning, you must replace "Zope" with "Zope2". -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
- Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: "Dieter Maurer" <[EMAIL PROTECTED]>; Sent: Friday, April 11, 2008 1:44 PM Subject: Re: [Zope] Upgrade to 2.7.2 results in all content unavailable 2008-04-11 10:36:54 ERROR ZODB.lock_file Error locking file /var/lib/zope/var/Data.fs.lock Traceback (most recent call last): File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 63, in __init__ lock_file(self._fp) File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 42, in lock_file fcntl.flock(file.fileno(), _flags) IOError: [Errno 11] Resource temporarily unavailable Make sure you have read/write access to the /var/lib/zope/var directory and that is 'owned' by 'zope' Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
Here's what I get in interactive python. I tried this earlier thanks to http://www.zope.org/Documentation/Books/ZDG/current/TestingAndDebugging.stx [EMAIL PROTECTED] zope]# bin/zopectl debug* Starting debugger (the name "app" is bound to the top-level Zope object) 2008-04-11 10:36:53 WARNING Init Class Products.HappySession.HappySession.HappySession has a security declaration for nonexistent method 'manage_menu' /usr/lib/python2.3/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) /usr/lib/zope/lib/python/Products/ZPyGreSQLDA/db.py:89: DeprecationWarning: the regex module is deprecated; please use the re module import _pg, regex, sys, types /usr/lib/zope/lib/python/Products/ZpdfDocument/ZpdfDocument.py:52: DeprecationWarning: Non-ASCII character '\xe2' in file /usr/lib/zope/lib/python/Products/ZpdfDocument/pdflib.py on line 355, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details import pdflib,elements 2008-04-11 10:36:54 WARNING Init Ambiguous name for method of Products.ZpdfDocument.ZpdfDocument.ZpdfDocument: 'manage' != 'manage_main' 2008-04-11 10:36:54 WARNING Init Ambiguous name for method of Products.ZpdfDocument.ZpdfDocument.ZpdfDocument: 'manage' != 'manage_editDocument' 2008-04-11 10:36:54 WARNING Init Ambiguous name for method of Products.ZpdfDocument.ZpdfDocument.ZpdfDocument: 'manage' != 'manage_editForm' 2008-04-11 10:36:54 ERROR ZODB.lock_file Error locking file /var/lib/zope/var/Data.fs.lock Traceback (most recent call last): File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 63, in __init__ lock_file(self._fp) File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 42, in lock_file fcntl.flock(file.fileno(), _flags) IOError: [Errno 11] Resource temporarily unavailable Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/zope/lib/python/Zope2/__init__.py", line 51, in app startup() File "/usr/lib/zope/lib/python/Zope2/__init__.py", line 47, in startup _startup() File "/usr/lib/zope/lib/python/Zope2/App/startup.py", line 57, in startup DB = configuration.dbtab.getDatabase('/', is_root=1) File "/usr/lib/zope/lib/python/DBTab/DBTab.py", line 96, in getDatabase db = self._createDatabase(name, is_root) File "/usr/lib/zope/lib/python/DBTab/DBTab.py", line 113, in _createDatabase db = factory.open() File "/usr/lib/zope/lib/python/Zope2/Startup/datatypes.py", line 163, in open DB = self.createDB() File "/usr/lib/zope/lib/python/Zope2/Startup/datatypes.py", line 160, in createDB return ZODBDatabase.open(self) File "/usr/lib/zope/lib/python/ZODB/config.py", line 97, in open storage = section.storage.open() File "/usr/lib/zope/lib/python/ZODB/config.py", line 133, in open quota=self.config.quota) File "/usr/lib/zope/lib/python/ZODB/FileStorage/FileStorage.py", line 112, in __init__ self._lock_file = LockFile(file_name + '.lock') File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 63, in __init__ lock_file(self._fp) File "/usr/lib/zope/lib/python/ZODB/lock_file.py", line 42, in lock_file fcntl.flock(file.fileno(), _flags) IOError: [Errno 11] Resource temporarily unavailable >>> from request import getRequest Traceback (most recent call last): File "", line 1, in ? ImportError: No module named request *>>> import Zope2, ZPublisher* *>>> ZPublisher.Zope('/')* /usr/lib/zope/lib/python/ZPublisher/Publish.py:247: DeprecationWarning: The Zope package has been renamed to Zope2. Import of a package named 'Zope' is deprecated and will be disabled starting in Zope 2.11. module=__import__(module_name, g, g, ('__doc__',)) Status: 200 OK X-Powered-By: Zope (www.zope.org), Python (www.python.org) Content-Length: 0 *>>> ZPublisher.Zope('/manage')* Status: 404 Not Found X-Powered-By: Zope (www.zope.org), Python (www.python.org) Bobo-Exception-Line: 644 Content-Length: 868 Bobo-Exception-Value: See the server error log for details Content-Type: text/html Bobo-Exception-Type: zExceptions.NotFound Bobo-Exception-File: HTTPResponse.py Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist.Check the URL and try again.Resource: http://127.0.0.1/Zope/manage Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an e
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
Yeah, so when I said "all content," I really meant it. There is nothing through the web interface that does not result in *Site Error * An error was encountered while publishing this resource. *Resource not found* Sorry, the requested resource does not exist. Check the URL and try again. *Resource:* Zope GET Including the ZMI. I imagine this is something simple, but I can't imagine what it is. I can sysadmin my way out of a paper bag, but when it comes to Zope I'm a n00b. W. Jonathan wrote: - Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: "Jonathan" <[EMAIL PROTECTED]> Sent: Friday, April 11, 2008 12:52 PM Subject: Re: [Zope] Upgrade to 2.7.2 results in all content unavailable Jonathan, thanks for writing. Please pardon my zope ignorance. "What happens when you try to access any of the problem objects via the ZMI? " How would I do this? Wes You typically access the Zope Management Interface (ZMI) by going the url for your zope-based web site with '/manage'. eg. www.myzopesite.com/manage You will then be asked for a username and password (if you don't have this information, you need to use the 'emergency user' - google for 'zope emergency user'). You may also want to look at the Zope Book... http://www.plope.com/Books/2_7Edition - i don't know if this is the most recent version, but it is a good starting point. Jonathan -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
Dieter Maurer wrote at 2008-4-11 19:13 +0200: >Wes Modes wrote at 2008-4-10 21:04 -0700: >>I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. >>Honestly I'm not sure what the previous version I was running was (nor >>am I sure how to find out). >> >>Now, every page results in >> >>Site Error >>An error was encountered while publishing this resource. >>Resource not found >>Sorry, the requested resource does not exist. >>Check the URL and try again. >>Resource: Zope GET > >Difficult problems can be analyzed in interactive Python >sessions. > >Under *nix, you start such a session with "bin/zopectl debug" >(under Windows, this does not work but there are alternatives). > >from request import getRequest >request = getRequest() >obj = request.traverse('pathpart_of_your_url') >obj() > >If authentication is required, you use > >from request import getAuthRequest >request = getAuthRequest(user, password) > > >If there are problems, you use "pdb.pm()" (or "dm.pdb.zpbd.pm()" >for better Zope support) to analyse them. I forgot. You can download "request.py" from http://www.dieter.handshake.de/pyprojects/zope/request.py In order to get rid of a deprecation warning, you must replace "Zope" with "Zope2". -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
Wes Modes wrote at 2008-4-10 21:04 -0700: >I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. >Honestly I'm not sure what the previous version I was running was (nor >am I sure how to find out). > >Now, every page results in > >Site Error >An error was encountered while publishing this resource. >Resource not found >Sorry, the requested resource does not exist. >Check the URL and try again. >Resource: Zope GET Difficult problems can be analyzed in interactive Python sessions. Under *nix, you start such a session with "bin/zopectl debug" (under Windows, this does not work but there are alternatives). from request import getRequest request = getRequest() obj = request.traverse('pathpart_of_your_url') obj() If authentication is required, you use from request import getAuthRequest request = getAuthRequest(user, password) If there are problems, you use "pdb.pm()" (or "dm.pdb.zpbd.pm()" for better Zope support) to analyse them. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
- Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: "Jonathan" <[EMAIL PROTECTED]> Sent: Friday, April 11, 2008 12:52 PM Subject: Re: [Zope] Upgrade to 2.7.2 results in all content unavailable Jonathan, thanks for writing. Please pardon my zope ignorance. "What happens when you try to access any of the problem objects via the ZMI? " How would I do this? Wes You typically access the Zope Management Interface (ZMI) by going the url for your zope-based web site with '/manage'. eg. www.myzopesite.com/manage You will then be asked for a username and password (if you don't have this information, you need to use the 'emergency user' - google for 'zope emergency user'). You may also want to look at the Zope Book... http://www.plope.com/Books/2_7Edition - i don't know if this is the most recent version, but it is a good starting point. Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Critical system hosed (was: Upgrade to 2.7.2 results in all content unavailable)
Nope. No errors, with zopectl or in event.log. Starts happily, though clearly not pointing at my old content. Though it would seem /var/lib/zope/etc/zope.conf has the following correctly defined: %define INSTANCE /var/lib/zope %define ZOPE /usr/lib/zope instancehome $INSTANCE And my data files appear to be at /var/lib/zope/var/Data.fs with appropriate permissions and ownership. The file hasn't been touched since the time I did the upgrade, though the lock file in the same directory has. Still though, I get the "Resource not found" screen from every page I attempt to access. The university library relies on zope, so getting this fixed is the highest priority. As for why version 2.7.2? Well, I didn't intend to update at all, but an errant up2date, the RHEL rpm updater, did it for me. And since the previous sysadmin built it from source and possibly put some things in non-standard places, disaster strikes. And 2.7.2 was apparently the highest version for which rpms were available. I am concerned that an upgrade to the latest version would take days (maybe weeks) of work to reconcile differences, and resolve problems and dependencies. And worse case, it might never see all our zope data again. The highest priority here is to get it working ASAP. W. Martijn Jacobs wrote: And do you see any errors when starting zope with zopectl fg ? (or do you see any errors in the log/event.log file?) - Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: Sent: Friday, April 11, 2008 12:04 AM Subject: [Zope] Upgrade to 2.7.2 results in all content unavailable I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. Honestly I'm not sure what the previous version I was running was (nor am I sure how to find out). Now, every page results in Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: Zope GET What version of zope did you upgrade from? What happens when you try to access any of the problem objects via the ZMI? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Wes Modes Server Administrator & Programmer Analyst McHenry Library Computing & Network Services Information and Technology Services 459-5208 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] retrieving a single column from database and giving it as hyper link fetching respective data
On Friday 11 April 2008 01:02, member madhangc wrote: > Dear all, > > I'm developing a biological database using Zope 2.6 and pgsql. Let me > explain my issue with an example. There is a menu called Drug in my > homepage, by clicking the menu the drug names along with their type in two > different columns get displayed in the body. I can do things till that. My > problem is , lets say there is a link called "Isoniazid" with all other > links(drug names) in it. When a user clicks one of the links as i said > before as "isoniazid" only the information about isoniazid has to be > retreived and displayed , likewise to all the other drug links. I have no > idea how to capture the click event and the data to be retrieved. Can > someone help. Thanks in advance. From your description I can't tell if you are already populating the two column page from a database or if it is a static html page. If I understand your issue correctly you can do all this with your database. You may have to add more columns to provide the interaction you need. I have a similar situation with a three column subjects page where clicking on each subject brings up a page with a list of online databases and descriptions for each. Within each description is a link to the online database. Again, if I understand your issue, have your two column page be created from a db that contains the a record number and the drug name. That template can build a link based on the record number to another template and the second template would query the database for a description field or whatever. so the first page would build its contents sorta like this. same thing can be done in pagetemplates. You can see my example at http://www.library.appstate.edu/vdb/subjectgeneral05.html The list of subjects comes from a database and there are three select statements to make the three columns, select the first third, second third, and then the last third and use css. Each subject link to another template that selects data from the main table based on subject table's related field. And, on that second page you can narrow down the results by media type such as book, newspaper, audio, etc. which is a field in the database title table. Let me know if I misinterpreted your request, as I get older this becomes more frequent ;-) > > And another query, how can i select text from a dropdown box. I just need > the data which is selected in the dropdown box and sent as query. > > Thanks again. If you click on a letter at the top you will see a list box on the right which uses a javascript called jumpmenu and OnChange which should work or be close to what you want. There is not an action attribute for the list box and no button, the Javascript takes care of it. Thomas -- Thomas McMillan Grant Bennett Appalachian State University Operations & Systems AnalystP O Box 32026 University Library Boone, North Carolina 28608 (828) 262 6587 "... using OpenOffice.org, and save them back to disk automatically, in MS Word format. They surf the Web, check e-mail, do instant messsaging, view YouTube videos, visit their Facebook pages, learn touch-typing skills and lots more. Our public library has been offering these Linux public stations for the past three years." - Phil Shapiro Linux Journal January 2008 Library Systems Help Desk: https://www.library.appstate.edu/help/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Plone-developers] the grand reunion
hi yuri, when setting up a zope/zeo task and everything was still a bit of a challenge (at least to me) we tended to have everything in one big instance that served some 20 low traffic sites. since then setting up a site with all the tools it needs has become a trivially easy and quick to execute task. we have converted nearly all these sites to have their own instance. I would not do it differently anymore .. robert Yuri schrieb: Hi! Actually I've two Plone "working envinronment" and one zope, each in a different machine: - one, with two zope 2.9 istances (one for developing), running both multiple Plone 2.5 instances - one, with zope 2.9, running multiple Plone 2.5 instances - one, with zope 2.7.9, running zope only applications We have bought "big iron" hardware now, where I can do almost everything (with a fiber channel network storage, multiple rack servers). tipically, I use one instance to develop, and one to deploy. This mean different zope instances which shares only the base, and having different products. I would like to have an easy way to develop without having to be subject to dependencies from other envinroment, minimize the effort to mantain it and focus on doing things :) Is one big zope installation, with multiple instances, well suited for this tasks? Or is better different zope versions? What about the various Data.fs, is better to have them separated by application or by zope envinroment? I mean all the Plone in a single Data.fs or each one in a separated Data.fs? So, what is the best approach to migrate the three servers? - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Plone-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/plone-developers ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Conditional dtml-boundary in dtml-sendmail
The email library should be available to use with a Script (Python) and can be done all within the ZMI. Otherwise maybe use dtml-try? Well, I should have mentioned this: the zope installed on the server is 2.8.x. Yes, it is old, but it is because all the page uses an own CMS based on silva, which isn't compatible with newer versions. I tried this: import email and it worked; however, as soon as I tried this: from email.MIMEText import MIMEText msg = MIMEText('Sending mail through python module') or import email msg = email.MIMEText.MIMEText('Sending mail through python module') An Unauthorized exception comes. So, I guess MIMEText is protected at least on 2.8.x. But I guess in 2.11.x is protected as well, or am I wrong? Thanks for your reply. I guess there is no way of achieving what I want on dtml, so, I will try to do it an external method and try to convince people there to store it on the server or I will have to do it on my own server and embebbed it on an iframe or call an external link. Best regards Josef ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
And do you see any errors when starting zope with zopectl fg ? (or do you see any errors in the log/event.log file?) - Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: Sent: Friday, April 11, 2008 12:04 AM Subject: [Zope] Upgrade to 2.7.2 results in all content unavailable I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. Honestly I'm not sure what the previous version I was running was (nor am I sure how to find out). Now, every page results in Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: Zope GET What version of zope did you upgrade from? What happens when you try to access any of the problem objects via the ZMI? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Martijn Jacobs Four Digits, Internet Solutions a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw: 8161.22.234.B01 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Conditional dtml-boundary in dtml-sendmail
Tom Von Lahndorff wrote: How is dtml more "error-prone" than python? I'd imagine that all depends on who's authoring it. In this particular example, python's email package has a very OO approach to generating emails. Yes, that's what I hate from the dtml thing; it looks ugly :-( The DTML approach relies on you remembering to put in the right statements for the right constituent email parts in the right places. It's easy to make mistakes and generate emails that won't work with most clients. It's also harder to generate emails with the correct headers (Date, Message-ID, etc) than it should be, so you're more likely to pump out email that mtas consider to be spam. Actually, I did several mistakes: first, if you include a blank line just after finishing defining the email settings, ie: "To, From, Content-Type, etc, you will get your email, but in a format that you can't read. The second problem was with the unicode: first I got the characters wrong on the email subject, but on the mail's body were ok, then I change something and got them good on the subject, but on the body non-ascii characters were dropped. After lots of testing, I finally saw that you have to define content-type everywhere: on the mail headers and also on the text-mime contents. Then you have to encode all your strings to utf-8. The DTML approach also makes attaching files a living hell... Yep, I agree on this. You can't dynamically set the number of attachments and even if you don't submit a file on your form, zope will send an empty file with a strange name. Well, I guess I will do an external method on my own server and then try to convince the people owning the machine where the page is hosted to include it. Otherwise, my last resouce would be to embebbed the content on a iframe or call an external link to my server. Thanks anyways for your replies. Best regards Josef ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help writing test where bobobase_modification_time changes
Thanks for the tips Chris and Dieter, I actually solved it in a very simple way: from OFS.Image import File from time import time class MockFile(File): """ This file works the same as a normal File expect that in manage_edit() the internal modification time is set immediately. Normally Zope objects get their internal modification set when the transaction manager commits. """ def manage_edit(self, title, content_type, precondition='', filedata=None, REQUEST=None): # here's the mock hack, we set the _p_mtime NOW instead of letting # the transaction manager do it at the end. self._p_mtime = time() return File.manage_edit(self, title, content_type, precondition=precondition, filedata=filedata, REQUEST=REQUEST) This worked beautifully in the integration test. I'm happy. On 10/04/2008, Chris Withers <[EMAIL PROTECTED]> wrote: > Peter Bengtsson wrote: > > > How can I solve this? Make one big transaction two without having to > > use transaction.get().commit() which I don't think I can use in unit > > tests as per Dieter's advice. > > > > I'd suggest monkeypatching bobobase_modification_time on the objects you're > testing with. You're testing your cache code, not the implementation of > those objects, so replacing them with (partially) dummy objects is great for > avoiding this kind of problem and is a pattern I've used frequently... > > cheers, > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting >- http://www.simplistix.co.uk > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Upgrade to 2.7.2 results in all content unavailable
- Original Message - From: "Wes Modes" <[EMAIL PROTECTED]> To: Sent: Friday, April 11, 2008 12:04 AM Subject: [Zope] Upgrade to 2.7.2 results in all content unavailable I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope. Honestly I'm not sure what the previous version I was running was (nor am I sure how to find out). Now, every page results in Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: Zope GET What version of zope did you upgrade from? What happens when you try to access any of the problem objects via the ZMI? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: the grand reunion
Yuri wrote: Hi! Hi Yuri, [..] I would like to have an easy way to develop without having to be subject to dependencies from other envinroment, minimize the effort to mantain it and focus on doing things :) Maybe not exactly what you are asking for but I recommend you play with buildout a bit - I'm sure you'll appreciate the ease with which you can manage independent installations in a repeatable and easily modifiable way. Is one big zope installation, with multiple instances, well suited for this tasks? Or is better different zope versions? What about the various Data.fs, is better to have them separated by application or by zope envinroment? I mean all the Plone in a single Data.fs or each one in a separated Data.fs? Without further knowing how these sites might be related or not this is hard to answer but often times I prefer to have separate Zope instances (-> different ZODBs) for different Plone sites. Even if they share substantial configuration/add-ons etc. Again, using buildout makes it a snap to create and maintain as many Zope instances as you want. And using a common buildout cache they can also mostly share the basic installation. Just my 2 cents, Raphael So, what is the best approach to migrate the three servers? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Conditional dtml-boundary in dtml-sendmail
Tom Von Lahndorff wrote: How is dtml more "error-prone" than python? I'd imagine that all depends on who's authoring it. In this particular example, python's email package has a very OO approach to generating emails. The DTML approach relies on you remembering to put in the right statements for the right constituent email parts in the right places. It's easy to make mistakes and generate emails that won't work with most clients. It's also harder to generate emails with the correct headers (Date, Message-ID, etc) than it should be, so you're more likely to pump out email that mtas consider to be spam. The DTML approach also makes attaching files a living hell... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ExternalMethod - add new parameter
rishi pathak wrote: We have a portal using which users use our compute resources. In zope we use NIS authentication for validating a user.We have many things that requires root/logged in user privledeges.One example is of a 'file system explorer'.In this I have used ZFSpath product.This explorer is used by users to navigate through their home areas and select what ever file they want.As of now I have changed some functions of ZFSpath class which I was using so that they can be executed as the logged in user(since zope does not have rwx permissions on other user's directory).This is just one case.Hope I have cleared myself well. You are playing a mind numbingly dangerous game. Good luck to you, but I hope people on this list refrain from further helping you point that large canon at your left toe... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Conditional dtml-boundary in dtml-sendmail
Tom Von Lahndorff wrote: The email library should be available to use with a Script (Python) and can be done all within the ZMI. Yes, I wish it was. I believe that was one of the things I did in the MailTemplates product: just make the standard python email package bits available in Zope protected code. Still, if Josef can't get products installed, he's limited to a world of suck when it comes to email :-( cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ExternalMethod - add new parameter
hi again, Let me clarify what I am doing and what is my approach till now. We have a portal using which users use our compute resources. In zope we use NIS authentication for validating a user.We have many things that requires root/logged in user privledeges.One example is of a 'file system explorer'.In this I have used ZFSpath product.This explorer is used by users to navigate through their home areas and select what ever file they want.As of now I have changed some functions of ZFSpath class which I was using so that they can be executed as the logged in user(since zope does not have rwx permissions on other user's directory).This is just one case.Hope I have cleared myself well. On Wed, Apr 9, 2008 at 11:44 PM, Dieter Maurer <[EMAIL PROTECTED]> wrote: > rishi pathak wrote at 2008-4-8 18:03 +0530: > > I dont have a need to run all the external method as root, > only > >some of them. > > I did understand this *BUT* you do not have a choice. > > While a single ExternalMethod runs as "root", the complete > Zope process runs as root -- and this applies to all > requests which are run in parallel with your ExternalMethod. > > Please reread my former message. > > If you have touble to understand the terms "thread" and/or "process", > consult Wikipedia to get some insight. > > > ... > >On Tue, Apr 8, 2008 at 12:50 AM, Dieter Maurer <[EMAIL PROTECTED]> > wrote: > > > >> rishi pathak wrote at 2008-4-7 17:46 +0530: > >> >There is a requirement for running some external methods as super > user. > >> >For this I thought of adding a new parameter.If set the code would be > >> >executed with effective uid of root. > >> > >> This is extremely dangerous. > >> > >> To run code as super user, you need to change the effective user id. > >> Changing the effective user id affects the whole process -- not just > >> the thread executing your external method. > >> These things are very difficult to handle in a multi threaded > environment, > >> in general. > >> Moreover, running internet driven code uncontrolled as super user > >> is likely to be a big security risk. > >> > >> > >> Let your application write some command to a queue and process > >> the queue asynchronously. The processing can be performed as > >> super user. > >> > >> If this is not possible, let your application communicate > >> with another process which runs as super user -- and pass on > >> synchronous commands from your application to this process. > >> > >> In both cases, it is ensured that only the restricted command > >> set can be used to run something as super user -- and > >> not some arbitrary code > > > > -- > Dieter > -- Regards-- Rishi Pathak ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] the grand reunion
Hi! Actually I've two Plone "working envinronment" and one zope, each in a different machine: - one, with two zope 2.9 istances (one for developing), running both multiple Plone 2.5 instances - one, with zope 2.9, running multiple Plone 2.5 instances - one, with zope 2.7.9, running zope only applications We have bought "big iron" hardware now, where I can do almost everything (with a fiber channel network storage, multiple rack servers). tipically, I use one instance to develop, and one to deploy. This mean different zope instances which shares only the base, and having different products. I would like to have an easy way to develop without having to be subject to dependencies from other envinroment, minimize the effort to mantain it and focus on doing things :) Is one big zope installation, with multiple instances, well suited for this tasks? Or is better different zope versions? What about the various Data.fs, is better to have them separated by application or by zope envinroment? I mean all the Plone in a single Data.fs or each one in a separated Data.fs? So, what is the best approach to migrate the three servers? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )