Item10597: remote resources in include CSS files is treated as a local file-based resource

pencil
Priority: Low
Current State: Closed
Released In: n/a
Target Release: major
Applies To: Extension
Component: PublishPlugin
Branches: trunk
Reported By: DiabJerius
Waiting For:
Last Change By: CrawfordCurrie
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

 

ItemTemplate edit

Summary remote resources in include CSS files is treated as a local file-based resource
ReportedBy DiabJerius
Codebase 1.1.2
SVN Range
AppliesTo Extension
Component PublishPlugin
Priority Low
CurrentState Closed
WaitingFor
Checkins PublishPlugin:ff56c251d62d
TargetRelease major
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins PublishPlugin:ff56c251d62d
Release01x01Checkins
I Attachment Action Size Date Who Comment
httprsrc.patchpatch httprsrc.patch manage 1 K 09 Dec 2011 - 21:41 DiabJerius ignore remote resources in CSS files
Topic revision: r6 - 30 Jul 2012, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy