Open dacar opened 7 years ago
HI @dacar
Could you let us know which version of Locator you're using? Also, did you install via Composer?
We added versioning to Locations after 2.0.0-alpha2. 2.0.0-beta1 and after require heyday/silverstripe-versioneddataobjects
"extra": { "installer-name": "locator", "branch-alias": { "2.0": "2.0.x-dev" } }
Ifi remove the following from locator.php it works. private static $extensions = [ 'VersionedDataObject', ];
Hi @jsirish
sorry, it's late at night in germany. I have forgotten to say hi and i have forgotten to say that i have installed manually.
No worries!
If you've installed Locator manually just also install https://github.com/heyday/silverstripe-versioneddataobjects
The 2.0 branch has a handful of other requirements as well that you'll need to install: https://github.com/dynamic/silverstripe-locator/blob/2.0/composer.json#L22
You can find the GitHub links to all of these packages by searching http://packagist.org
If you're able to use composer instead, it will install all of these for you, and will be easier to maintain future versions as we release them.
https://docs.silverstripe.org/en/3/getting_started/composer/
Hope that helps!
i also get the following javascript error in the frontend:
Uncaught TypeError: $ is not a function
at HTMLDocument.
fire @ jquery.js?m=1495870913:1075 fireWith @ jquery.js?m=1495870913:1193 ready @ jquery.js?m=1495870913:435 DOMContentLoaded @ jquery.js?m=1495870913:949
$(function(){ $('#map-container').storeLocator({
after changing line 272 in pages/Locator.php
// init map Requirements::customScript(" $(function(){ $('#map-container').storeLocator({
to
// init map
Requirements::customScript("
jQuery(function(){
jQuery('#map-container').storeLocator({
it works
hmm, on adding or editing categories i get an 500 Server error. Can't see why??
all Modules from https://github.com/dynamic/silverstripe-locator/blob/2.0/composer.json#L22 are installed???
After /dev/build/?flush=1 i get the following error. Can you please help and give advice?
Source 5 /* 6 A class for creating new objects by the injector. 7 8 @package framework 9 @subpackage injector 10 / 11 class InjectionCreator implements Factory { 12 13 public function create($class, array $params = array()) { 14 $reflector = new ReflectionClass($class); 15 16 if (count($params)) { 17 return $reflector->newInstanceArgs($params); 18 } 19 20 return $reflector->newInstance(); Trace ReflectionClass->__construct(VersionedDataObject) InjectionCreator.php:14 InjectionCreator->create(VersionedDataObject,Array) Injector.php:555 Injector->instantiate(Array) Injector.php:864 Injector->get(VersionedDataObject,,Array) Injector.php:902 Injector->createWithArgs(VersionedDataObject,Array)