WebmasterSite.net

Fatal Error
commonfunctions.php

Version: 5.0.26
URL:

PrintPrint


Fatal Error
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 69
Total Posts: 198
quote post #1
Posted 12/18/08 - 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: 69
Total Posts: 198
quote post #2
Posted 12/18/08 - 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);
}





Edited by sparkalina on 12/20/08 - 10:18 AM
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 69
Total Posts: 198
quote post #3
Posted 12/20/08 - 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


Edited by sparkalina on 12/20/08 - 9:41 AM
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 69
Total Posts: 198
quote post #4
Posted 12/20/08 - 10:17 AM:

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

Shouldn't it be

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

??
Paul
developer
Avatar

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

Total Topics: 65
Total Posts: 7614
quote post #5
Posted 12/20/08 - 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: 69
Total Posts: 198
quote post #6
Posted 12/20/08 - 11:48 AM:

Thanks!
 
Search thread for
Download thread as


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