| 18:19 | shane_aldrich[m] | I started playing with the UI for `genus`, `species`, and `microscope_photos` so I can export those and add them to `farm_shane_fungi`. But when I try to edit the field settings for `microscope_photos` I get this error: "An illegal choice has been detected. Please contact the site administrator." when I try to select unlimited for the number of values. Does this have something to do with the private file system? |
| 18:47 | paul121[m] | hmm. I know that some field settings can't be changed once you've create a field via the UI |
| 18:48 | paul121[m] | but I think you should be able to change the cardinality of the field after it has been created (at least expand from limited -> unlimited) |
| 18:48 | paul121[m] | (that is one of the exceptions) |
| 18:48 | paul121[m] | (for example you can't change the field ID since the db tables/columns are already created) |
| 18:48 | paul121[m] | you might need to delete the field & recreate if it isn't cooperating with you! |
| 18:58 | shane_aldrich[m] | This happened during the initial creation of the field. So I exported it and have it in phpstorm now. What should I change the cardinality to? |
| 19:00 | shane_aldrich[m] | Nevermind. I looked at the `plant_type` image field and saw it set as `-1` |
| 19:03 | shane_aldrich[m] | OK. So I've gone through the UI to create the following terms and fields: `genus`, `species`, `microscope_photos`, `raw_material`, and `supplement` |
| 19:03 | shane_aldrich[m] | I'll delete what I created through the UI and then install my module to test it out (after I take a shower). |
| 19:08 | paul121[m] | nice! |
| 19:56 | shane_aldrich[m] | So I'm getting "unmet dependencies" for `genus` and `species` when I try to install `farm_shane_fungi`. Can someone look at my `0.0.1` repo for advice? |
| 20:40 | paul121[m] | it looks like both `genus` and `species` depend on the `fugi_type` vocabulary (`taxonomy.vocabulary.fungi_type`) |
| 20:40 | paul121[m] | but I don't see a `taxonomy.vocabulary.fungi_type` in your config/install: github.com/s33a/farm_shane_fungi/tree/0. |
| 20:41 | paul121[m] | might have forgotten to export that vocabulary? |
| 20:41 | mstenta[m] | git.drupalcode.org/project/farm_fungi/-/ |
| 20:41 | mstenta[m] | that's provided by `farm_fungi` module |
| 20:42 | paul121[m] | ah yes |
| 20:44 | paul121[m] | I saw `shange_fungi_type` disappeared with the new version, but that makes sense! |
| 20:48 | paul121[m] | maybe this line? github.com/s33a/farm_shane_fungi/blob/55 |
| 20:48 | paul121[m] | should be `farm_fungi:farm_fungi` I think? |
| 20:48 | paul121[m] | (because `farm_fungi` is provided by the `farm_fungi` project, not the `farm` project) |
| 20:49 | paul121[m] | but maybe that's only a soft requirement and isn't really an issue? |
| 21:11 | shane_aldrich[m] | Just tried `farm_fungi:farm_fungi` in my `info.yml` file and it didn't work. I'll try to do the same with the `field` and `field.storage` files to see what happens. |
| 21:16 | paul121[m] | it probably just needs to be `farm_fungi` in those files if it is needed there |
| 21:18 | mstenta[m] | shane_aldrich were all these configs created in the drupal UI and exported to yml? |
| 21:18 | mstenta[m] | Or did you do anything manually in the yml |
| 21:19 | mstenta[m] | > yea always best to do it in the UI and then export... that way Drupal generates the YML so you can be sure it's all correct |
| 21:19 | mstenta[m] | ^ |
| 21:20 | mstenta[m] | (I'm not at my laptop so my ability to review is limited but taking a quick look now) |
| 21:22 | mstenta[m] | Are both the species and genus fields referencing other terms in the fungi type vocabulary? |
| 21:24 | shane_aldrich[m] | I had the issue from the get-go with the code provided by Drupal. So I added the `farm_fungi` dependency. After changing my `info.yml` file to `farm_fungi:farm_fungi` and removing `farm_fungi:` from ` the `genus` and `species` files, it installs without error. Now to see how things look. |
| 21:26 | mstenta[m] | I don't think the "unmet dependencies" is related to the .info.yml dependencies. Just the config dependencies |
| 21:26 | mstenta[m] | And yeah, in those you don't use the farm_fungi: prefix |
| 21:27 | shane_aldrich[m] | Everything has been pushed to my repo. You can see what I have there now. I think what paul121 mentions about `farm_fungi:farm_fungi` did the trick. |
| 21:27 | mstenta[m] | Which genus and species files are you referring to because there are two of each |
| 21:27 | shane_aldrich[m] | All of them |
| 21:27 | mstenta[m] | Oh it's working now? |
| 21:28 | paul121[m] | it's possible .info.yml issue prevented `farm_fungi` from being installed (that was my thought) |
| 21:28 | paul121[m] | well, not prevented, but didn't depend on it, so it was never installed |
| 21:29 | shane_aldrich[m] | it has been installed for the last few days while I played with the UI stuff. |
| 21:31 | shane_aldrich[m] | Aw crap! somehow I did an undo in phpstorm and it added my `shane_fungi_types` vocabulary back in. so it's showing up in farmOS. I'm just going to ignore that for now. |
| 21:32 | shane_aldrich[m] | just looked at Fungi types vocabulary and neither `genus` nor `species` show up in terms. Hmmm |
| 21:33 | mstenta[m] | One thing to note: if your module provides config in config/install it will NOT be uninstalled when you uninstall the module unless you declare it as an "enforced" dependency |
| 21:34 | mstenta[m] | For example: github.com/farmOS/farmOS/blob/b8b3d8c5d0 |
| 21:35 | mstenta[m] | So that is best practice... To ensure that you can uninstall a module (and all the config it provides) cleanly |
| 21:35 | shane_aldrich[m] | so I would need to add `farm_shane_fungi` to the enforced module section as well? |
| 21:35 | mstenta[m] | Yes |
| 21:35 | mstenta[m] | You will notice that if you try to uninstall and then reinstall without that it will error |
| 21:36 | mstenta[m] | Because the config doesn't get uninstalled so it will say it already exists when you try to install again |
| 21:36 | shane_aldrich[m] | OK. I guess I need to to a clean install of farmOS. Or... could I change those files and `drush cr` to see if that works? |
| 21:36 | mstenta[m] | Yea clean install might be easiest |
| 21:36 | mstenta[m] | Drush cr won't do it |
| 21:37 | mstenta[m] | You would need to make that change in yml and then revert them all with the config_update_ui module |
| 21:38 | mstenta[m] | (but once you add that stuff to yml and do a fresh install then it will be possible to uninstall+reinstall the module without a whole drupal reinstall) |
| 21:38 | shane_aldrich[m] | Cool. I need to do a couple of personal things for the next 30 minutes. When I get back to the computer, I'll edit the config files and get the fresh install going. |
| 21:43 | mstenta[m] | > just looked at Fungi types vocabulary and neither `genus` nor `species` show up in terms. Hmmm |
| 21:43 | mstenta[m] | I think I know why |
| 21:44 | mstenta[m] | Did you configure "Manage form display" and "Manage display" after you added those fields? |
| 21:44 | mstenta[m] | That is a separate config that needs to be exported (unfortunately IMO) |
| 21:49 | mstenta[m] | So the fields are probably there (tables in the database) |
| 21:50 | mstenta[m] | But they are hidden by default |
| 21:50 | mstenta[m] | Until you provide the config to show them |
| 21:52 | shane_aldrich[m] | When I go into "Manage form display" and "Manage display" they are "disabled". How do I fix that for the next install? |
| 21:52 | mstenta[m] | 1. Configure how you want them to appear in both of those places |
| 21:52 | mstenta[m] | 2. Export the config for both of those to your module |
| 21:53 | mstenta[m] | Off the top of my head they are called "entity form display" and "entity display" or something like that |
| 21:53 | mstenta[m] | (in the config export type drop-down) |
| 21:55 | shane_aldrich[m] | I exported the code from what I generated through the UI for all terms, fields, and field storage with only `farm_fungi` installed. Which is why I don't understand terms not showing up in the "Fungi types" vocabulary. |
| 21:56 | shane_aldrich[m] | The fields show up fine |
| 22:00 | mstenta[m] | Oh maybe I'm misunderstand |
| 22:00 | mstenta[m] | * Oh maybe I'm misunderstanding |
| 22:01 | shane_aldrich[m] | Fresh install happening now |
| 22:02 | mstenta[m] | What do you mean by "terms not showing up in the vocabulary"? |
| 22:07 | shane_aldrich[m] | I'll take a screenshot once I'm back up and running. Installing other modules now. |
| 22:18 | shane_aldrich[m] | There will be a series of screenshots starting with just `farm_fungi` enabled |
| 22:19 | * | uploaded an image: (82KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:19 | * | uploaded an image: (62KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:19 | shane_aldrich[m] | Now I'll install `farm_shane_fungi` |
| 22:21 | * | uploaded an image: (76KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:21 | * | uploaded an image: (77KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:22 | * | uploaded an image: (154KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:22 | * | uploaded an image: (102KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 22:22 | shane_aldrich[m] | That's it. |
| 22:23 | mstenta[m] | Cool! Looks like the fields installed properly as expected |
| 22:23 | mstenta[m] | Aside from being disabled |
| 22:23 | mstenta[m] | Which will be fixed once you export the form and display config |
| 22:26 | shane_aldrich[m] | But the terms still aren't showing up. Is that due to them being disabled? Also, I can't uninstall my module again. I did the enforced changes, but I probably didn't do it right. |
| 22:29 | shane_aldrich[m] | And I can't figure out how to export those files. I went to `admin/config/development/configuration/single/export` and don't see an option there for those particular files. |
| 22:31 | paul121[m] | "No terms available. Add term." shane_aldrich is that what you think the problem is? (just clarifying) |
| 22:32 | shane_aldrich[m] | Yeah. I have all of the yml config files in `config/install` but they just won't show up there. |
| 22:33 | paul121[m] | ah okay - I think it's just a misunderstanding! |
| 22:33 | paul121[m] | that isn't a problem! |
| 22:34 | paul121[m] | terms themselves are "content entities" - not config entities |
| 22:34 | paul121[m] | if you go to `admin/structure/taxonomy/manage/farm_fungi/add` you can add individual terms |
| 22:34 | paul121[m] | and the "No terms available" message will go away |
| 22:35 | paul121[m] | what you've done is configured the `genus` and `species` fields to be available on each term |
| 22:36 | shane_aldrich[m] | All of that code I used to generate the files came from me adding those terms to "Fungi types" and doing a single export. |
| 22:38 | shane_aldrich[m] | Maybe I'm not understanding "terms" properly here. Are you saying that in that space, it would actually be data that has been entered for `genus` and `species`? |
| 22:38 | paul121[m] | shane_aldrich[m]: "adding those *fields* to the fungi_type *vocabulary* and doing a single export" is more correct |
| 22:39 | paul121[m] | yea.. "terms" has a specify meaning in this context |
| 22:39 | paul121[m] | * yea.. "terms" has a specific meaning in this context |
| 22:40 | shane_aldrich[m] | I see what you mean by the code I generated. |
| 22:41 | paul121[m] | <paul121[m]> "if you go to `admin/structure/ta" <- should be `admin/structure/taxonomy/manage/fungi_type/add` - my bad |
| 22:41 | paul121[m] | does that work? that page is where you create an individual "term" (a content entity, a row in the database) |
| 22:42 | paul121[m] | and on those terms you've made it possible to define a `genus` and `species` for that single term |
| 22:42 | paul121[m] | * and for the fungi_type you've made it possible to define a `genus` and `species` for individual terms |
| 22:43 | shane_aldrich[m] | So say I have a `fungi_type` (aka common name) of Reishi, and the `genus` is Gandoderma and the `species` is lucidum, those won't show up until entered into the database. |
| 22:44 | shane_aldrich[m] | Cool. That makes more sense! Now how can I export the "Manage form display" and "Manage display" for Fungi types? |
| 22:46 | paul121[m] | should be possible from the same page, export single item, "entity form display" and "entity view display" are the "configuration types" |
| 22:46 | paul121[m] | the "configuration name" should be `taxonomy_term.fungi_type.default` |
| 22:47 | shane_aldrich[m] | This is the only name I see "taxonomy_term.plant_type.default" |
| 22:47 | paul121[m] | mm okay. so you probably need to modify it first |
| 22:48 | paul121[m] | from your screenshots it didn't look like it was modified yet |
| 22:48 | shane_aldrich[m] | So just make a quick change and save? |
| 22:48 | paul121[m] | (drag the genus and species up out of the disabled part of the table) |
| 22:48 | paul121[m] | yep |
| 22:50 | mstenta[m] | (I'm having dinner with family but 👍👍 to what paul121 said 😊) |
| 22:50 | shane_aldrich[m] | don't talk to us while your having dinner with the fam! 🤣 |
| 22:51 | paul121[m] | haha |
| 22:52 | shane_aldrich[m] | That worked like a charm! Now I can move on with that aspect and apply it to `substrate_type` |
| 22:52 | shane_aldrich[m] | But... I would like to know why I still can't uninstall my module. Help! 😜 |
| 22:53 | paul121[m] | can't uninstall `farm_shane_fungi` ? |
| 22:53 | shane_aldrich[m] | yup |
| 22:53 | paul121[m] | did it give a reason? |
| 22:53 | shane_aldrich[m] | the checkbox is greyed out |
| 22:54 | mstenta[m] | github.com/s33a/farm_shane_fungi/blob/07 |
| 22:54 | mstenta[m] | Don't need that |
| 22:54 | mstenta[m] | Not sure if that's why |
| 22:55 | paul121[m] | it should say something like: |
| 22:55 | paul121[m] | > The following reason prevents Log from being uninstalled: |
| 22:55 | paul121[m] | - ... |
| 22:58 | shane_aldrich[m] | It was me just being stupid... I was trying to do it through "Extend List" |
| 22:58 | shane_aldrich[m] | Re-installing now |
| 22:59 | paul121[m] | ooh, yea, I often do the same |
| 23:01 | shane_aldrich[m] | Here's a new error: "Unable to install Shane Fungi, core.entity_form_display.taxonomy_term.fungi_type.default, core.entity_view_display.taxonomy_term.fungi_type.default already exist in active configuration." |
| 23:01 | shane_aldrich[m] | is that in the database? |
| 23:01 | paul121[m] | ahh this is what mike mentioned earlier |
| 23:02 | paul121[m] | can you go here? localhost/admin/config/development/confi |
| 23:03 | paul121[m] | (need to install the Configuration Update Reports module if not) |
| 23:03 | shane_aldrich[m] | I |
| 23:03 | shane_aldrich[m] | * I'm there |
| 23:04 | paul121[m] | so search for those `fungi_type` configs on that page |
| 23:04 | paul121[m] | and delete them |
| 23:04 | paul121[m] | ! only delete the `core.entity_form/view_display.taxonomy_term.fungi_type.default.yml` config |
| 23:05 | shane_aldrich[m] | on it |
| 23:06 | paul121[m] | I would guess they are in the "Added configuration items" group |
| 23:07 | shane_aldrich[m] | Worked! I just did Ctl+F to find "core" and those were the first two |
| 23:07 | paul121[m] | nice, and you were able to install? |
| 23:07 | shane_aldrich[m] | indeed! |
| 23:07 | paul121[m] | great! |
| 23:08 | shane_aldrich[m] | I'm going to sign off for the day. Thank you guys for all of your help! |
| 23:09 | paul121[m] | np! |