Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:58:31+00:00 2026-06-01T13:58:31+00:00

I’m trying to implement the GeocodableBehavior on a Symfony 1.4 (with Propel 1.6 )

  • 0

I’m trying to implement the GeocodableBehavior on a Symfony 1.4 (with Propel 1.6) project i’m working on, but until now it’s a complete failure. I’ve tried to search if other people but I didn’t found anything, like if I was the only one having troubles with this.

So, maybe I’m missing something very very easy, but following the instructions given on the GeocodableBehavior leads to nothing but errors, and I can’t figure out where’s the problem.

I followed instructions for the GeocodableBehavior (here -> http://www.propelorm.org/cookbook/geocodable-behavior.html)

This seems to work as i’m getting the latitude/longitude columns created on my model. Until then, it works fine.

Where things get a little more complicated is when trying to save an object with the GeocodableBehavior, there’s problems with the Geocoder class.

(Documentation here -> https://github.com/willdurand/Geocoder)

My class is Point, referring to a geolocated point, an address. When creating a Point using sf admin generator, the behavior which is supposed to use some fields (street, postal_code, country, etc) to query the GoogleMaps api, just fails to use the Geocoder class.

Fatal error: Class 'Geocoder\Geocoder' not found in /var/www/vhosts/www._________.local/lib/model/om/BasePoint.php on line 3717

I put the Geocoder class in a lib/vendor/geocoder folder, I tried to use the autoload.yml file to load it, but nothing changes…

autoload:
  geocoder:
    name:       geocoder
    path:       %SF_LIB_DIR%/vendor/geocoder
    recursive:  on

There’s something i’m missing in how to load those classes in my sf project, and i can’t find what. Geocoder package has an autoload.php file but i didn’t manage to “load” it successfully…

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:58:32+00:00Added an answer on June 1, 2026 at 1:58 pm

    I know it’s kinda giving up on the autoloader, but you could establish a register function in /config/ProjectConfiguration.class.php. The only downside is that you will need to add a call to the function before any block that uses Geocoder.

    class ProjectConfiguration extends sfProjectConfiguration
    {
        static protected $geocoderLoaded = false;
    
        static public function registerGeocoder()
        {
            if (self::$geocoderLoaded) {
                return;
            }
    
            require_once sfConfig::get('sf_lib_dir') . '/vendor/geocoder/autoload.php';
    
            self::$geocoderLoaded = true;
        }
        ...
    }
    

    Then just execute ProjectConfiguration::registerGeocoder(); anywhere you’d need the class. It’s more annoying than getting the autoloader to work, but it’s at least dependable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.