WebmasterSite.net

Register | Forgot Password

Fatal Error
commonfunctions.php

Version: 5.0.26
printPrint


Fatal Error
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/18/08 - 12:46 PM:
quote post
#1
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: 60
Total Posts: 180
Posted 12/18/08 - 01:47 PM:
quote post
#2
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: 60
Total Posts: 180
Posted 12/20/08 - 09:34 AM:
quote post
#3
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 - 09:41 AM
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/20/08 - 10:17 AM:
quote post
#4
2285 $q .= ', '. urlencode($alink->country());

Shouldn't it be

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

??
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 12/20/08 - 11:03 AM:
quote post
#5
Error introduced in redesigning the countries to allow adding missing ones. Fixed.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/20/08 - 11:48 AM:
quote post
#6
Thanks!
Search thread for
Download thread as


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

WSN Links WSN Gallery WSN Knowledge Base WSN Forum WSN Classifieds WSN Directory WSN Software Directory