From christopher.beck at emory.edu Fri May 2 14:16:21 2008 From: christopher.beck at emory.edu (Chris Beck) Date: Fri, 2 May 2008 15:16:21 -0400 Subject: [SPT/CWIS] viewing of resources by user type Message-ID: <00c601c8ac89$01d6a3c0$0583eb40$@beck@emory.edu> The new version of CWIS allows Per-Field User Permission Names. This allows the administrator to define different user types so that different users can see different fields in a record. I would like to set up different user types and make certain resources available to the different types. The same fields would be viewable by all types, just certain users couldn't view all of the resources. Is there a way to do this? Thanks, Chris -- Dr. Christopher Beck Department of Biology Emory University 1510 Clifton Rd. Atlanta, GA 30322 Email: christopher.beck at emory.edu Phone: 404-712-9012 FAX: 404-727-2880 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080502/1af70158/attachment.html From ealmasy at scout.wisc.edu Mon May 5 16:29:30 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Mon, 5 May 2008 16:29:30 -0500 Subject: [SPT/CWIS] CWIS 1.5.0 Released In-Reply-To: <0EDA935F3B86D04E8408C7BC487B8C0E0371F478@hqexch3.hhmi.org> References: <0EDA935F3B86D04E8408C7BC487B8C0E0371F478@hqexch3.hhmi.org> Message-ID: On Apr 25, 2008, at 2:14 PM, Kucera, Rich wrote: > Looking great so far! > Have you guys modified jquery? In what ways have you integrated it? Glad to hear the new release is working well for you. At this point we're using jQuery primarily to support some of the new interactive functionality that was added to speed up and streamline resource record adding/editing. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From ealmasy at scout.wisc.edu Mon May 5 16:42:15 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Mon, 5 May 2008 16:42:15 -0500 Subject: [SPT/CWIS] URL overrides of SysConfig In-Reply-To: <0EDA935F3B86D04E8408C7BC487B8C0E0371F82D@hqexch3.hhmi.org> References: <0EDA935F3B86D04E8408C7BC487B8C0E0371F82D@hqexch3.hhmi.org> Message-ID: On Apr 30, 2008, at 9:38 AM, Kucera, Rich wrote: > Is there an easy way to override some of the settings in $SysConfig > from > values given in the URL? Below is a patch to do that. I would be very hesitant to incorporate code that allows all of the configuration values to be overridden via values included in the URL, as it will very likely open up your system to "injection" attacks, and at minimum takes control of many of the system configuration options out of your hands. > I needed to be able to change the UI/Theme > without having to log in and without having to set the entire > default UI to > the target UI. (Once control is passed to the target UI, all links > can add > the override, keeping the system returning to that UI without a > login). You want the UI set on a per-user basis? Or for it to change for all users at once? As much as we've been trying to move to REST-style stateless operation, setting the UI on a per-user basis for users that aren't logged in strikes me as something that should be handled by storing something in the user environment (presumably directly or indirectly via a cookie); appending a UI value to all internal links is probably going to be an ongoing headache to maintain. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From ealmasy at scout.wisc.edu Mon May 5 17:45:27 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Mon, 5 May 2008 17:45:27 -0500 Subject: [SPT/CWIS] viewing of resources by user type In-Reply-To: <00c601c8ac89$01d6a3c0$0583eb40$@beck@emory.edu> References: <00c601c8ac89$01d6a3c0$0583eb40$@beck@emory.edu> Message-ID: <5578C0E1-9204-43F4-8AF6-6C2109B6F433@scout.wisc.edu> On May 2, 2008, at 2:16 PM, Chris Beck wrote: > The new version of CWIS allows Per-Field User Permission Names. > This allows the administrator to define different user types so that > different users can see different fields in a record. I would like > to set up different user types and make certain resources available > to the different types. The same fields would be viewable by all > types, just certain users couldn?t view all of the resources. Is > there a way to do this? > Unfortunately there isn't any easy way to do this with the current version of the software; there are a lot of places where resources records are processed in bulk, and we chose to hard code the filtering of entire records to be tied to the "Release Flag" field for performance reasons. That said, it's clear there are situations like yours where this would be a very valuable capability, and the hardware most sites are running on has a lot more horsepower than it did a few years ago, so I think this is something we'll revisit soon. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From ealmasy at scout.wisc.edu Mon May 5 17:59:09 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Mon, 5 May 2008 17:59:09 -0500 Subject: [SPT/CWIS] Boolean Operators In-Reply-To: <0JZB00I05KWKZWD0@ldap-s3.unimi.net> References: <0JZB00I05KWKZWD0@ldap-s3.unimi.net> Message-ID: On Apr 14, 2008, at 9:45 AM, Carola Della Porta wrote: > Form what I have learned so far about SPT / CWIS, you can search > with Boolean operator AND (default or plus sign: + ) and operator > NOT (dash sign: -), but not with operator OR. > Is it possible to customize SPT/CWIS to implemented it? This isn't exactly what you're asking about, but is closely related: In addition to "-" and "+" operators, OSMASE (the underlying search engine in SPT and CWIS) also supports the "~" operator to indicate terms that are not required but should be considered. This can come in very handy when doing a search that returns a lot of records, as it will bring those that mention the optional terms to the top (or at least higher in the search results) without discarding other records that don't contain those terms but may still be relevant. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From Kucerar at hhmi.org Tue May 6 08:42:23 2008 From: Kucerar at hhmi.org (Kucera, Rich) Date: Tue, 6 May 2008 09:42:23 -0400 Subject: [SPT/CWIS] URL overrides of SysConfig In-Reply-To: Message-ID: <0EDA935F3B86D04E8408C7BC487B8C0E0371FD79@hqexch3.hhmi.org> > I would be very hesitant to incorporate code that allows all of the > configuration values to be overridden via values included in the URL, > as it will very likely open up your system to "injection" attacks, and > at minimum takes control of many of the system configuration options > out of your hands. [R >> ] Good point. Will restrict to only the options I need. Though I didn't see anything in there that looked harmful. Will look again. > You want the UI set on a per-user basis? Or for it to change for all > users at once? [R >> ] All users regardless. I need the flexibility based on URL. > > As much as we've been trying to move to REST-style stateless > operation, setting the UI on a per-user basis for users that aren't > logged in strikes me as something that should be handled by storing > something in the user environment (presumably directly or indirectly > via a cookie); appending a UI value to all internal links is probably > going to be an ongoing headache to maintain. [R >> ] I didn't mention for my case this is a very simple external interface handled via remote smarty templates. This is a case where a 3rd party is constructing templates according to their document model with runtime dependencies on their Apache/SSI/CGI. I can't have the whole thing inside CWIS. I simply deleted everything in StartPage, EndPage, Advanced and AdvancedSearch, get template variables from the CWIS components and grab the remote template over http. In some cases I imagine it can be pretty fine-grained with CWIS callbacks calling remote templates to get snippets. I couldn't imagine doing this without CacheLite though...it is slow. The PHP/CWIS/Smarty solution also has to demonstrate advantages over other frameworks/languages. On the contrary by doing this I'm looking to remove an ongoing maintenance headache. -Rich From cbeck at emory.edu Thu May 8 07:35:54 2008 From: cbeck at emory.edu (Christopher Beck) Date: Thu, 08 May 2008 08:35:54 -0400 Subject: [SPT/CWIS] Order within a controlled name field Message-ID: <20080508083554.d9yhk3zeckwsk40s@webmail.service.emory.edu> I have a controlled name field that often has more than one entry in it. Is there a way that I can set the order in which the values appear when the full record is displayed? Thanks, Chris Dr. Christopher Beck Department of Biology Emory University 1510 Clifton Rd. Atlanta, GA 30322 Email: christopher.beck at emory.edu Phone: 404-712-9012 FAX: 404-727-2880 From Zaw at esa.org Tue May 20 12:59:40 2008 From: Zaw at esa.org (Zaw Aung) Date: Tue, 20 May 2008 13:59:40 -0400 Subject: [SPT/CWIS] CWIS problem Message-ID: <24D3B0875E8BAD45B97EFF737FB6A3D7B48791@esa01.ESA.local> Hi, I am trying to install "CWIS", but got the following error: Fatal error: Call to undefined function: file_put_contents() in /home/frontier/frontiersinecology-www/demo/cwis/installcwis.php on line 664 Could you please tell me what's the problem or how I can fix it? Thanks, Zaw -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080520/b916c2b6/attachment.html From ealmasy at scout.wisc.edu Tue May 20 13:51:55 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Tue, 20 May 2008 13:51:55 -0500 Subject: [SPT/CWIS] CWIS problem In-Reply-To: <24D3B0875E8BAD45B97EFF737FB6A3D7B48791@esa01.ESA.local> References: <24D3B0875E8BAD45B97EFF737FB6A3D7B48791@esa01.ESA.local> Message-ID: On May 20, 2008, at 12:59 PM, Zaw Aung wrote: > I am trying to install "CWIS", but got the following error: > Fatal error: Call to undefined function: file_put_contents() in / > home/frontier/frontiersinecology-www/demo/cwis/installcwis.php on > line 664 > Could you please tell me what's the problem or how I can fix it? The problem is that file_put_contents() is only available in PHP 5 or later. We tested the 1.5.0 release on PHP 4.1, however for reasons unclear to me it appears that that bit of code was either reworked after that testing, or perhaps was never exercised in a PHP 4.x environment. A version of installcwis.php that should work in a PHP 4.x environment is attached below. Please copy it in in place of the file you have on there now and give it a try. Ed -------------- next part -------------- A non-text attachment was scrubbed... Name: installcwis.php Type: text/php Size: 30360 bytes Desc: not available Url : http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080520/2c922aca/attachment-0001.bin -------------- next part -------------- --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From Zaw at esa.org Tue May 20 14:12:40 2008 From: Zaw at esa.org (Zaw Aung) Date: Tue, 20 May 2008 15:12:40 -0400 Subject: [SPT/CWIS] CWIS problem References: <24D3B0875E8BAD45B97EFF737FB6A3D7B48791@esa01.ESA.local> Message-ID: <24D3B0875E8BAD45B97EFF737FB6A3D7B487E3@esa01.ESA.local> Hi Edward, Thank you so much. I could successfully install it. Cheers, Zaw ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* * Zaw Aung ! Ecological Society of America ! 1990 M Street NW, Suite 700 ^ Washington, DC 20036 ! www.esa.org; www.frontiersinecology.org ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* -----Original Message----- From: spt-cwis-users-bounces at scout.wisc.edu [mailto:spt-cwis-users-bounces at scout.wisc.edu] On Behalf Of Edward Almasy Sent: Tuesday, May 20, 2008 2:52 PM To: SPT / CWIS Users Discussion List Subject: Re: [SPT/CWIS] CWIS problem On May 20, 2008, at 12:59 PM, Zaw Aung wrote: > I am trying to install "CWIS", but got the following error: > Fatal error: Call to undefined function: file_put_contents() in / > home/frontier/frontiersinecology-www/demo/cwis/installcwis.php on line > 664 Could you please tell me what's the problem or how I can fix it? The problem is that file_put_contents() is only available in PHP 5 or later. We tested the 1.5.0 release on PHP 4.1, however for reasons unclear to me it appears that that bit of code was either reworked after that testing, or perhaps was never exercised in a PHP 4.x environment. A version of installcwis.php that should work in a PHP 4.x environment is attached below. Please copy it in in place of the file you have on there now and give it a try. Ed From cbeck at emory.edu Wed May 21 20:50:59 2008 From: cbeck at emory.edu (Christopher Beck) Date: Wed, 21 May 2008 21:50:59 -0400 Subject: [SPT/CWIS] importing users Message-ID: <20080521215059.34pnx1ndc8kw0wcw@webmail.service.emory.edu> When I go to import users, I get the following error message: SQL Statement: INSERT INTO APUserPrivileges (UserId, Privilege) VALUES ('5', ) SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 CWIS seems to import the rest of the information, but doesn't import the privileges. A related question. Can I specify a custom privilege flag that I have created when I import users or for new users when they register? Thanks, Chris Dr. Christopher Beck Department of Biology Emory University 1510 Clifton Rd. Atlanta, GA 30322 Email: christopher.beck at emory.edu Phone: 404-712-9012 FAX: 404-727-2880 From cbeck at emory.edu Thu May 22 11:11:03 2008 From: cbeck at emory.edu (Christopher Beck) Date: Thu, 22 May 2008 12:11:03 -0400 Subject: [SPT/CWIS] Assign controlled name Message-ID: <20080522121103.4k68o4mbacsoc44s@webmail.service.emory.edu> I have another question. When I search for a controlled name and then click the "assign" button, I get the following error message. The requested URL /proceedings/SPT--EditResource?ID=-2 does not exist. Can anyone give me any suggestions as to what might be wrong? Thanks, Chris Dr. Christopher Beck Department of Biology Emory University 1510 Clifton Rd. Atlanta, GA 30322 Email: christopher.beck at emory.edu Phone: 404-712-9012 FAX: 404-727-2880 From chesstrian at gmail.com Thu May 22 13:32:23 2008 From: chesstrian at gmail.com (Christian Gutierrez) Date: Thu, 22 May 2008 13:32:23 -0500 Subject: [SPT/CWIS] importing users In-Reply-To: <20080521215059.34pnx1ndc8kw0wcw@webmail.service.emory.edu> References: <20080521215059.34pnx1ndc8kw0wcw@webmail.service.emory.edu> Message-ID: Hi, you should write ... VALUES ('5', '') ... Tell me that it works. On Wed, May 21, 2008 at 8:50 PM, Christopher Beck wrote: > When I go to import users, I get the following error message: > > SQL Statement: INSERT INTO APUserPrivileges (UserId, Privilege) VALUES > ('5', ) > SQL Error: You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near ')' at line 1 > > CWIS seems to import the rest of the information, but doesn't import > the privileges. > > A related question. Can I specify a custom privilege flag that I have > created when I import users or for new users when they register? > > Thanks, > Chris > > Dr. Christopher Beck > Department of Biology > Emory University > 1510 Clifton Rd. > Atlanta, GA 30322 > > Email: christopher.beck at emory.edu > Phone: 404-712-9012 > FAX: 404-727-2880 > > _______________________________________________ > SPT-CWIS-Users mailing list > SPT-CWIS-Users at scout.wisc.edu > http://www.scout.wisc.edu/mailman/listinfo/spt-cwis-users > -- Chesstrian!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080522/7149a2c3/attachment.html From chesstrian at gmail.com Thu May 22 14:10:02 2008 From: chesstrian at gmail.com (Christian Gutierrez) Date: Thu, 22 May 2008 14:10:02 -0500 Subject: [SPT/CWIS] importing users In-Reply-To: References: <20080521215059.34pnx1ndc8kw0wcw@webmail.service.emory.edu> Message-ID: Sorry, i think that my suggestion does not works because the fields in the table APUserPrivileges is not null, so maybe you can install phpmyadmin to manage yours DB, you can export your DB again and try import to new database. On Thu, May 22, 2008 at 1:32 PM, Christian Gutierrez wrote: > Hi, you should write ... VALUES ('5', '') ... > > Tell me that it works. > > > On Wed, May 21, 2008 at 8:50 PM, Christopher Beck wrote: > >> When I go to import users, I get the following error message: >> >> SQL Statement: INSERT INTO APUserPrivileges (UserId, Privilege) VALUES >> ('5', ) >> SQL Error: You have an error in your SQL syntax; check the manual that >> corresponds to your MySQL server version for the right syntax to use >> near ')' at line 1 >> >> CWIS seems to import the rest of the information, but doesn't import >> the privileges. >> >> A related question. Can I specify a custom privilege flag that I have >> created when I import users or for new users when they register? >> >> Thanks, >> Chris >> >> Dr. Christopher Beck >> Department of Biology >> Emory University >> 1510 Clifton Rd. >> Atlanta, GA 30322 >> >> Email: christopher.beck at emory.edu >> Phone: 404-712-9012 >> FAX: 404-727-2880 >> >> _______________________________________________ >> SPT-CWIS-Users mailing list >> SPT-CWIS-Users at scout.wisc.edu >> http://www.scout.wisc.edu/mailman/listinfo/spt-cwis-users >> > > > > -- > Chesstrian!!! -- Chesstrian!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080522/4dc6779b/attachment.html From cbeck at emory.edu Thu May 22 14:41:29 2008 From: cbeck at emory.edu (Christopher Beck) Date: Thu, 22 May 2008 15:41:29 -0400 Subject: [SPT/CWIS] importing users In-Reply-To: References: <20080521215059.34pnx1ndc8kw0wcw@webmail.service.emory.edu> Message-ID: <20080522154129.8ecoyc6s0cgwkk0k@webmail.service.emory.edu> Thanks for the suggestion. I found a work-around by specifying in the SPT-UserImportComplete.php file the specific privileges that I wanted every user to have. Chris Quoting Christian Gutierrez : > Sorry, i think that my suggestion does not works because the fields in the > table APUserPrivileges is not null, so maybe you can install phpmyadmin to > manage yours DB, you can export your DB again and try import to new > database. > > On Thu, May 22, 2008 at 1:32 PM, Christian Gutierrez > wrote: > >> Hi, you should write ... VALUES ('5', '') ... >> >> Tell me that it works. >> >> >> On Wed, May 21, 2008 at 8:50 PM, Christopher Beck wrote: >> >>> When I go to import users, I get the following error message: >>> >>> SQL Statement: INSERT INTO APUserPrivileges (UserId, Privilege) VALUES >>> ('5', ) >>> SQL Error: You have an error in your SQL syntax; check the manual that >>> corresponds to your MySQL server version for the right syntax to use >>> near ')' at line 1 >>> >>> CWIS seems to import the rest of the information, but doesn't import >>> the privileges. >>> >>> A related question. Can I specify a custom privilege flag that I have >>> created when I import users or for new users when they register? >>> >>> Thanks, >>> Chris >>> >>> Dr. Christopher Beck >>> Department of Biology >>> Emory University >>> 1510 Clifton Rd. >>> Atlanta, GA 30322 >>> >>> Email: christopher.beck at emory.edu >>> Phone: 404-712-9012 >>> FAX: 404-727-2880 >>> >>> _______________________________________________ >>> SPT-CWIS-Users mailing list >>> SPT-CWIS-Users at scout.wisc.edu >>> http://www.scout.wisc.edu/mailman/listinfo/spt-cwis-users >>> >> >> >> >> -- >> Chesstrian!!! > > > > > -- > Chesstrian!!! > Dr. Christopher Beck Department of Biology Emory University 1510 Clifton Rd. Atlanta, GA 30322 Email: christopher.beck at emory.edu Phone: 404-712-9012 FAX: 404-727-2880 From jhonatantiradotiradodeep at gmail.com Mon May 26 11:49:17 2008 From: jhonatantiradotiradodeep at gmail.com (Jhonatan Tirado) Date: Mon, 26 May 2008 11:49:17 -0500 Subject: [SPT/CWIS] DBFieldName() on SPT--Resource.php line 668 Message-ID: <483AEA0D.3000603@gmail.com> Hi everybody. I get the following error when trying to *add a new resource. *As result, a new record is inserted into the database, but with a ResourceId like "-1", "-12" or so on. It seems to be a temp register. So the record never gets to appear on the cwis portal. * Fatal error*: Call to a member function DBFieldName() on a non-object in */var/www/repositorio/include/SPT--Resource.php* on line *668 *However, when I try to *update a resource*, I get the same error message, but the record gets to be updated. I thought the problem was because of changing some database fields using the Metadata Field Editor. I also tried inserting a record directly to the database and it works fine. So it seems the problem is on the PHP code. # set value using field object function SetByField($Field, $NewValue) { # grab commonly-used values for local use $DB =& $this->DB; $ResourceId = $this->Id; # grab database field name * $DBFieldName = $Field->DBFieldName(); ...... .... .. * *CWIS version*: 1.4.0 *Apache 2* *PHP Version 5.1.6* Thanks in advance for your help.* *** From jslauson at stat.osu.edu Tue May 27 12:31:54 2008 From: jslauson at stat.osu.edu (Justin Slauson) Date: Tue, 27 May 2008 13:31:54 -0400 Subject: [SPT/CWIS] Axis Database Issue In-Reply-To: <483AEA0D.3000603@gmail.com> References: <483AEA0D.3000603@gmail.com> Message-ID: In order to have access to the $User object and methods site-wide outside of just the CWIS pages (to display login information and restrict certain parts to certain users) I include the following line in all my scripts: include_once('/home/cause/WWW/cwis/include/SPT--Common.php'); However, I get SQL Statement: SELECT * FROM APSessions WHERE SessionId = '517898140' SQL Error: Table 'cause.APSessions' doesn't exist on any page where I open a database connection. It appears that the Axis engine is trying to use our database (`cause`) instead of the one for CWIS. This happens even though I close my connection when finished, and Axis should have it's own link resource anyway. Am I doing something wrong, or is there a bug in the Axis engine which assumes there will only be one database connection open and is trying to use my previous one? Thanks for any help you can provide, -Justin Slauson www.causeweb.org From jslauson at stat.osu.edu Tue May 27 12:46:54 2008 From: jslauson at stat.osu.edu (Justin Slauson) Date: Tue, 27 May 2008 13:46:54 -0400 Subject: [SPT/CWIS] newinterface skinning bug? In-Reply-To: References: <483AEA0D.3000603@gmail.com> Message-ID: In a default install of CWIS, when you create a new user interface with the ./newinterface command, the SPT--StandardPageStart.html file that is generated never calls the corresponding SPT--Stylesheet.css file in the same directory, but instead continues to load the one from SPTUI--CWIS/Themes/Theme--ArcticSilver/ -Justin From ealmasy at scout.wisc.edu Wed May 28 00:00:46 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Wed, 28 May 2008 00:00:46 -0500 Subject: [SPT/CWIS] Assign controlled name In-Reply-To: <20080522121103.4k68o4mbacsoc44s@webmail.service.emory.edu> References: <20080522121103.4k68o4mbacsoc44s@webmail.service.emory.edu> Message-ID: <58767822-B830-4A9D-B444-DC06A5621A0C@scout.wisc.edu> On May 22, 2008, at 11:11 AM, Christopher Beck wrote: > I have another question. When I search for a controlled name and then > click the "assign" button, I get the following error message. > The requested URL /proceedings/SPT--EditResource?ID=-2 does not > exist. This is due to a bug which apparently only manifests under certain web server configurations. The attached file should fix it. Ed -------------- next part -------------- A non-text attachment was scrubbed... Name: SPT--EditResourceSearchName.php Type: text/php Size: 6990 bytes Desc: not available Url : http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080528/8355b20d/attachment.bin -------------- next part -------------- --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From ealmasy at scout.wisc.edu Wed May 28 11:08:57 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Wed, 28 May 2008 11:08:57 -0500 Subject: [SPT/CWIS] DBFieldName() on SPT--Resource.php line 668 In-Reply-To: <483AEA0D.3000603@gmail.com> References: <483AEA0D.3000603@gmail.com> Message-ID: <94A08CB2-74BB-4541-B42E-F51E54AAB493@scout.wisc.edu> On May 26, 2008, at 11:49 AM, Jhonatan Tirado wrote: > I get the following error when trying to *add a new resource. > *As result, a new record is inserted into the database, but with a > ResourceId like "-1", "-12" or so on. It seems to be a temp register. > So the record never gets to appear on the cwis portal. > Fatal error*: Call to a member function DBFieldName() on a non- > object in > */var/www/repositorio/include/SPT--Resource.php* on line *668 > I thought the problem was because of changing some database fields > using > the Metadata Field Editor. > *CWIS version*: 1.4.0 The negative resource ID does indeed indicate a temporary resource record, and the problem is likely to be connected to something that was changed via the Metadata Field Editor, as the error message indicates that there is a metadata field defined in a way that is causing the Metadata Tool to choke when it tries to access the field info for editing. All of that said, I would suggest your best course is to back up your existing CWIS installation and database, and upgrade your site to version 1.5.0. Many bugs have been fixed since 1.4.0 and the Metadata Tool resource editing interface has been entirely rewritten to be much more robust, which at minimum should make any existing problem much easier to track down and fix. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From ealmasy at scout.wisc.edu Wed May 28 11:43:10 2008 From: ealmasy at scout.wisc.edu (Edward Almasy) Date: Wed, 28 May 2008 11:43:10 -0500 Subject: [SPT/CWIS] Axis Database Issue In-Reply-To: References: <483AEA0D.3000603@gmail.com> Message-ID: <22B90F0D-2464-4285-B5F7-E03AC7C78FCD@scout.wisc.edu> On May 27, 2008, at 12:31 PM, Justin Slauson wrote: > In order to have access to the $User object and methods site-wide > outside of just the CWIS pages (to display login information and > restrict certain parts to certain users) I include the following line > in all my scripts: > include_once('/home/cause/WWW/cwis/include/SPT--Common.php'); > However, I get > SQL Statement: SELECT * FROM APSessions WHERE SessionId = '517898140' > SQL Error: Table 'cause.APSessions' doesn't exist > on any page where I open a database connection. It appears that the > Axis engine is trying to use our database (`cause`) instead of the one > for CWIS. This happens even though I close my connection when > finished, and Axis should have it's own link resource anyway. What's probably going on is that a database connection is opened and a database is selected when SPT--Common.php loads the session information, and then when you do a call later to mysql_connect() it's reusing that same connection (mysql_connect() does that if the host/ user/password are the same). As you're presumably also doing a call to mysql_select_db() to select the "cause" database, that overrides the earlier database selection (done when SPT--Common.php was loaded), and when the SPT/CWIS code tries to access the DB again it gets the wrong database. The solution is to set the $new_link parameter to mysql_connect() to TRUE when you connect to your database, to make sure you're getting a new connection and not reusing the one opened earlier by SPT-- Common.php. Ed --- Edward Almasy ealmasy at scout.wisc.edu Co-Director 1210 W Dayton Street Internet Scout Madison WI 53706 Computer Sciences Department 608-262-6606 (voice) University of Wisconsin - Madison 608-265-9296 (fax) From jslauson at stat.osu.edu Wed May 28 13:19:46 2008 From: jslauson at stat.osu.edu (Justin Slauson) Date: Wed, 28 May 2008 14:19:46 -0400 Subject: [SPT/CWIS] Axis Database Issue In-Reply-To: <22B90F0D-2464-4285-B5F7-E03AC7C78FCD@scout.wisc.edu> References: <483AEA0D.3000603@gmail.com> <22B90F0D-2464-4285-B5F7-E03AC7C78FCD@scout.wisc.edu> Message-ID: On May 28, 2008, at 12:43 PM, Edward Almasy wrote: > On May 27, 2008, at 12:31 PM, Justin Slauson wrote: >> In order to have access to the $User object and methods site-wide >> outside of just the CWIS pages (to display login information and >> restrict certain parts to certain users) I include the following line >> in all my scripts: >> include_once('/home/cause/WWW/cwis/include/SPT--Common.php'); >> However, I get >> SQL Statement: SELECT * FROM APSessions WHERE SessionId = '517898140' >> SQL Error: Table 'cause.APSessions' doesn't exist >> on any page where I open a database connection. It appears that the >> Axis engine is trying to use our database (`cause`) instead of the >> one >> for CWIS. This happens even though I close my connection when >> finished, and Axis should have it's own link resource anyway. > > What's probably going on is that a database connection is opened and a > database is selected when SPT--Common.php loads the session > information, and then when you do a call later to mysql_connect() it's > reusing that same connection (mysql_connect() does that if the host/ > user/password are the same). As you're presumably also doing a call > to mysql_select_db() to select the "cause" database, that overrides > the earlier database selection (done when SPT--Common.php was loaded), > and when the SPT/CWIS code tries to access the DB again it gets the > wrong database. > > The solution is to set the $new_link parameter to mysql_connect() to > TRUE when you connect to your database, to make sure you're getting a > new connection and not reusing the one opened earlier by SPT-- > Common.php. Your guess was correct, we do use the same credentials as CWIS for our own DB calls, and adding the TRUE parameter fixed the problem, we no longer get any warnings or errors. Thanks so much! :) -Justin From shay.johnson at domail.maricopa.edu Thu May 29 09:47:07 2008 From: shay.johnson at domail.maricopa.edu (Shay Johnson) Date: Thu, 29 May 2008 07:47:07 -0700 Subject: [SPT/CWIS] SPT--AddRecord.php Message-ID: <03cd01c8c19a$ddecb0e0$99c612a0$@johnson@domail.maricopa.edu> If a user is entering a new record into the database and then clicks the "Add Record" button, the user is then taken to the confirmation page were they're shown the newly added record and it says "Record Added Successfully" which also gives you the option to revise the new record. The issue that we're having happens once the user clicks the "Add Record" button from the add new resource page. Once they click to submit the new resource it does not display the confirmation page (it times out with Firefox and with Internet Explorer it gives a "cannot display this webpage" error). The record ends up getting submitted into the database just fine but for some reason there's an issue communicating and displaying the "SPT--AddRecord.php" page. Anything trying to communicate with the "SPT--AddRecord.php" page creates this issue (whether you add a record, update a record, or duplicate a record) this problem will occur. We're using CWIS version 1.40 and aren't able to upgrade due to our version of SQL (due to our hosting providers limitations). We're also running another instance of CWIS on another domain and it's working just fine with all the same versions of CWIS, SQL & PHP. Any help with this issue would be greatly appreciated! Sincerely, Shay ***************** Shay Johnson Instructional Technology Developer MATEC 4110 E. Wood St. - Ste. 1 Phoenix, AZ 85040 MATEC is a member of the Academic Affairs Division of the Maricopa Community Colleges. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.scout.wisc.edu/pipermail/spt-cwis-users/attachments/20080529/b37022f2/attachment.html