Webmastersite.net
Register Log In

Fatal Error
commonfunctions.php

Comments on Fatal Error

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 18, 2008 - 12:46 PM:

In trying to submit a listing/item, I keep getting this error:

Fatal error: Call to undefined method onelink::country() in /home/xxxxxx/xxxxxxx/dir/includes/commonfuncs.php on line 2285

I haven't changed anything with the javacript or fields... and I've made sure my customized templates are up to date by downloading fresh untouched version (5.0.26) yesterday.


sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 18, 2008 - 1:47 PM:

The error comes when I add an address to my item.

Most of the time I've just breezed through the sign up in testing and skip the address. I hadn't even notice this error.

As soon as the item has an address submitted or edited with an address, this error appears.



Here are lines 2277-2287 from my commonfunctions.php


{ // must use these fields: street (or address, or address1), city, country. optional: zip
if ($alink->address) $street = $alink->address;
else if ($alink->address1) $street = $alink->address1;
else $street = $alink->street;
if (!$street) return false; // don't generate coordinates for country, just if there's an address
$q = urlencode($street) .', '. urlencode($alink->city);
if ($alink->state) $q .= ', '. urlencode($alink->state);
if ($alink->zip) $q .= ', '. $alink->zip;
$q .= ', '. urlencode($alink->country());
$q = urlencode($q);
}



sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 20, 2008 - 9:34 AM:

Update:

I've been narrowing down when the error occurs.

It's when the field for state is clicked on to reveal the drop down list. Once you've picked a state, you can't do anything...submit or edit a listing.

Fatal error: Call to undefined method onelink::country() in /home/..../public_html/dir/includes/commonfuncs.php on line 2285
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 20, 2008 - 10:17 AM:

2285 $q .= ', '. urlencode($alink->country());

Shouldn't it be

2285 $q .= ', '. urlencode($alink->country);

??
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 20, 2008 - 11:03 AM:

Error introduced in redesigning the countries to allow adding missing ones. Fixed.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 20, 2008 - 11:48 AM:

Thanks!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.