< 222017-10-23⋎24 >

Topic for #farmOS is: farmOS (farmos.org) is a free open source, web-based farm management system, built on Drupal. Please report bugs to github.com/farmOS/farmOS/issues - Subscribe to the farmOS mailing list at: lists.eruditium.org/cgi-bin/mailman/listSet by mstenta on 2017-03-16 at 16:48
01:07*JustTB has joined
02:01*JustTB has quit (Quit: Leaving.)
08:34*konstamtin has joined
08:34konstamtinHi everybody. Trying to install and set-up FarmOS - have several issues and questions
08:37konstamtinPHP Version 5.4.20, FreeBSD. Onw hosting platform, Database - MySQL. During installation while configuring modules - had several subsequent errors about impropes use of empty function
08:38konstamtinAfter minor changes in related modules (commentsing some fool-profing blocks of code) I have it installed.
08:39konstamtinNow farmOS is works, but I have issue with GoogleMaps integration. I've got API key, put it into setting but still have error with map
08:40konstamtinIn console - NoAPIkey error
08:41konstamtinAny ideas where I can check the settings. How I can ensure that API key entered in setting successfully transferred into code in modules?
08:46konstamtinI have created temporary FarmViewer account for our discussion. URL: farm.kostello.ru Login: test PWD: test!123
08:54konstamtinAlso after installation - I have updated the opanlayers and feeds modules - they were marked with available updates in Modules configuration
09:22konstamtinAnd yes, I used pre-packaged Drupal distribution from www.drupal.org/project/farm
12:17*trentf has joined
15:49*JustTB has joined
16:02mstenta_Hi konstamtin
16:03mstenta_Regarding improper use of empty() function - I've never experienced this. Can you tell me which pieces of code you had to comment out?
16:03mstenta_Your PHP version seems fine... I'm not sure why you would be getting that error. I haven't tried installing on FreeBSD, but I don't think that would be different. Are you using Apache?
16:04mstenta_Regarding broken Google maps: you should undo your Openlayers module upgrade.
16:04mstenta_I'm not sure if that is the original cause... but it will cause other issues regardless.
16:05mstenta_The newer version of farmOS I am working on will update Openlayers, but there are some required patches and other updates necessary.
16:05mstenta_Simply updating the module without applying the patches, and without making the necessary updates to farmOS itself will break your maps.
16:05mstenta_That might be what happened.
16:06mstenta_The best way to roll back is to download the 7.x-1.0-beta15 zip file from drupal.org/project/farm, unzip it in another folder, and get the /profiles/farm/modules/contrib/openlayers folder - use that to replace your current folder. That will include the patches.
16:07mstenta_The Feeds module upgrade should be harmless - but in general you shouldn't need to worry about updating individual modules. When the next version of farmOS is available, it will include all the updates.
16:08mstenta_I try to make sure that all the modules work together without issues. Openlayers is a very special case in farmOS because it requires a number of patches in order to work correctly.
16:08mstenta_After you roll back your Openlayers module code, clear your cache.
16:08mstenta_Then, go to /admin/config/farm/map - you should see a field there for the Google Maps API key.
16:09mstenta_If you don't see your key there, enter it and save (and let me know - hopefully there is not a bug during installation in saving that value).
16:09mstenta_If you do see a value, and it's still not working, you can confirm that it is being used in the Openlayers configuration by doing the following:
16:09mstenta_1) go to /admin/modules, and enable the Openlayers UI module
16:10*efraim has quit (Remote host closed the connection)
16:10*efraim has joined
16:10mstenta_2) go to /admin/structure/openlayers/sources/list/farm_map_source_google_hybrid/edit/options - and you should see the key there as well.
16:11mstenta_The form at /admin/config/farm/map is a shortcut to fill in that field in the Openlayers Source configuration
16:11mstenta_If the key is in both places, but still isn't working - make sure you have set it up properly in Google (and copied it properly, with no spaces to the left/right of it)
16:12mstenta_Instructions are here: farmos.org/hosting/googlemaps/
16:12mstenta_Good luck! Let me know if you don't figure it out.
16:12mstenta_I will be traveling tomorrow, and won't be back for the rest of the week. I won't be on IRC.
16:12mstenta_If you want to file a bug report on Github, I will see that and respond when I can.
16:17konstamtinHi Michael, thanks for your instruction. I will try to do everything you've recommended and report
16:24konstamtinAs for empty() function I can try to create another instance on my hosting platform in order to reproduce the erroe
16:32konstamtinOk, openlayers is copied from original source, cache cleared. As for /admin/config/farm/map - that's could be problem. I can see only checkbox for "Show dashboar map". I've entered Google Key in /admin/config/content/geocoder section
16:38konstamtinfarm_map_source_google_hybrid/edit have no Google Map API Key field at all
16:47mstenta_konstamtin: Hmm - are you using farmOS 7.x-1.0-beta15?
16:47mstenta_You may be on an older version
16:48mstenta_konstamtin: oh wait... nevermidn - I'm wrong
16:49mstenta_Sorry - I gave you instructions for the development version - not the latest release
16:49mstenta_I added the shortcut API Key field to /admin/config/farm/map recently - but it hasn't been released yet - sorry that was my mistake
16:50mstenta_With that in mind, you should just enter the API key in /admin/structure/openlayers/sources/list/farm_map_source_google_hybrid/edit/options
16:50mstenta_The form at /admin/config/content/geocoder is actually a different thing - it is for the Geocoder module - not for the Openlayers module
16:51mstenta_(That was a common mistake people made, which is why I added the shortcut form - that will be available in the next release)
16:51mstenta_Hope that helps!
16:52mstenta_I am curious about the empty() function issues... if you do set up another instance let me know what you find.
16:52mstenta_I'm curious if it was a PHP error/warning/notice you saw - or if it came from something else
17:25*JustTB has quit (Quit: Leaving.)
17:43konstamtinfarm-7.x-1.0-beta15-core
17:44konstamtinas for empty - it was php errors
17:58mstenta_konstamtin: thanks
17:59mstenta_i've never seen a php error about "improper use of empty()"
18:00konstamtinit's not the exact error description. It's was something about that empty can't use not defined parameter
18:00konstamtinWhen I reproduce - I'll let you know
18:06konstamtinMichael, thanks a lot - Maps works now!
18:06mstenta_konstamtin: great!
18:06mstenta_glad to hear it's working!
18:07mstenta_yes, please do forward along the specific error message when you can! thanks!
18:07konstamtinHonestly - it was not obvious for me to find and setup. Maybe next release it will be easier to navigate as you said
18:07mstenta_The Google Maps API?
18:08konstamtinyes
18:08mstenta_Yes - I've improved that in the next release - it will be a step in the installation
18:08mstenta_So you just copy and paste your key when you are setting up your other initial configuration options, and it gets filled in in the background
18:14konstamtinI also have some issue with Mushrooms module. I've created Substrate type, Species/Breeds records. When I try to create substrate record - it doesn't display relevant fields for Name, Substrate type and Species/Breeds. Only Location filed is displayed. So when I specify Location and try to save - the error displayed that I have to enter Name
18:15mstenta_konstamtin: hmm - that might be because the mushroom module has been updated for the new version of farmOS (which hasn't been released yet)
18:16mstenta_konstamtin: are you comfortable with Git? I can give you a specific commit ID to checkout for the mushroom module that should work with the beta15 of farmOS
18:16konstamtinI think I can try
18:17mstenta_ok - it's pretty easy if you have Git
18:25mstenta_Here is the commit you need: c53b2e5a320df0aa7a9738178a9286dc10be857d
18:25mstenta_It is actually the one right before the latest commit
18:48konstamtinok, when I try to install new instance of farmOS the following error displayed during install profile: "An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: farm1.kostello.ru/install.php?profile=fa StatusText: Internal Server Error ResponseText:"
18:48konstamtinserver logs: PHP Fatal error: Can't use function return value in write context in /www/kostello/users/kostello-farm1/www/htdocs/profiles/farm/modules/farm/farm_import/farm_import.feeds_importer_default.inc on line 217, referer: farm1.kostello.ru/install.php?profile=fa
18:48mstenta_right now farm_mushroom (and a few others) don't have "official" releases... so they aren't pegged to a specific version of farmOS, even though they need to be... i will try to make that a priority moving forward, adn release versions of them that depend on a specific version of farmOS, to avoid that issue
18:49mstenta_konstamtin: ok thanks... let me take a look at that file right now... one moment...
18:50konstamtinServer configuration farm.kostello.ru/info.php
18:50konstamtinI had about 10 similar errors during installation in different modules
18:51mstenta_ok - yea i see why that might be a problem
18:52mstenta_i think i have a fix for it
18:52mstenta_can you test it for me?
18:52konstamtinyes
18:53mstenta_pastebin.com/2ztgGdcK
18:53mstenta_replace the whole farm_import_add_importer_fields() function with that
18:54mstenta_in [webroot]/profiles/farm/modules/farm/farm_import/farm_import.feeds_importer_default.inc
19:02konstamtinok, now the following in error log Can't use function return value in write context in /www/kostello/users/kostello-farm1/www/htdocs/profiles/farm/modules/farm/farm_import/farm_import.feeds_importer_default.inc on line 228
19:03konstamtinactually the same - but row number is shifted due to new function code
19:04mstenta_ok.. hmm looking...
19:06mstenta_ah ok... one sec...
19:06mstenta_(thanks for helping to test this)
19:09mstenta_konstamtin: hmm - actually - what does that line look like in your code?
19:10mstenta_I did find that there were some similar lines in farm_import.feeds_tamper_default.inc (not the same file) - those should probably be fixed too and may be part of the issue
19:11konstamtin if (!empty(field_info_instance($type, $field, $bundle))) {
19:12mstenta_oh - that's not what was in my paste... was it?
19:12mstenta_are you sure you pasted correctly?
19:13mstenta_that line should have changed
19:13mstenta_i made two changes in my fix
19:13mstenta_because there were two lines that were trying to do the same thing
19:14mstenta_replace the whole function with the contents of my paste
19:15konstamtinok, I have git installed and configured wiith basics. Which github url I have enter to get the project clone?
19:15mstenta_and when you're done with that, before you run another test... also replace the entire contents of farm_import.feeds_tamper_default.inc with this: pastebin.com/N3zcbD8i
19:17mstenta_clone farm_mushroom from: github.com/farmOS/farm_mushroom.git
19:17mstenta_and after you have it cloned, go into the directory in your terminal and run:
19:17mstenta_AH BUT!
19:17mstenta_before you do that...
19:18mstenta_make sure that you uninstall the module from farmOS first
19:18mstenta_that means first disable it in /admin/modules
19:18mstenta_and then uninstall it in /admin/modules/uninstall
19:19mstenta_after you do that... clone the repo... and then go into the module directory and run the following command:
19:19mstenta_git reset --hard c53b2e5a320df0aa7a9738178a9286dc10be857d
19:22konstamtinok, now we are progressing - next module /farm/modules/farm/farm_log/farm_log_movement/farm_log_movement.module on line 118
19:22mstenta_ok
19:23mstenta_so i figured out why i haven't experienced this issue before too...
19:23mstenta_it is because PHP 5.5 allows that kind of code, and I've been testing on PHP 5.6
19:23mstenta_would it be possible for you to upgrade to PHP 5.6?
19:24mstenta_there are probably going to be a lot of instances of that issue...
19:25mstenta_i think it will make more sense for me to fix the requirements on farmos.org/hosting/installing/ to say PHP 5.5+
19:27konstamtin5.5 is only available for qiuck resolution - just changing the version in htaccess file. Newer versions - only with special request to hosting support
19:28konstamtinafter changes in htaccess info.php sows that PHP version 5.5.5
19:28mstenta_ok great - that should solve your problems
19:28mstenta_i don't think you need 5.6 - just 5.5
19:29mstenta_i am going to update farmOS.org requirements... it will be hard to find all the places in code that need to be fixed to support 5.4
19:30konstamtinyes, after version changed - installation finished fine
19:32mstenta_great!
19:32mstenta_thanks for helping to figure that out - i wasn't aware of that limitation
19:34mstenta_i updated farmOS.org
19:34konstamtinthanks for your great project FarmOS - I hope it helps me a lot
19:34mstenta_me too!
19:34mstenta_lots of improvements coming in the next version too...
19:35mstenta_i announce new released via my farmier.com newsletter if you would like to get an email when it's ready
19:35konstamtinyes, it will be great
19:36konstamtinI'm going to share my farmOS experience on upcoming meeting of farmers in Moscow, Russia
19:37konstamtinNot many of them speaks English and able to cinfigure whatever site
19:37mstenta_great!
19:37mstenta_ah yea - i am looking forward to adding translations
19:37mstenta_it is technically possible in Drupal 7 - but it will be easier in Drupal 8
19:38konstamtinyes, I can contribute with translation
19:38mstenta_that would be great!
19:38mstenta_i plan to announce a translation initiative via the newsletter as well - to ask for help
19:49konstamtinAs for mushrooms - the problem the same after update
19:50konstamtinI've got new version, updated the files, re-installed the module, cleared cache'
19:51konstamtinOnly location and Status field are visible on "add mushroom substrate" form
19:52mstenta_did you check out the specific commit?
19:52mstenta_you actually need a version that came right before the latest version, not the latest
19:53mstenta_inside the farm_mushroom directory, you need to run the following command:
19:53mstenta_git reset --hard c53b2e5a320df0aa7a9738178a9286dc10be857d
19:54mstenta_you can try that and clear the cache (without uninstalling and reinstalling) and see if that works... but you may need to uninstall/reinstall
19:56konstamtinyes i did git reset. and recreated the module after it. Should I use git commit also?
19:58mstenta_nope
19:58mstenta_hmm
19:59mstenta_can you take a screenshot of the add mushroom form?
19:59mstenta_and post it to imgur.com
20:10konstamtinimgur.com/4IpjIBh
20:20mstenta_konstamtin: hmm strange
20:20mstenta_does the same thing happen on any other asset types?
20:20mstenta_or just mushrooms?
20:20konstamtinI discovered it only for mushrooms
20:21konstamtinI haven't try to create any type of records in FarmOS yet
20:23mstenta_you could try going to /admin/structure/features, and clicking on the Contrib tab
20:23mstenta_and see if the mushroom feature says "Overridden"
20:30konstamtinNo State is Default
20:32konstamtinand Signature is Unavailable
20:32mstenta_huh. very strange
20:33mstenta_i will have to test that myself on a new install and see if i can replicate it
20:33mstenta_i have to go now, though
20:33mstenta_if you have a moment, could you create a bug report on github.com/farmOS/farmOS/issues so I don't forget?
20:34konstamtinok, I also have to go. It was a pleasure to talk with you today. By the way - nice pictures on your site :)
20:34mstenta_thank you! :-)
20:35mstenta_and thanks again for the help!
20:35mstenta_talk to you again soon i hope!
20:41*konstamtin has quit (Ping timeout: 260 seconds)
21:04*trentf has quit (Remote host closed the connection)
21:32*trentf has joined

< 222017-10-23⋏24 >