- if ($type eq "opac" && !defined $val) {
- $val = record_get_binary($rec, "xml");
+ if ($simpletype eq "opac" && !defined $val) {
+ my $newtype = $type;
+ if ($newtype !~ s/.*?;/xml;/) {
+ $newtype = "xml";
+ }
+ warn "fallback('$rec', '$newtype')\n";
+ $val = record_get_binary($rec, $newtype);