| 00:42 | * | FijiDave has quit (Ping timeout: 276 seconds) |
| 00:43 | * | FijiDave has joined |
| 01:37 | * | JustTB has quit (Quit: Leaving.) |
| 01:38 | * | JustTB has joined |
| 03:21 | * | FijiDave_ has joined |
| 03:23 | * | FijiDave has quit (Ping timeout: 276 seconds) |
| 05:18 | * | JustTB has quit (Quit: Leaving.) |
| 06:38 | * | JustTB has joined |
| 09:05 | * | JustTB has quit (Read error: Connection reset by peer) |
| 18:32 | * | FijiDave has joined |
| 18:32 | * | FijiDave_ has quit (Read error: Connection reset by peer) |
| 18:51 | skipper_is[m] | Oh man, Drush has somehow uninstalled/disabled itself... |
| 18:54 | mstenta[m] | skipper_is: Huh. You're using the farmOS "dev" Docker image? |
| 19:01 | skipper_is[m] | Git clone from github |
| 19:01 | skipper_is[m] | and then drush make |
| 19:02 | skipper_is[m] | Also, the new animal weights, what is the best way of logging weights? Is there a quick form? |
| 19:04 | mstenta[m] | Yea! (sort of) |
| 19:04 | mstenta[m] | not exactly a "Quick Form" but it is a "quick" "form" ;-) |
| 19:05 | mstenta[m] | Go to Assets > Animals, select one or more, and click the "Weight" button that appears at the bottom |
| 19:05 | skipper_is[m] | Oh yea, look at that |
| 19:05 | mstenta[m] | You can also import observation logs that reference the animal with a "weight" measure |
| 19:06 | mstenta[m] | Just make sure they are observation logs... |
| 19:06 | mstenta[m] | I'm currently helping someone who imported them all as activities... it's a bit hairy converting log types after they are created |
| 19:06 | skipper_is[m] | Hmm, the drop downs for logs and assets appear to only be visible when on the asset or log page.. |
| 19:06 | skipper_is[m] | Has that always been like that? |
| 19:06 | mstenta[m] | So what happens when you try to use the `drush` command |
| 19:06 | mstenta[m] | Hmm not sure |
| 19:07 | skipper_is[m] | Says it can't find drush |
| 19:07 | mstenta[m] | > Hmm, the drop downs for logs and assets appear to only be visible when on the asset or log page.. |
| 19:07 | mstenta[m] | What page are you on when that happens? |
| 19:07 | mstenta[m] | > Says it can't find drush |
| 19:08 | mstenta[m] | Well that is strange, huh |
| 19:08 | mstenta[m] | How did you install Drush? |
| 19:08 | * | uploaded an image: image.png (13KB) < matrix.org/_matrix/media/r0/download/mat > |
| 19:08 | skipper_is[m] | This is the dashboard |
| 19:08 | skipper_is[m] | This is from logs: |
| 19:08 | mstenta[m] | By following the install instructions on www.drush.org? |
| 19:08 | * | uploaded an image: image.png (12KB) < matrix.org/_matrix/media/r0/download/mat > |
| 19:08 | skipper_is[m] | And this is from assets |
| 19:09 | * | uploaded an image: image.png (9KB) < matrix.org/_matrix/media/r0/download/mat > |
| 19:09 | mstenta[m] | Hm. I've seen that happen sometimes - I think it means something got messed up with the menu cache - not 100% sure |
| 19:09 | skipper_is[m] | I'll CC |
| 19:09 | mstenta[m] | If you can get Drush working, you can try `drush cc menu` to see if it fixes it |
| 19:10 | mstenta[m] | Or try going to /admin/modules and submitting the form |
| 19:10 | mstenta[m] | I know that resets the menu cache |
| 19:10 | mstenta[m] | I'm not sure if clearing the general caches will do it |
| 19:10 | mstenta[m] | I've only ever had that happen on my local dev instance when I was messing with menu items in modules... |
| 19:11 | skipper_is[m] | Performance clear all worked |
| 19:12 | skipper_is[m] | Though it through a new error: PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "grazing" LINE 1: ...ERE entity_type = 'farm_plan_type' AND entity_id = 'grazing' ^: DELETE FROM {farm_quick_entity} WHERE entity_type = :entity_type AND entity_id = :entity_id; Array ( [:entity_type] => farm_plan_type [:entity_id] => grazing ) in farm_quick_entity_delete() (line 252 |
| 19:12 | skipper_is[m] | /var/www/html/farmOS/profiles/farm/modules/farm/farm_quick/farm_quick.module). |
| 19:12 | mstenta[m] | uh oh |
| 19:12 | skipper_is[m] | Always finding the odd errors |
| 19:12 | mstenta[m] | what's that all about |
| 19:13 | skipper_is[m] | Beats me |
| 19:13 | mstenta[m] | what exactly caused that? |
| 19:13 | skipper_is[m] | Maybe because I disabled the grazing module |
| 19:13 | mstenta[m] | /admin/modules? |
| 19:13 | mstenta[m] | or /admin/config/development/performance? |
| 19:14 | mstenta[m] | it looks like `farm_quick_entity_delete()` was called |
| 19:14 | mstenta[m] | which indicates that entities were being deleted |
| 19:14 | skipper_is[m] | Weird... It was just clearing CC |
| 19:14 | skipper_is[m] | Oh bold |
| 19:14 | mstenta[m] | :-/ |
| 19:14 | mstenta[m] | Can you look in /admin/reports/dblog? |
| 19:15 | skipper_is[m] | /admin/config/development/performance |
| 19:15 | skipper_is[m] | called it |
| 19:16 | mstenta[m] | `farm_quick_entity_delete()` is part of the quick form module - it runs whenever an entity is deleted so that it can clean up any references to entities in {farm_quick_entity} table, which just keeps track of entities that were created by quick forms |
| 19:16 | mstenta[m] | for some reason, it tried deleting entities with an ID of `grazing`??? |
| 19:16 | mstenta[m] | that doesn't make any sense |
| 19:16 | skipper_is[m] | Very odd... Maybe it is trying to tidy up anything left from when grazing was enabled |
| 19:18 | skipper_is[m] | So re-enabling and disabling grazing led to the same error being called (but from admin/modules) |
| 19:18 | mstenta[m] | oh... |
| 19:18 | mstenta[m] | this is the same postgres issue maybe |
| 19:18 | mstenta[m] | or related |
| 19:19 | skipper_is[m] | Oh postgres, you make my life miserable |
| 19:19 | skipper_is[m] | If there was a simple way to switch everything to mysql I sould... |
| 19:19 | skipper_is[m] | * would even |
| 19:19 | mstenta[m] | ok i think i understand what's happening |
| 19:19 | mstenta[m] | and actually it also reveals a small bug in the quick form module |
| 19:20 | mstenta[m] | Drupal is trying to clean up the old "grazing" plan type |
| 19:20 | skipper_is[m] | Yea |
| 19:21 | mstenta[m] | and yea it's related to the postgres issue... hard to explain easily, but i think i understand it |
| 19:21 | mstenta[m] | i think we can fix this manually for you |
| 19:21 | mstenta[m] | one sec... |
| 19:21 | skipper_is[m] | Failed: PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR: column "vidcount" does not exist LINE 5: HAVING (vidcount >= '2') ^: SELECT t.field_farm_animal_tag_revision_id AS field_farm_animal_tag_revision_id, COUNT(t.field_farm_animal_tag_revision_id) AS vidcount FROM {field_revision_field_farm_animal_tag} t GROUP BY t.field_farm_animal_tag_revision_id HAVING (vidcount >= :db_condition_placeholder_0) LIMIT 10 |
| 19:21 | skipper_is[m] | OFFSET 0; Array ( [:db_condition_placeholder_0] => 2 ) in field_collection_update_7009() (line 424 of /var/www/html/farmOS/profiles/farm/modules/contrib/field_collection/field_collection.install). |
| 19:21 | skipper_is[m] | Another one just flagged up, wow I really set the cat amongst the pigeons... |
| 19:22 | mstenta[m] | ok i don't know what that is... `vidcount`? |
| 19:22 | mstenta[m] | are you running update.php? |
| 19:22 | skipper_is[m] | Yea, ran update.php, it was on field_collection module |
| 19:23 | mstenta[m] | did you manually update field_collection? |
| 19:23 | mstenta[m] | i haven't released an update to that in farmOS yet |
| 19:23 | skipper_is[m] | I got the latest dev release from drupal |
| 19:23 | mstenta[m] | this isn't your production database, right skipper_is ? ;-) |
| 19:23 | skipper_is[m] | And overwrote everything bar sites |
| 19:23 | skipper_is[m] | Yup, but I did run a backup |
| 19:24 | mstenta[m] | oh dev release of farmOS? |
| 19:24 | skipper_is[m] | yea |
| 19:24 | mstenta[m] | hehe ok good :-) |
| 19:24 | skipper_is[m] | Though I've not yet tested whether it will restore nicely.. |
| 19:24 | skipper_is[m] | 2.3gb.... I hope it has everything.. |
| 19:25 | skipper_is[m] | The previous one is only 25mb.. |
| 19:25 | skipper_is[m] | No idea what happened there |
| 19:26 | mstenta[m] | ok... so there's a bunch of different things going on here.... i can only help with one at a time |
| 19:26 | mstenta[m] | and only for the next half hour at most |
| 19:26 | skipper_is[m] | Yea, ignore the update one for now |
| 19:28 | mstenta[m] | That field_collection one may be a postgres issue as well... I'm not sure |
| 19:28 | mstenta[m] | (fwiw I want to drop our dependency on field_collection) |
| 19:29 | mstenta[m] | The backup you have... is that from right before you updated to the dev release? |
| 19:29 | skipper_is[m] | I've been using dev release since always, but I just updated to the latest one this evening (just after I made the backup) |
| 19:30 | mstenta[m] | ok |
| 19:30 | mstenta[m] | well... ok... so... |
| 19:30 | mstenta[m] | if you enable the grazing module again, i think that error will go away |
| 19:31 | mstenta[m] | i'm going to push a small commit... |
| 19:31 | skipper_is[m] | When I do clear cc it does |
| 19:33 | mstenta[m] | with the grazing module enabled? |
| 19:33 | skipper_is[m] | Yea, no immediate errors with grazing enabled, clear caches completed sucesfully |
| 19:33 | mstenta[m] | ok cool |
| 19:34 | mstenta[m] | so this commit i'm going to push should resolve that error specifically, which should also allow Drupal to clean up the grazing module properly |
| 19:34 | skipper_is[m] | Ah awesome |
| 19:34 | mstenta[m] | one sec... |
| 19:36 | mstenta[m] | github.com/farmOS/farmOS/commit/79f0a84d |
| 19:36 | mstenta[m] | It's super simple - you can just make the change manually if that's easiest |
| 19:36 | skipper_is[m] | Yea, I'll do that now, nice one! |
| 19:37 | mstenta[m] | It makes me wonder if similar bugs exist though... so I'm checking the codebase... |
| 19:38 | mstenta[m] | Found one more potential instance of it... but it shouldn't affect you |
| 19:39 | mstenta[m] | Cool - yea I think those are the only two |
| 19:39 | skipper_is[m] | Disabling it didn't throw an error! |
| 19:40 | mstenta[m] | To summarize: there were too `hook_entity_delete()` functions in farmOS that were assuming entity IDs are always numeric... but that's not a correct assumption. when entity *types* are deleted, they are deleted by their machine name |
| 19:40 | skipper_is[m] | And... I think everything remains intact... |
| 19:40 | mstenta[m] | * To summarize: there were two `hook_entity_delete()` functions in farmOS that were assuming entity IDs are always numeric... but that's not a correct assumption. when entity _types_ are deleted, they are deleted by their machine name |
| 19:40 | mstenta[m] | Cool! Good find skipper_is ! |
| 19:40 | skipper_is[m] | Aah |
| 19:40 | mstenta[m] | Your track record as expert bug finder continues! |
| 19:41 | mstenta[m] | haha |
| 19:42 | * | farmBOT has joined |
| 19:42 | mstenta[m] | there it is :-) |
| 19:42 | mstenta[m] | just a bit delayed on Riot's part |
| 19:42 | skipper_is[m] | Oh.. |
| 19:42 | skipper_is[m] | Sorry bot |
| 19:42 | mstenta[m] | to recap (for the log): so i'm not sure if it's actually because you are using postgres that that happened actually... BUT if you hadn't discovered that other postgres issue earlier, I wouldn't have thought of the solution to this! |
| 19:43 | mstenta[m] | so related in that sense :-) |
| 19:43 | skipper_is[m] | :) |
| 19:43 | mstenta[m] | now all that said... i do worry for you skipper_is |
| 19:43 | skipper_is[m] | I will continue to poke holes in postgres |
| 19:43 | mstenta[m] | i want farmOS to support postgres, but i also really don't want you to lose data! |
| 19:43 | skipper_is[m] | Ah backups |
| 19:43 | mstenta[m] | yes! pleeeeeaaassse! |
| 19:44 | mstenta[m] | haha |
| 19:44 | skipper_is[m] | Im doing pg_dump farmos (mydb) -f farmos-15-10-19.sql ... I think that's right |
| 19:44 | mstenta[m] | make sure your backup procedure is good |
| 19:44 | skipper_is[m] | It just dumps.. everything |
| 19:44 | skipper_is[m] | Takes a good 5 minutes to do |
| 19:44 | mstenta[m] | ok cool - you're on your own with that - i don't use postgres myself, i just know `mysqldump` |
| 19:44 | mstenta[m] | advice: set up a local dev copy of farmOS and test the import on that |
| 19:44 | skipper_is[m] | Yea.. |
| 19:45 | skipper_is[m] | Good shout |
| 19:45 | mstenta[m] | also remember: database export is only one piece of the backup |
| 19:45 | mstenta[m] | file uploads are stored in `sites/*/files` and `sites/*/private` generally |
| 19:45 | skipper_is[m] | Ah that is a much easier backup though |
| 19:45 | mstenta[m] | yea |
| 19:46 | mstenta[m] | my strategy is generally two fold: create a db dump into `sites/*/private` and then `rsync` backup the whole `sites/*` directory |
| 19:46 | mstenta[m] | so then you have a db snapshot and the files |
| 19:47 | skipper_is[m] | is sites/*/private protected then? I'm assuming so from the private side of the name |
| 19:47 | mstenta[m] | just make sure Drupal is managing the `private` directory, so it has the proper `.htaccess` file to prevent public reading it |
| 19:47 | mstenta[m] | yea ^ |
| 19:47 | mstenta[m] | it's even safer to store db dumps outside of the webroot, of course |
| 19:48 | skipper_is[m] | mine are in home/me/farmOSBackups |
| 19:48 | mstenta[m] | go to `/admin/config/media/file-system` to make sure your private dir is configured |
| 19:48 | mstenta[m] | that works |
| 19:50 | mstenta[m] | skipper_is: question... |
| 19:50 | mstenta[m] | do you still have the patch from www.drupal.org/project/entity/issues/307 applied? |
| 19:51 | skipper_is[m] | Depends, was it merged with the main distribution? |
| 19:51 | mstenta[m] | no |
| 19:51 | mstenta[m] | ok so the update to dev probably removed it |
| 19:51 | skipper_is[m] | Then I do not |
| 19:51 | mstenta[m] | so actually... that patch probably also would have fixed the error |
| 19:52 | mstenta[m] | because it changes the way entity types are deleted, ensuring that it always uses their numeric ID |
| 19:52 | skipper_is[m] | Aah |
| 19:52 | mstenta[m] | but still good to fix it in farmOS's `hook_entity_delete()` functions too |
| 19:52 | mstenta[m] | so now it will be extra fixed :-) |
| 19:54 | skipper_is[m] | I'll repatch |
| 19:55 | mstenta[m] | probably a good idea |
| 19:55 | mstenta[m] | i do plan on merging that into farmOS |
| 19:57 | skipper_is[m] | It is profiles/farm/modules/contrib/entity/? |
| 20:04 | skipper_is[m] | Will keep the patched files on my pc to copy across if there is an update |
| 20:10 | mstenta[m] | yep that's it |
| 20:13 | skipper_is[m] | Set up a file backup now as well, monthly... probably enough |
| 20:13 | skipper_is[m] | I am still slightly shocked at my db size though... |
| 20:14 | mstenta[m] | yea i don't know what that's all about |
| 20:14 | skipper_is[m] | I'm going to try some other approaches.. see whether I can shrink that... |
| 20:15 | mstenta[m] | i wonder if postgres does something different? |
| 20:15 | skipper_is[m] | Because my entire farmOS install + September drone map at 2cm resolution of the farm is smaller than that |
| 20:15 | skipper_is[m] | Just bloats the backup.. |
| 20:15 | mstenta[m] | hmm yea... |
| 20:16 | mstenta[m] | and i would assume the drone map is not stored in the db, right? |
| 20:16 | mstenta[m] | (side note: "2 cm resolution"!!!!!) |
| 20:18 | skipper_is[m] | I would sincerely hope not |
| 20:18 | skipper_is[m] | I was bored, and it is only like 12ha |
| 20:19 | mstenta[m] | you would have to go out of your way to store images in the db |
| 20:20 | mstenta[m] | uploaded files in farmOS are stored in `sites` folder, and referenced in the db |
| 20:39 | skipper_is[m] | Insane... Cannot get the file format down below 2gb... |
| 20:40 | mstenta[m] | i wonder if there's some kind of garbage collection that needs to be run? |
| 20:41 | skipper_is[m] | Yea, maybe... |
| 20:43 | skipper_is[m] | On the db stats, it says it is 350mb |
| 20:47 | mstenta[m] | Even that seems a little big - but much more reasonable |
| 20:50 | skipper_is[m] | cache_.... tables... What is in them? |
| 20:50 | skipper_is[m] | Shouldn't they be cleared out when I do cc? |
| 20:51 | * | FijiDave has quit (Read error: No route to host) |
| 20:52 | * | FijiDave has joined |
| 20:53 | mstenta[m] | some are... but not all |
| 20:53 | mstenta[m] | you could consider `TRUNCATE`ing them before you backup |
| 20:54 | skipper_is[m] | cache form has 12k rows.. |
| 20:56 | mstenta[m] | yea that's a big one |
| 20:56 | mstenta[m] | you can wipe it out |
| 20:56 | mstenta[m] | all the tables that start with `cache_` are not needed in a backup |
| 20:56 | skipper_is[m] | But not enough to make 2gb of difference... |
| 20:57 | skipper_is[m] | I get that each row needs an "INSERT INTO..." but still... |
| 20:58 | skipper_is[m] | Holy.... |
| 20:58 | skipper_is[m] | So I truncated cache_forms |
| 20:58 | skipper_is[m] | 12mb |
| 21:11 | mstenta[m] | Total?? Haha |
| 21:11 | mstenta[m] | I guess that makes some sense |
| 21:12 | mstenta[m] | The form cache can be pretty big |
| 21:12 | skipper_is[m] | That is insane! |
| 21:12 | mstenta[m] | Oh... Do you have Cron configured to run regularly? |
| 21:12 | mstenta[m] | That is responsible for clearing those |
| 21:12 | skipper_is[m] | I do not |
| 21:12 | skipper_is[m] | I thought I did actually |
| 21:13 | skipper_is[m] | Cron maintenance tasksLast run 2 hours 27 min ago |
| 21:14 | mstenta[m] | Oh huh |
| 21:14 | mstenta[m] | Maybe Google that |
| 21:14 | skipper_is[m] | Goes every 3h, I assume that is default |
| 21:14 | mstenta[m] | Specifically the cache form issue |
| 21:14 | mstenta[m] | For drupal generally |
| 21:15 | skipper_is[m] | I'm going to do a python script to sync all the backups up, and I'll just add truncate to that... |
| 21:15 | skipper_is[m] | if "cache_" in tablename: truncate |
| 21:19 | skipper_is[m] | Right then, I'm going to bed...Thank you for your help today! |
| 21:20 | mstenta[m] | Sounds good |
| 21:20 | mstenta[m] | Sure thing! |
| 22:24 | * | FijiDave has quit (Ping timeout: 276 seconds) |
| 22:36 | * | FijiDave has joined |
| 22:39 | * | FijiDave has quit (Client Quit) |