instructure/canvas-lms · info

The external Rubric couldn't be found for "#

Error message

The external Rubric couldn't be found for "#{hash[:title]}", creating a copy.

What it means

RubricImporter resolves a rubric referenced by hash[:external_identifier] via context.available_rubric. When the rubric cannot be found (or the migration is cross-institution and lookup is skipped), it logs this warning and proceeds by creating a NEW copy of the rubric from the migration data instead of linking the existing one.

Solutions

  1. Expected behavior in most cases: let the importer create the copy and verify the migrated rubric renders correctly
  2. If linkage was intended, ensure the destination account/course actually contains the referenced rubric before importing
  3. For cross-institution imports, confirm a copy is acceptable or import into the same account
  4. Re-export the source content so rubric data is fully embedded in the migration package

Example fix

// before
migration.cross_institution? ? nil : context.available_rubric(hash[:external_identifier])
# (cross-institution always warns and copies)
// after
# accept the copy, or pre-seed the destination with the referenced rubric so external_identifier resolves
Defensive patterns

Strategy: fallback

Validate before calling

existing = context.available_rubric(hash[:external_identifier]) unless migration.cross_institution?
puts(existing ? 'will link existing rubric' : 'will create copy')

Prevention

When it happens

Trigger: A course-copy/migration item references a rubric by external_identifier that does not exist in the destination context's available rubrics, or migration.cross_institution? is true so the lookup is skipped by design.

Common situations: Importing content into a course/account that lacks the referenced rubric; rubric deleted at the destination; cross-institution course copy; importing a package whose rubric IDs are local to another account.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15). Data as JSON: /api/errors/cf029f1dedd6b514. Report an issue: GitHub.

Appendix: source

Thrown at app/models/importers/rubric_importer.rb:49

        begin
          import_from_migration(rubric, migration)
        rescue
          migration.add_import_warning(t("#migration.rubric_type", "Rubric"), rubric[:title], $!)
        end
      end
    end

    def self.import_from_migration(hash, migration, item = nil)
      context = migration.context
      hash = hash.with_indifferent_access
      return nil if hash[:migration_id] && hash[:rubrics_to_import] && !hash[:rubrics_to_import][hash[:migration_id]]

      rubric = nil
      if !item && hash[:external_identifier]
        rubric = context.available_rubric(hash[:external_identifier]) unless migration.cross_institution?

        unless rubric
          Rails.logger.warn("The external Rubric couldn't be found for \"#{hash[:title]}\", creating a copy.")
        end
      end

      if rubric
        item = rubric
      else
        item ||= Rubric.where(context_id: context, context_type: context.class.to_s, id: hash[:id]).first
        item ||= Rubric.where(context_id: context, context_type: context.class.to_s, migration_id: hash[:migration_id]).first if hash[:migration_id]

        # avoid override a rubric used for grading
        if item&.rubric_assessments&.any?
          return migration.add_import_warning(
            t("#migration.rubric_type", "Rubric"),
            hash[:title],
            I18n.t("A rubric that has been used for grading cannot be overwritten.")
          )
        end

View on GitHub (pinned to 1c9f0bb801)