I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine ... except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer. The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L"> Why? Thanks, Chris
Chris, have a read of this, it should clear everything up for you: http://www.zope.org/Members/adustman/Tips/no_el cheers, garry On 7 Nov 2001, at 16:31, Chris Gray wrote: From: Chris Gray <cpgray@library.uwaterloo.ca> To: zope@zope.org Subject: [Zope] Zope + MySQL problem Date sent: Wed, 7 Nov 2001 16:31:09 -0500 (EST)
I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine
...
except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer.
The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L">
Why?
Thanks, Chris
_______________________________________________ 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 )
+-------------------------------------------+ Garry Steedman mailto:gs@styrax.com Styrax Associates http://www.styrax.com/ "The Good Man has no shape." +-------------------------------------------+
Chris, Someone will likely tell you the answer why its returning a value as a long integer (which is what it is). I had the same problem long ago. But I've been piping the results through int for so long that I've forgotten the problem. <a href="collect_stats.html?record_id=<dtml-var "_.int(record_id)">"> Cheers, Paz Try rebuilding your database? When we went from irix6,5 to linux rh7.2 we had the same result. Come to think of it, I don't know why it doesn't occur anymore. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Chris Gray Sent: Wednesday, November 07, 2001 10:31 PM To: zope@zope.org Subject: [Zope] Zope + MySQL problem I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine ... except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer. The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L"> Why? Thanks, Chris _______________________________________________ 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 )
Thanks to Paul and Garry for their responses. I was hoping not to have to track down all instances dtml-var that call an integer from a MySQL query and edit them. I was hoping instead to track down what changed to introduce this behavior and cure it systemically. Oh well, as I once heard my supervisor sigh: "Why is _nothing_ ever easy?" Chris On Thu, 8 Nov 2001, Paul Zwarts wrote:
Chris,
Someone will likely tell you the answer why its returning a value as a long integer (which is what it is). I had the same problem long ago. But I've been piping the results through int for so long that I've forgotten the problem.
<a href="collect_stats.html?record_id=<dtml-var "_.int(record_id)">">
Cheers, Paz
Try rebuilding your database? When we went from irix6,5 to linux rh7.2 we had the same result. Come to think of it, I don't know why it doesn't occur anymore.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Chris Gray Sent: Wednesday, November 07, 2001 10:31 PM To: zope@zope.org Subject: [Zope] Zope + MySQL problem
I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine
...
except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer.
The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L">
Why?
Thanks, Chris
_______________________________________________ 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 )
Chris, Once when I was converting my 200+ method site from SQLSession to CoreSessionTracking, I exported the whole site to XML and then did a search replace in a script I wrote. But if you know emacs, you can use this too...
Oh well, as I once heard my supervisor sigh: "Why is _nothing_ ever easy?" Murphy is just another name for God....
Cheers, Paul Zwarts -----Original Message----- From: Chris Gray [mailto:cpgray@library.uwaterloo.ca] Sent: Thursday, November 08, 2001 4:28 PM To: Paul Zwarts Cc: zope@zope.org Subject: RE: [Zope] Zope + MySQL problem Thanks to Paul and Garry for their responses. I was hoping not to have to track down all instances dtml-var that call an integer from a MySQL query and edit them. I was hoping instead to track down what changed to introduce this behavior and cure it systemically. Oh well, as I once heard my supervisor sigh: "Why is _nothing_ ever easy?" Chris On Thu, 8 Nov 2001, Paul Zwarts wrote:
Chris,
Someone will likely tell you the answer why its returning a value as a long integer (which is what it is). I had the same problem long ago. But I've been piping the results through int for so long that I've forgotten the problem.
<a href="collect_stats.html?record_id=<dtml-var "_.int(record_id)">">
Cheers, Paz
Try rebuilding your database? When we went from irix6,5 to linux rh7.2 we had the same result. Come to think of it, I don't know why it doesn't occur anymore.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Chris Gray Sent: Wednesday, November 07, 2001 10:31 PM To: zope@zope.org Subject: [Zope] Zope + MySQL problem
I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine
...
except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer.
The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L">
Why?
Thanks, Chris
_______________________________________________ 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 )
Chris, you can cure it "systemically" by moving to a more recent pyhton release... of course this might not be an option... cheers, G On 8 Nov 2001, at 10:27, Chris Gray wrote: From: Chris Gray <cpgray@library.uwaterloo.ca> To: Paul Zwarts <paz@oratrix.com> Copies to: zope@zope.org Subject: RE: [Zope] Zope + MySQL problem Date sent: Thu, 8 Nov 2001 10:27:58 -0500 (EST)
Thanks to Paul and Garry for their responses.
I was hoping not to have to track down all instances dtml-var that call an integer from a MySQL query and edit them. I was hoping instead to track down what changed to introduce this behavior and cure it systemically.
Oh well, as I once heard my supervisor sigh: "Why is _nothing_ ever easy?"
Chris
On Thu, 8 Nov 2001, Paul Zwarts wrote:
Chris,
Someone will likely tell you the answer why its returning a value as a long integer (which is what it is). I had the same problem long ago. But I've been piping the results through int for so long that I've forgotten the problem.
<a href="collect_stats.html?record_id=<dtml-var "_.int(record_id)">">
Cheers, Paz
Try rebuilding your database? When we went from irix6,5 to linux rh7.2 we had the same result. Come to think of it, I don't know why it doesn't occur anymore.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Chris Gray Sent: Wednesday, November 07, 2001 10:31 PM To: zope@zope.org Subject: [Zope] Zope + MySQL problem
I have a working Zope site that I want to move to a more powerful machine. I've set up the new machine (Debian GNU/Linux). I've moved Data.fs and everything looks fine. I've dumped the mysql database and reloaded it and everything looks fine
...
except a query to the MySQL database that retrieves an integer record id value now retrieves it with the suffixed 'L' for a python long integer. This 'L' goes into a URL and breaks the next step in the process since Zope gives an error that '1727L' (or whatever) is not a proper integer.
The code is basically the following inside a dtml-in loop on a database query: <a href="collect_stats.html?record_id=&dtml-record_id;"> This used to render as: <a href="collect_stats.html?record_id=1727"> and now renders as: <a href="collect_stats.html?record_id=1727L">
Why?
Thanks, Chris
_______________________________________________ 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 )
_______________________________________________ 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 )
+-------------------------------------------+ Garry Steedman mailto:gs@styrax.com Styrax Associates http://www.styrax.com/ "The Good Man has no shape." +-------------------------------------------+
participants (3)
-
Chris Gray -
Garry Steedman -
Paul Zwarts