GridField csv import button has disappeared after update

Silverstripe Version: 5.2

Question:

Has anyone else had their grid field CSV Import button disappear after a recent upgrade?? I have the standard implementation through model admin (as per https://docs.silverstripe.org/en/5/developer_guides/integration/csv_import/#import-through-modeladmin) which was previously working just fine… am trying to track down whether this was due to a recent SS5 or module update or something else.

Import button has also disappeared from SecurityAdmin.

Any ideas most welcome!

Ok, so I’ve tracked it down to a module I’m using:

Not sure yet why exactly the buttons are disappearing, but have submitted a bug report and will keep digging… I have a hunch that it’s not the social-media module itself, but rather one of its dependencies.

The same happens when this module is installed:

They have similar dependencies.

Both aforementioned modules import goldfinch/helpers and that module disables the import button in ModelAdmin.

Thanks that’s very helpful :slight_smile:

Any tips on how to only apply that to selected model admins? Eg. have buttons enabled for SecurityAdmin (prevent the module removing the buttons), but disabled on the ImageEditorAdmin (use the module as intended)?

You basically have 3 options:

  1. do not use those modules
  2. push a change upstream, e.g. making the AdminPlain extension optional
  3. manually modify the code in your vendor folder.

You can also try to apply a custom extension that re-enable the import button, but I’m not sure about the order in which the extensions are applied.