Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore empty strings in URL column on import #6075

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

jrdh
Copy link
Member

@jrdh jrdh commented Dec 13, 2019

If the url is an empty string then the MediaFeedsInternetProvider will throw a MediaInternetNoHandlerException because it can't find a handler for it. Presumably, this is desired under normal circumstances, but during an import the cell's values are empty strings so this error is thrown all the time. Therefore, preempt it before it happens!

I fixed it like this rather than patching the MediaFeedsInternetProvider itself under the assumption that other code is expecting it to throw MediaInternetNoHandlerException exceptions when it encounters
invalid strings, like the empty string. Does feel a bit hacky though.

#6062

If the url is an empty string then the MediaFeedsInternetProvider
will throw a MediaInternetNoHandlerException because it can't find
a handler for it. Presumably this is desired under normal circumstances,
but during an import the cells values are empty strings so this error
is thrown all the time. Therefore, preempt it before it happens!
@jrdh
Copy link
Member Author

jrdh commented Dec 13, 2019

When this is released there are a few steps that are required to fully resolve #6062. These are:

  1. Remove the field_file field config from the location content type - it's a biblio field and shouldn't be duplicated here delete from field_config_instance where id = 166;
  2. Add new field called "File attachments", with type File, and widget Media multiselect to the location content type
  3. Add formats: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp
  4. Set number allowed to unlimited

@PaulKiddle
Copy link
Contributor

Can these things be done in the codebase, with drupal update hooks?

@jrdh
Copy link
Member Author

jrdh commented Jan 7, 2020

I don't think so no, they're specific to one scratchpad rather than something we'd want to run against all of them.

@PaulKiddle PaulKiddle merged commit e5dae96 into master Jan 7, 2020
@PaulKiddle PaulKiddle deleted the josh/ignore-empty-urls branch January 7, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants