silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 91 forks source link

Exception seen when importing from custom URL slug #1680

Closed mikenuguid closed 1 month ago

mikenuguid commented 4 months ago

Module version(s) affected

1.13.22

Description

Using import csv on a model admin that has a custom url slug generates an exception: Undefined array key.

How to reproduce

Possible Solution

This might be caused by this line https://github.com/silverstripe/silverstripe-admin/blob/1.13.22/code/ModelAdmin.php#L734 where it should be using modelTab instead of modelClass.

I haven't created a pull request yet but hopefully this is a quick fix. :)

Additional Context

Screenshot from 2024-02-26 12-36-30

Validations

PRs

GuySartorelli commented 4 months ago

I think this is a duplicate of https://github.com/silverstripe/silverstripe-admin/issues/1686 which was fixed in 1.13.23. Can you please check if that fixes the problem for you?

If it doesn't, please provide the full error message - and if you'd like to raise a pull request which fixes this and includes a test that would be fantastic.

mikenuguid commented 4 months ago

Yeah it's still an issue (identical with the description above). Will create a pull request like you suggested.

GuySartorelli commented 2 months ago

@mikenuguid Have you had a chance to look at raising a pull request for this? If you don't raise a pull request but also don't provide the full error message (as text please, not an image), I will have to close this issue for lack of information.

mikenuguid commented 2 months ago

Thanks for chasing, I'll find time this week.

GuySartorelli commented 1 month ago

PR merged. This will be automatically tagged by GitHub actions. Thanks for reporting and fixing this!