Giter Site home page Giter Site logo

craft-inventory's Introduction

Plugin icon

Inventory plugin for Craft CMS 4

Take stock of how your fields are being used.


"Am I using this field? Where am I using this field?"

You no longer have to wonder... Inventory will show you exactly where your fields appear!


⭐️ INVENTORY HAS BEEN RETIRED ⭐️

Inventory will not be ported to Craft 5, because it is no longer necessary!

Craft's new native field management UX replaces all functionality that Inventory provided prior to Craft 5. 👏


How to Install

See official installation instructions on the Craft CMS Plugin Store...

Viewing the Field Inventory

Once the plugin is installed, view your field inventory by going to:

Utilities > Field Inventory

Screenshot of navigating to the Field Inventory utility

Managing the Field Inventory

After determining how your fields are being used, it's possible to then delete or edit those fields. Or you can "Edit layout" to change how (or whether) the field appears in that layout.

Screenshot of expanded field information


Anything else?

We've got other plugins too!

Check out the full catalog at plugins.doublesecretagency.com

On behalf of Double Secret Agency, thanks for checking out our plugin! 🍺

Logo for Double Secret Agency

craft-inventory's People

Contributors

jensderond avatar lindseydiloreto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seanpm2001

craft-inventory's Issues

A possible bug?

Hi,
When I click on inventory I get this error:

screen

  • Craft CMS 3.7.10
  • Inventory 2.1.1
  • PHP version 7.4.3
  • MySQL 8.0.26

Thanks for any suggestion

Matrix field inventory?

Hi, nice plugin! Am I correct that this doesn't support matrix fields/blocks?
I'd like to delete a few blocks in my matrix field, but I'm not sure if those blocks are in use. This seems like the perfect plugin to determine that.

Thanks!

Undefined column error on postgres

When accessing the plugin main page on a Craft 3 site using postgres I'm getting the error below.

I could fix the issue by enclosing the column names in double quotes, e. g. in src/services/InventoryService.php
->where('fieldId=:id', [':id' => $field->id])
becomes
->where('"fieldId"=:id', [':id' => $field->id])

With the same change also applied to "fieldLayoutId", the plugin index page works fine.

I don't have much experience in postgres so I'm not sure if I'm missing anything here, but this might be useful to someone.

LINE 3: WHERE fieldId=$1
^
HINT: Perhaps you meant to reference the column "craft_fieldlayoutfields.fieldId".
The SQL being executed was: SELECT "layoutId", "tabId"
FROM "craft_fieldlayoutfields"
WHERE fieldId=554
ORDER BY "layoutId"
Error Info: Array
(
    [0] => 42703
    [1] => 7
    [2] => ERROR:  column "fieldid" does not exist
LINE 3: WHERE fieldId=$1
              ^
HINT:  Perhaps you meant to reference the column "craft_fieldlayoutfields.fieldId".
)
↵
Caused by: PDOException
SQLSTATE[42703]: Undefined column: 7 ERROR: column "fieldid" does not exist
LINE 3: WHERE fieldId=$1
^
HINT: Perhaps you meant to reference the column "craft_fieldlayoutfields.fieldId".

Clone fields

This is a feature from Field Manager. It seems Field Manager and inventory really compliment each other with some overlap, but it would be awesome if we only needed 1 plugin and cloning is my most used feature from Field Manager.
Inventory looks better, so hence my preference :)

Unexpected token "punctuation" of value "?"

Known compatibility issue:

This error is being triggered by the null coalescing operator, which was added to Craft 2.6. If you're seeing this error, it's safe to assume that you're running a version of Craft prior to 2.6.

There are two possible solutions:

  • Upgrade to the latest version of Craft.
  • Add the QQ plugin from Top Shelf Craft. This provides legacy support for the null coalescing operator in older versions of Craft.

Trying to access array offset on value of type null

Hi, im using craft-inventory to check fields, but actually after install on craft 4.3.10
i got this, pls help

Trying to access array offset on value of type null

in /var/www/html/vendor/doublesecretagency/craft-inventory/src/services/InventoryService.php line 179

TypeError on Craft3

I'm pretty sure this plugin was working on Craft3 a few weeks ago but last week I noticed this error occurring when loading the plugin. The weird part is that if I randomly add an id to the url some of them work, some don't.

Argument 1 passed to craft\services\Sections::getSectionById() must be of the type integer, null given, called in /chroot/home/domainname.com/vendor/doublesecretagency/craft-inventory/src/services/InventoryService.php on line 117

Error has occurred on our staging server which is:
Craft 3.0.14-15
PHP 7.0.28

I cannot get the error to show up on my local MAMP setup where I've tested both PHP 7.0 and 7.1.

