joomla/joomla-platform — Issue #673: script declarations are duplicated when caching enabled
Author: stutteringp0et
Created: 2011-12-24 03:14:57+00:00
State: open

This was opened in joomlacode and immediately closed with a suggestion that the issue be opened here. After searching, I suppose that the original submitter just gave up.

See it here:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26551

Recreate the issue:
1. enable caching - either will do
2. use a module to add a script declaration ( JFactory::getDocument()->addScriptDeclaration("alert('hello');"); )
3. reload the page a few times.

You'll notice in source that you have more than one " alert('hello'); "

I've resorted to enabling checks in my extensions to determine if they've already run or not.