Creating Product Asset Type

I created a product asset type, but it was installed automatically. Now I can’t find it in my list of assets and can’t uninstall it. Could someone perhaps explain why?

1 Like

Hi @Mim can you describe the steps/commands you ran in detail?

To uninstall a module you need to click the Uninstall tab at the top of the Administration > Extend page.

1 Like

I could only uninstall after deleting my harvest logs, now I neither have a harvest log type nor can I install the product asset.

my github repo for the code incase you need it

@Mim I the problem in your repo: your file is named farm_harvest.info.yml not farm_product.info.yml. That might explain why it seems like it was “automatically” installed, and why you needed to uninstall the Harvest log module.

You shouldn’t have to commit any of this code to your repository. You can configure your composer.json to pull the Product Asset module from GitHub - mstenta/farm_product - Otherwise you lose all the benefit of the code being maintained upstream, and you end up maintaining your own fork, which could end up conflicting with future changes.

Please follow the pattern outlined here for your project repository: Building farmOS with Composer | farmOS - specifically the part about using .gitignore to prevent all of web/modules from being added to your repo: Building farmOS with Composer | farmOS

And if you want to pull in a Composer package from GitHub, this explains how: Repositories - Composer

The Product Asset module I made (GitHub - mstenta/farm_product) is not available through Packagist yet, which is why you need to go through the additional step of adding the GitHub URL to repositories.

1 Like

oh okay, Thanks