6.0.0-beta1
7/6/25

[#11099] Incorrect order of javascript
Summary Incorrect order of javascript
Queue Horde Framework Packages
Queue Version Git develop
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 03/22/2012 (4854 days ago)
Due
Updated 08/29/2012 (4694 days ago)
Assigned 03/23/2012 (4853 days ago)
Resolved 03/26/2012 (4850 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/29/2012 12:33:41 PM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit 2f0d4b2305fb54c4405a202d1adcf9284c5b4a67
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Mar 23 13:34:08 2012 -0600

     Bug #11099: Move popup js inclusion into Horde_PageOutput

  framework/Core/lib/Horde.php              |    2 +-
  framework/Core/lib/Horde/PageOutput.php   |   13 +++++++++++++
  framework/Core/lib/Horde/Script/Files.php |   28 ++++++++++++++++++++--------
  3 files changed, 34 insertions(+), 9 deletions(-)

http://git.horde.org/horde-git/-/commit/2f0d4b2305fb54c4405a202d1adcf9284c5b4a67
03/26/2012 07:26:44 PM Michael Slusarz Comment #7 Reply to this comment
Then it was because of this failed conversion when converting to 
Horde_PageOutput:

array('onload' => 'dom')

'onload' is now a boolean value.  And intval('dom') === 0.
03/26/2012 09:26:42 AM Jan Schneider Comment #6
State ⇒ Resolved
Reply to this comment
If output has been started already, any inlineScripts (and thus any
inlinJsVars too) are printed immediately if onload has been specified.
This happens in Trean for example, if you need a real-life example.
And that's the expected behavior, right?  It is wrapped in a 
dom:loaded event, and is not attempted to be inserted into the Horde 
object until the page is loaded, since there is a chance that the 
Horde object won't be loaded until later in the page?
The problem was that it was *not* wrapped in a dom:loaded event if 
called when output already started, even though it was supposed to.
This has been fixed with some of recent commits, it's properly wrapped 
again now.
03/23/2012 08:53:39 PM Michael Slusarz Comment #5 Reply to this comment
If output has been started already, any inlineScripts (and thus any 
inlinJsVars too) are printed immediately if onload has been specified.
This happens in Trean for example, if you need a real-life example.
And that's the expected behavior, right?  It is wrapped in a 
dom:loaded event, and is not attempted to be inserted into the Horde 
object until the page is loaded, since there is a chance that the 
Horde object won't be loaded until later in the page?

Unfortunately, I don't have trean configured on my server to test.
03/23/2012 08:49:19 PM Jan Schneider Comment #4 Reply to this comment
If using Horde::popupJs() after the page output has already started,
the Horde.popup_block_text is set before popup.js is loaded.
Not understanding this.  Even if added after page output has 
started, the text string will be wrapped in a 'dom:loaded' event, so 
it shouldn't be executed until all scripts are loaded?
If output has been started already, any inlineScripts (and thus any 
inlinJsVars too) are printed immediately if onload has been specified.
This happens in Trean for example, if you need a real-life example.
03/23/2012 07:37:57 PM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
If using Horde::popupJs() after the page output has already started, 
the Horde.popup_block_text is set before popup.js is loaded.
Not understanding this.  Even if added after page output has started, 
the text string will be wrapped in a 'dom:loaded' event, so it 
shouldn't be executed until all scripts are loaded?
03/23/2012 07:36:49 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (develop):

commit 2f0d4b2305fb54c4405a202d1adcf9284c5b4a67
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Mar 23 13:34:08 2012 -0600

     Bug #11099: Move popup js inclusion into Horde_PageOutput

  framework/Core/lib/Horde.php              |    2 +-
  framework/Core/lib/Horde/PageOutput.php   |   13 +++++++++++++
  framework/Core/lib/Horde/Script/Files.php |   28 ++++++++++++++++++++--------
  3 files changed, 34 insertions(+), 9 deletions(-)

http://git.horde.org/horde-git/-/commit/2f0d4b2305fb54c4405a202d1adcf9284c5b4a67
03/22/2012 06:47:36 PM Jan Schneider Comment #1
Priority ⇒ 2. Medium
State ⇒ Assigned
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Queue ⇒ Horde Framework Packages
Summary ⇒ Incorrect order of javascript
Type ⇒ Bug
Reply to this comment
If using Horde::popupJs() after the page output has already started, 
the Horde.popup_block_text is set before popup.js is loaded.

Saved Queries