Item10597: remote resources in include CSS files is treated as a local file-based resource
Priority: Low
Current State: Closed
Released In: n/a
Target Release: major
Version 2.20
Resources in CSS files which have an absolute URL (e.g.
http://...) are not recognized as such and treated as local (file based) resources and Publisher::_copyResource attempts to copy them, fails and reports a missing resource:
940 foreach my $resource (@moreResources) {
941
942 # recurse
943 if ( $resource !~ m!^/! ) {
944
945 # if the url is not absolute, assume it's
946 # relative to the current path
947 $resource = $path . '/' . $resource;
948 }
949 else {
950 if ( $resource =~ m!$pub/(.*)! ) {
951 my $old = $resource;
952 $resource = $1;
953 }
954 }
955 $this->_copyResource( $resource, $copied );
956 }
They should either be left as is (see the attached patch) or fetched, with the CSS file rewritten to use the local link.
True. The moral of this story is, keep your friends close, and your CSS closer.
--
CrawfordCurrie - 25 May 2011
I've updated the attached patch to apply against version 2.3.2 of the plugin.
--
DiabJerius - 09 Dec 2011
Patch applied.
--
CrawfordCurrie - 30 Jul 2012