| 20:02 | shane_aldrich[m] | I just did some changes in the View UI for my module dashboard. Now I'm not seeing the changes after uninstalling and reinstalling the module. I went to `/admin/config/development/configuration/report/type/system.all` to see what was going on and the view shows up under "missing configuration items". Why would that happen? |
| 20:02 | mstenta[m] | shane_aldrich: did you export the Views config to YML in your module? |
| 20:03 | mstenta[m] | making changes to Views via the UI does not automatically change the YML config |
| 20:03 | mstenta[m] | you would need to export and commit those changes to your module for them to persist |
| 20:03 | shane_aldrich[m] | I did the export. Copied it to my file. Saved it. Then did the uninstall/reinstall. |
| 20:03 | mstenta[m] | oh ok |
| 20:03 | mstenta[m] | huh |
| 20:04 | shane_aldrich[m] | When I click on "import from source", it just takes me to my module dashboard page. |
| 20:04 | mstenta[m] | > the view shows up under "missing configuration items" |
| 20:04 | mstenta[m] | oh interesting... |
| 20:05 | mstenta[m] | you have it in `/config/install` right? not `config/optional`? |
| 20:05 | shane_aldrich[m] | Yeah. No `uuid` in my yml file. And it's in `config/install` |
| 20:05 | mstenta[m] | only thing i can think is that maybe there's something wrong with the YML |
| 20:05 | mstenta[m] | but if you exported straight from drupal then it should be ok |
| 20:06 | mstenta[m] | so... the View does not exist at all when you reinstalled your module? |
| 20:06 | mstenta[m] | it doesn't show under /admin/structure/views? |
| 20:06 | shane_aldrich[m] | Correct. It doesn't show up in the View UI |
| 20:06 | mstenta[m] | hmm |
| 20:06 | mstenta[m] | but it did before? |
| 20:06 | shane_aldrich[m] | It did until I uninstalled |
| 20:07 | mstenta[m] | is this the first time you've tried "installing the view from config"? |
| 20:07 | mstenta[m] | or was that part working before your recent changes? |
| 20:08 | shane_aldrich[m] | I did this a couple months ago and it worked. This time I just made some changes to only show `fungi` assets. |
| 20:08 | mstenta[m] | can you share your YML via pastebin.com perhaps? |
| 20:08 | mstenta[m] | ok, and did you commit that change? |
| 20:08 | shane_aldrich[m] | It's been pushed to my github repository |
| 20:08 | mstenta[m] | if so, you could try rolling back to a previous commit and see if it works |
| 20:09 | mstenta[m] | (to try to isolate the issue) |
| 20:09 | shane_aldrich[m] | Let me try that |
| 20:10 | shane_aldrich[m] | Should that be a git reset? |
| 20:10 | mstenta[m] | otherwise, i might suggest trying to rebuild a VERY simple version of that View from scratch, export it, commit it, uninstall+reinstall... try to get SOMETHING to work... and then use that working one to compare against the original config that isn't working to see if you can figure out what's different/wrong with your current config |
| 20:10 | mstenta[m] | you can do `git checkout [commit-sha]` to jump to a specific commit |
| 20:10 | mstenta[m] | (you won't be on any branch at that point, but you can jump back with `git checkout [branch]` after) |
| 20:11 | mstenta[m] | just make sure you don't have any pending changes! |
| 20:14 | shane_aldrich[m] | "unexpected error' when reinstalling the module |
| 20:14 | mstenta[m] | gul[p |
| 20:15 | shane_aldrich[m] | Maybe it has something to do with the `core.entity_form` yml file? |
| 20:15 | mstenta[m] | if you jump back to the branch you were on, are you able to install? |
| 20:15 | shane_aldrich[m] | I did a `drush cr` after uninstalling |
| 20:15 | mstenta[m] | (be sure to `drush pm-uninstall [module]` first to clean up_ |
| 20:16 | mstenta[m] | > "unexpected error' when reinstalling the module |
| 20:16 | mstenta[m] | did this happen during uninstall? or install? |
| 20:16 | shane_aldrich[m] | Let me try that first |
| 20:16 | shane_aldrich[m] | Install |
| 20:17 | shane_aldrich[m] | Uninstalled via `drush`. Should I use the UI to try and install again? |
| 20:18 | mstenta[m] | may as well just stick to drush |
| 20:18 | mstenta[m] | `drush en [module]` to install |
| 20:19 | mstenta[m] | if you get an error you can try going to /admin/reports/dblog to see if there are any details |
| 20:20 | shane_aldrich[m] | In my command line I get "Missing required properties for an EntityDisplay entity." |
| 20:20 | mstenta[m] | oh ok |
| 20:20 | shane_aldrich[m] | Does that help? |
| 20:20 | mstenta[m] | hmm, i've never seen that before... but did you add fields to your entity earlier? and maybe those did not get saved to your module? |
| 20:21 | mstenta[m] | so they were lost on uninstall? |
| 20:21 | mstenta[m] | (just a guess) |
| 20:21 | shane_aldrich[m] | Not that I can think of. Like I mentioned... I just tried to restrict the view to "fungi" only. |
| 20:22 | mstenta[m] | ok |
| 20:22 | mstenta[m] | so the `core.entity*` config is totally separate/unrelated to `views*` config |
| 20:23 | mstenta[m] | you were able to install the module without this error before you did `git checkout [commit]`? |
| 20:23 | shane_aldrich[m] | yes |
| 20:23 | mstenta[m] | did anything else change between `[commit]` and `[branch]` other than the Views config? |
| 20:23 | shane_aldrich[m] | no |
| 20:23 | mstenta[m] | very strange |
| 20:24 | mstenta[m] | well... how about you try deleting the `core.entity*` config temporarily |
| 20:24 | mstenta[m] | and see if that allows you to install |
| 20:24 | mstenta[m] | (might be two different things happening at once here, causing confusion) |
| 20:24 | shane_aldrich[m] | Here are the two file names I have in `config/install`: |
| 20:24 | shane_aldrich[m] | `core.entity_view_display.taxonomy_term.fungi_type.default.yml` |
| 20:24 | shane_aldrich[m] | `core.entity_form_display.taxonomy_term.fungi_type.default.yml` |
| 20:24 | mstenta[m] | try deleting both of those |
| 20:24 | shane_aldrich[m] | OK |
| 20:25 | mstenta[m] | (assuming they are saved in git history you can get them back easily) |
| 20:25 | shane_aldrich[m] | uninstalling first |
| 20:27 | shane_aldrich[m] | Installed with `drush` and no errors. I'll use your suggestion to start with a simple view to start. |
| 20:28 | mstenta[m] | sounds good |
| 20:28 | mstenta[m] | maybe when you were on your main branch, the Views config installation failed, and then it didn't even try to install the `core.entity*` config.... |
| 20:28 | mstenta[m] | (just trying to guess why you didn't see the same error) |
| 20:29 | mstenta[m] | definitely seems like 2 separate issues intersecting somehow - so yea... try to isolate :-) |
| 20:29 | mstenta[m] | oh or maybe the entity config caused the views config to fail! |
| 20:29 | shane_aldrich[m] | I've been using my `0.0.1` branch for everything. When I create this view from the UI, should I also create a page? |
| 20:30 | mstenta[m] | maybe checkout your main branch again, delete those two files and see if the view works now! |
| 20:30 | mstenta[m] | maybe it was just the `core.entity*` config that was breaking everything |
| 20:31 | shane_aldrich[m] | I've reverted the `core.entity*` config to before this happened. |
| 20:51 | shane_aldrich[m] | I made a real simple view that doesn't show anything at the moment (no fungi assets added yet). So I'm ready to do the export. How should I name the yml file? |
| 20:51 | mstenta[m] | go to the export page |
| 20:52 | mstenta[m] | and underneath the textarea with the YML to copy there is a filename |
| 20:52 | shane_aldrich[m] | Ha! How did I miss that? 🤣 |
| 20:52 | mstenta[m] | it's pretty tiny :-) |
| 20:52 | shane_aldrich[m] | it is! |
| 20:55 | shane_aldrich[m] | Now that I have that done. No errors! 🎉 |
| 20:55 | shane_aldrich[m] | What is the best way to add a form to my module for adding fungi assets? I want to try and accomplish this through my module's navigation before I move on. |
| 20:56 | mstenta[m] | woo hoo! |
| 20:56 | mstenta[m] | oh! make a quick form!!! |
| 20:56 | mstenta[m] | paul121 and i literally just merged the `2.x-quick` branch which adds support for this |
| 20:57 | mstenta[m] | i have to run though - 5 oclock here |
| 20:57 | paul121[m] | hot off the press :-) |
| 20:57 | mstenta[m] | i'm releasing 2.0.0-alpha5 RIGHT NOW |
| 20:57 | mstenta[m] | which includes it :-) |
| 20:57 | mstenta[m] | so you can update to that shortly... |
| 20:57 | shane_aldrich[m] | So I should do a fresh farmOS install then? ;) |
| 20:57 | mstenta[m] | wait for alpha5... couple minutes ;-) |
| 20:58 | shane_aldrich[m] | OK. Stepping out for a smoke. I'll be back! |
| 20:59 | mstenta[m] | twitter.com/farmOSorg/status/14534663087 |
| 21:03 | shane_aldrich[m] | How should I update? |
| 21:04 | shane_aldrich[m] | drush? |
| 21:05 | shane_aldrich[m] | Does this method still apply? farmos.org/hosting/updating/ |
| 21:22 | mstenta[m] | No that's for farmOS 1.x |
| 21:22 | mstenta[m] | You're not using Docker, correct? |
| 21:23 | mstenta[m] | The GitHub release for alpha5 has a tarball |
| 21:24 | mstenta[m] | That includes the fully built farmOS codebase |
| 21:25 | mstenta[m] | I'm assuming you're running a version older than alpha4... So you will probably need to install from scratch |
| 21:26 | shane_aldrich[m] | No Docker. I'm going through my usual procedure right now. |
| 21:27 | mstenta[m] | github.com/farmOS/farmOS/releases/tag/2. |
| 21:27 | mstenta[m] | The tarball is available there |
| 21:27 | shane_aldrich[m] | Already downloaded and uncompressed. :) |
| 21:54 | shane_aldrich[m] | Alpha 5 up and running. I'll play around with the quick form for fungi assets before I have to take off. Meeting up with a friend in Oakland who is giving me a DJI Phantom 4 drone. |
| 21:55 | shane_aldrich[m] | Where do I find quick forms? |
| 22:05 | paul121[m] | quick form docs are here: docs.farmos.org/development/module/quick |
| 22:05 | paul121[m] | just noticed, it looks like they didn't an entry in the menu... |
| 22:05 | paul121[m] | github.com/farmOS/farmOS/runs/4027448205 |
| 22:06 | shane_aldrich[m] | I couldn't find it anywhere. I'll check out your links now. |
| 22:08 | shane_aldrich[m] | So it looks like this will be a better solution for my module instead of using PHP controller files. |
| 22:09 | shane_aldrich[m] | Is there a way to accomplish this through the UI? If so, what would be the URL? |
| 22:11 | paul121[m] | Yea, it's almost the same thing as the PHP controller files, but saves you a couple of the steps |
| 22:11 | paul121[m] | You still need to create the form in a PHP file |
| 22:13 | shane_aldrich[m] | OK. I'll need to look over the examples and see what I can come up with. Right now, I just want to have the ability to add new fungi strains directly from my module under the `purchasing/genetics` tab |
| 22:22 | paul121[m] | okay. yeah I'd start with the quick form |
| 22:22 | paul121[m] | is the `purchasing/genetics` tab something you added to the menu? |
| 22:24 | shane_aldrich[m] | I've got a bunch of tabs. You can install the module to see them. |
| 22:26 | shane_aldrich[m] | Where are `phpcs` and `phpcbf` located now? |
| 22:28 | paul121[m] | neat |
| 22:28 | paul121[m] | I believe they are in `vendor/bin` |
| 22:29 | shane_aldrich[m] | not there in alpha 5 |
| 22:30 | paul121[m] | hmm you know I don't think they would be included in our production release since they are development tools |
| 22:30 | shane_aldrich[m] | cool. I can point them to my other installation in PhpStorm. That will happen tomorrow. |
| 22:31 | paul121[m] | you have composer? |
| 22:31 | paul121[m] | > composer require squizlabs/php_codesniffer |
| 22:31 | shane_aldrich[m] | I do |
| 22:32 | paul121[m] | that might get both of them for ya |
| 22:32 | paul121[m] | but.... in our development docker image we do a couple other things to set them up... so not sure if that will out of the box for ya |
| 22:33 | shane_aldrich[m] | that's cool. I have them in my `/usr/bin` |
| 22:36 | shane_aldrich[m] | Last thing before I need to leave. I'm getting the following error with codesniffer: `Referenced sniff "Drupal" does not exist` |
| 22:36 | shane_aldrich[m] | I can't remember how to rectify that |
| 22:40 | paul121[m] | ah that's what I was referring to :-) |
| 22:41 | paul121[m] | we configure phpcs right here: github.com/farmOS/farmOS/blob/daa75281cd |
| 22:41 | paul121[m] | you might just need to do this: `vendor/bin/phpcs --config-set installed_paths /var/farmOS/vendor/drupal/coder/coder_sniffer` |