Field added to section but Inventory not reporting it

Exploring Inventory to help with a site redesign and build but confidence in plugin is not yet strong. Wondering if there is something I need to do.

I have at least one case where a matrix field is added to a section but that field is not being shown by inventory as being used anywhere. Is there a setting or cache or something that might be need to be set, cleared, or something done to make sure getting accurate results?

Does Inventory support all Craft basic field types? Does it support other plugin fields?

This seems like it could be a very helpful plugin to clean up unused fields and modify others when trying to simplify a site's architecture.

Thanks,
Seth

Add setting to hide/show plugin in main menu

I dont think all site users need to see this plugin link in main menu. Its not usefull for them and might lead to confusion.
Therefore, i propose making plugin avaible from "settings" page by default, and as I said in title, option to hide/show it in main menu.

Exception when running Craft update from CLI

Just upgraded to Craft Inventor v 3.0.0 on Craft 4.4.7.1. I could only upgrade with the plugin disabled due to the following error. It also appears when I enable the plugin after the update.

Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: craft\console\Request::getCookies()

Stack trace:
#0 /vendor/doublesecretagency/craft-inventory/src/Inventory.php(53): yii\base\Component->__call('getCookies', Array)

Calendar Event Not Found

Getting this error after install and I go to click on to see inventory.

Class 'Calendar_Event' not found

"This field is translatable" column

I'd love to see a column that indicated whether that setting is enabled or not. We currently have to open every field type individually to get that info.

Craft 5 compatibility?

Hey, As Craft 5 is officially launched. Could you consider making this plugin upgrade to craft 5 please?

Inventory showing count for entry types of sections that have been removed

I'm in the process of cleaning up a site and I've removed some old sections. When I go into Inventory, I see that it's still showing some fields attached to entry types for those sections that no longer exist. Am I missing a step in cleaning out those entry types, or is Inventory caching results?

A more accurate count for the callToActionText field would be 6, not 12!

Sample of first few rows of what I see for that field:
image

Option to disable the plugin in non-`dev` environments

Option for active use of the plugin only on development mode? I think most of the time it is not necessary to see this plugin on production.

You know... on production Craft Settings are not visible, fields are not visible, it is not necessary to see the fields on production, same for this plugin, this useful plugin is best to work locally on dev mode.

Just a silly example, but you have the idea, config/inventory.php

$isDev = App::env('ENVIRONMENT') === 'dev';

return [
    '*' => [
        'inventoryEnabled' => $isDev,

Add a license?

I'd like to use Inventory on a client project, but the client is hesitant because the plugin has no licensing info. Would it be possible to add a license to your project?

Craft 5 compatibility

Noticed this isn't showing on the C5 plugin store yet, and C5 is due out by the end of the month. Is this being updated for C5?

Add ability to delete field

Per our conversation on Slack, it would be great to have the ability to delete fields that aren't in use right from the inventory screen. 👍

Make Available via `composer` Compatible with Craft 2

Summary

Some companies still require Craft 2. The last Craft 2-compatible commit is desirable. But, that commit is not available as a release in a way that is readily available via composer.

Steps

Unsuccessful Installation of 1.0.1

  1. composer require --dev doublesecretagency/craft-inventory:1.0.1

     [InvalidArgumentException]                                                             
     Could not find package doublesecretagency/craft-inventory in a version matching 1.0.1
    
  2. composer require --dev doublesecretagency/craft-inventory

     Your requirements could not be resolved to an installable set of packages.
    
       Problem 1
         - craftcms/cms 3.0.0-RC8 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC7.1 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC7 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC6 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC5 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC4 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC3 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC2 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - craftcms/cms 3.0.0-RC1 requires php >=7.0.0 -> your PHP version (5.4.16) does not satisfy that requirement.
         - doublesecretagency/craft-inventory 2.0.0 requires craftcms/cms ^3.0.0-RC1 -> satisfiable by craftcms/cms[3.0.0-RC1, 3.0.0-RC2, 3.0.0-RC3, 3.0.0-RC4, 3.0.0-RC5, 3.0.0-RC6, 3.0.0-RC7, 3.0.0-RC7.1, 3.0.0-RC8].
         - Installation request for doublesecretagency/craft-inventory -> satisfiable by doublesecretagency/craft-inventory[2.0.0].
    
    
     Installation failed, reverting ./composer.json to its original content.
    

Successful Installation of 1.0.1

  1. Download zip file at specific commit just before the one tagged 2.0.0.
  2. Unzip file.
  3. Move inventory directory from unzipped contents to craft/plugins/inventory.
  4. Open Craft CMS admin interface to "Plugins" settings page.
  5. Install plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.