Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 12:26 am (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
Posted: Wed Aug 20, 2008 1:56 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Aug 20, 2008 1:30 pm
Posts: 3
Hello,

I have adopted com_registration component in a way that some additional elements are added in form and stored in alberghi_client table (from alberghi component).

That worked perfectly until host provider did server upgrade (Apache 1 -> 2.2.9 (Unix), PHP 4 -> 5.2.6), and after that fatal error occurs:
Class 'mosAlberghiClient' not found in /home/croatiad/public_html/components/com_registration/registration.php on line 164

In attachment you can find registration.php file, where adaptation can be seen.
This code has been copied from alberghi component to registration.php:
Code:
// Class: mosAlberghiClient
class mosAlberghiClient extends mosDBTable {

//************************************************************
// Declare variables to store data
//************************************************************
var $id=null;
var $name=null;
var $contact=null;
var $address=null;
var $town=null;
var $county=null;
var $country=null;
var $postcode=null;
var $email=null;
var $website=null;
var $websiteDescription=null;
var $telephone=null;
var $fax=null;
var $extrainfo=null;
var $checked_out=null;
var $checked_out_time=null;
var $editor=null;

// Function: mosAlberghiClient
function mosAlberghiClient( &$db ) {
$this->mosDBTable( '#__alberghi_client', 'id', $db );
}

// Function: Check
function check() {

// check for valid name
if (trim( $this->name ) == '') {
  $this->_error = "Devi inserire un nome.";
  return false;
}

return true;
}
}
//***********************************************************
// Function: saveClient
//***********************************************************
function saveClient( &$database ) {
// Initialise a new row
$row = new mosAlberghiClient( $database );

// Bind the values submitted to the row
if (!$row->bind( $_POST )) {
return $database->getErrorMsg();
}

// Check the row
if (!$row->check()) {
return $database->getErrorMsg();
}
                        $row->contact = $row->name;
// Store the row
if (!$row->store()) {
return $database->getErrorMsg();
}

// Check in the row
$row->checkin($id);

// Return success
return NULL;
}
//***********************************************************
// Function: saveClient - END
//***********************************************************


error occurs at line: $row = new mosAlberghiClient( $database );

This same class still works under alberghi component, and registration component works if this add-on is removed.

I hope I have explained my problem a little bit.

Any help is welcome.


You do not have the required permissions to view the files attached to this post.


Last edited by jim11 on Sat Aug 23, 2008 9:29 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Fri Aug 22, 2008 6:49 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Aug 20, 2008 1:30 pm
Posts: 3
Not even a tip?!?
:( :( :(


Top
  E-mail  
 
Posted: Sat Aug 23, 2008 9:28 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Aug 20, 2008 1:30 pm
Posts: 3
Solved!

Moved class declaration from registration.php to registration.html.php and it worked!

I do not know why the error occured, because it worked fine for few months in registration.php.

Bye...


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group