Hello all,
I have been using this module from Drupal 10.1.7 and I have to say it is amazing. However I found an issue while importing terms using Countries images into a media field. The error I am returned is the following.
TypeError: Exception::__construct(): Argument #2 ($code) must be of type int, array given in Exception->__construct() (line 175 of /var/www/html/un-sdg-d10/web/modules/contrib/countries_import/src/Services/FileUtils.php).
After debugging I see the $dir variable is setted to ":", it implies apache/nginx is trying to create that directory into projects root "./web/:", not into files directory.
Issue fork countries_import-3418311
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
chetan 11 commentedPlease check the above MR.
Comment #5
pgrandeg commentedAfter digging a little bit more, I think the issue is regarding the getFieldConfig() method.
My taxonomy vocabulary has a media file, using 'Image' media bundle. That bundle has some extra fields and as far as I have seen, the getFieldConfig() is choosing the wrong field instead of the File field.
Comment #7
anthelixes commentedThe patch fixed the issue. Thanks everyone. I will merge for the next release.
Comment #8
anthelixes commented