6.0.0-beta1
7/4/25

[#9358] includeStylesheetFiles() cannot be called multiple times
Summary includeStylesheetFiles() cannot be called multiple times
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org, slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 11/03/2010 (5357 days ago)
Due
Updated 11/09/2010 (5351 days ago)
Assigned
Resolved 11/09/2010 (5351 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/09/2010 08:18:00 AM Michael Slusarz Comment #6
State ⇒ Resolved
Reply to this comment
Added Horde_Themes::addStylesheetFile() to queue additional stylesheet 
files to be added on top of the base application CSS files.

As previously mentioned, Horde_Themes::includeStylesheetFiles() is 
designed to be called once only per page access - most often in 
[app]/templates/common-header.inc.
11/09/2010 08:15:28 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9358: Add Horde_Themes::addStylesheetFile()

http://git.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde-git&r1=6287faff03e67682802dc866ed46177dcac31472&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Mime/Viewer/Syntaxhighlighter.php?rt=horde-git&r1=99427b115951b059c83f71c48f5b439cd9af1685&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/framework/Core/lib/Horde/Themes.php?rt=horde-git&r1=8352173fc37d37ad4a99af2a4508a8b7e9600f50&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/horde/services/portal/index.php?rt=horde-git&r1=ec604b28b431054f96ce346520e8b98de031102a&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/horde/templates/common-header.inc?rt=horde-git&r1=e60da622060274282dd92c2d41c4c0dce4724dd6&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/imp/templates/common-header.inc?rt=horde-git&r1=e60da622060274282dd92c2d41c4c0dce4724dd6&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/jonah/lib/View/StoryView.php?rt=horde-git&r1=1deb6ef576189be20dc9214dd67e681c4691c4c0&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/mnemo/templates/common-header.inc?rt=horde-git&r1=e60da622060274282dd92c2d41c4c0dce4724dd6&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/nag/templates/common-header.inc?rt=horde-git&r1=e60da622060274282dd92c2d41c4c0dce4724dd6&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
http://git.horde.org/diff.php/trean/templates/common-header.inc?rt=horde-git&r1=e60da622060274282dd92c2d41c4c0dce4724dd6&r2=93b9dd4ab70feb68b2c2fcfa9c4a1a4831063694
11/05/2010 03:27:20 AM Chuck Hagenbuch Comment #4 Reply to this comment
Yeah. We probably in general want output buffering on for the page so 
that we can add headers, stylesheets, etc. from anywhere easily.
11/04/2010 05:29:06 PM Jan Schneider Comment #3 Reply to this comment
IIRC the problem was that the page header was already sent when the 
mime viewer code was triggered. But Chuck knows better.
11/04/2010 05:22:12 PM Michael Slusarz Comment #2 Reply to this comment
Haven't had a chance to look at this in detail, but 
includeStylesheetFiles() should not be called inside of a Mime Viewer. 
  includeStylesheetFiles() needs to be called by the script generating 
the output only (e.g. imp/view.php).

If there is not a way to do this (queuing stylesheet files), this 
should be added to Horde_Themes.
11/03/2010 01:47:59 PM Jan Schneider Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Assigned to Chuck Hagenbuch
Summary ⇒ includeStylesheetFiles() cannot be called multiple times
Type ⇒ Bug
State ⇒ Assigned
Queue ⇒ Horde Framework Packages
Reply to this comment
I'm not sure whether we want to change the includeStylesheetFiles() 
behavior, or change the stylesheet loading in the SyntaxHighlighter 
Mime_Viewer. But atm the mime viewer calls 
Horde_Themes::includeStylesheetFiles() which:
1) adds <!--a75c305b1c0a6022--><link> tags inline, which is invalid, 
though obviously supported by all browsers.
2) loads all default stylesheets again.

Saved Queries