[SPT/CWIS] DBFieldName() on SPT--Resource.php line 668

Jhonatan Tirado jhonatantiradotiradodeep at gmail.com
Mon May 26 11:49:17 CDT 2008


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.*


***


More information about the SPT-CWIS-Users mailing list