Xml::openSourceUrl does not check if url is valid

Created on 5 September 2022, almost 3 years ago
Updated 7 July 2025, about 15 hours ago

Problem/Motivation

Not entirely sure if this is a bug or a feature, but Xml::openSourceUrl() simply return false even if the url returns a 500. DataParserPluginBase::nextSource() then ignores the source. Even if the url (or all urls) return 500 response(s), the migrate.post_import will be dispatched.

When you for example use that event to delete all not-updated records, if the source url temporarily returns a 500, you will delete all your imported data

Proposed resolution

Check if the url is valid and throw an exception if it isn't.

🐛 Bug report
Status

Needs review

Version

6.0

Component

Plugins

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024