Giter VIP home page Giter VIP logo

silverstripe-addressable's People

Contributors

ajshort avatar alexoconner avatar jamesdpc avatar jedateach avatar jinjie avatar linkdup avatar muskie9 avatar nedmas avatar nyeholt avatar scttw avatar sheadawson avatar silbinarywolf avatar sonet avatar stephenmcm avatar tardinha avatar thebnl avatar yuchen-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-addressable's Issues

Can't get it working

I'm recently new to Silverstripe and Silverstripe modules and i can't get this module working on V3 of silverstripe.

I created a folder called 'addressable' in the root of my website/silverstripe intallation and uploaded all the files (code, templates, _config etc.) to this folder. After that i ran /dev/build, and added these lines to my 'mysite/_config.php' file:

Object::add_extension('Winkel', 'Addressable');
Object::add_extension('Winkel', 'Geocodable');

And rebuild the site again. After that i went to the page 'Winkel' in Silverstripe and got a 'Internal server error'. Anything i'm missing?

Thanks in advance!

Can't override Address.ss

I can't override the Address template. I noticed because it interferes with the silvershop admin interface (the field names are different so the address does not show)

I've tried putting overrides in themes, mysite and themename_addressable - nothing overrides it.

when i delete addressable's Address.ss file, the expected hierarchy of templates works again.

RELEASE new tagged release

It's been some time since there has been a tagged release as it's been so long and there have been quite a few enhancements/updates.

SS4 support

Is anyone working on SS4 support and could give some timelines? Or provide a cost to get it upgraded, I have a motivated client.

A question

Love this module and have used it a lot in my 2.4 projects. I have just installed it on a SS3 project and notice that you have removed the functionality to manually set the marker and lat and lon. Any reason as this was a function i used a lot as most of the locations i use it for don't have full addresses or postcodes?

Regards

Mick

GoogleGeocodeService will never find the Google Maps API key in the Config

This code starting on line 46 in GoogleGeocodeService.php:

    $key = getenv('GOOGLE_API_KEY')
       ?? Config::inst()->get(__CLASS__, 'google_api_key')
       ?? Config::inst()->get('Symbiote\\Addressable\\GeocodeService', 'google_api_key');

does not work I believe. getenv() always returns either a string or false. Using the null coalesce operator ?? therefore will never query the Config API even if there's no key set in the environment.

not compatible with PHP < 5.5

Addressable.php line 70:

    if (!empty($customRegex = Config::inst()->get('Addressable', 'set_postcode_regex'))) {

having an expression in empty() is not supported by PHP less than 5.5:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.

Can you divide this into tow lines please?

5.0.4 tag/ version

Hi,

I'm having issues with version 5.0.3 in the way the api keys are set and get by getenv(

Are you planning to release the changes 5.0.3...master as 5.0.4?

Thanks,

Bart

CountryName is unavailable when allowed countries has been set.

When set_allowed_countries() has been set the country name is unavailable.

What I think is happening is when allowedCountries is set the value of Country is a number rather than the two character country abbreviation. When Country is then passed to Zend_Local::getTranslation() in getCountryName() Country is an invalid value.

Doesn't work in a GridField

Tried out Addressable on a standard page class and it works great! However, if I assign it to a DataObject that's part of a GridField, no bueno! So...question is: How can this be updated to allow for a model within GridField to use this? :)

Assumes us style address

For us in the UK we have a different address format - is there a chance of changing this?
(e.g. postcode contains letters and numbers)

GeocodeService __CLASS___ returns empty

In GeocodeService Config::inst()->get(__CLASS__, 'google_api_key'); return null, becuase __CLASS__ returns an empty string.

If I use self::class instead it works:

SS version: 4.4
Php version: 7.2

i18n

Module is not internationalized.

I can provide italian translations of the fields if needed.

Geocodable: updateFrontEndFields should not expect a tabset

In the spec for getFrontEndFields on DataObject the returning object is a note: Always returns a simple field collection without TabSet

The use of the updateCMSFields function inside updateFrontEndFields at line 76 inserts a TabSet which then can't find the tab "Root", as DataObject's getFrontEndFields function returns a TabSet-less FieldList

Running getFrontEndFields on an Geocodable extended page calss gives the error:
FieldList::addFieldToTab() Tried to add a tab to object 'FieldList' - 'Root' didn't exist.

...at line 76 of Geocodable

getFrontendFields doesnt seem to be triggered

so the below in DataObject triggers the updateFrontEndFields in Addressable.

public function getFrontEndFields($params = null)
    {
        $untabbedFields = $this->scaffoldFormFields($params);
        $this->extend('updateFrontEndFields', $untabbedFields);

        return $untabbedFields;
    }

the issue i am getting is that '$untabbedFields' already contains an 'Address' field (not because of my $db setups... i think) and so the below is never entered

public function updateFrontEndFields(FieldList $fields)
    {
        if (!$fields->dataFieldByName("Address")) {
            $fields->merge($this->getAddressFields());
        }
    }

any ideas or is this a known bug? thanks~!

Silverstripe 4.11.0 requires Guzzle 7

It appears that sites using this module cannot upgrade to the latest framework version as the guzzle requirements conflicts.

Addressable 5.0.3

{
    "name": "symbiote/silverstripe-addressable",
    "require": {
        "guzzlehttp/guzzle": "^5.3.1|^6.2.1"

Framework 4.11.0

{
    "name": "silverstripe/framework",
    "require": {
        "guzzlehttp/guzzle": "^7",
        "guzzlehttp/psr7": "^2",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.