joomla 1.6 Cache/Module problem

This board for support questions on Joomla 1.6 RC (= Release Candidate - which should NOT be used on a production server) is NO longer active because Joomla 1.6.0 has been released.

>> For Joomla! 1.6 Support Questions, please use http://forum.joomla.org/viewforum.php?f=614 instead <<
Locked
KevinB252
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Jun 30, 2010 8:13 am

joomla 1.6 Cache/Module problem

Post by KevinB252 » Thu Aug 12, 2010 2:10 pm

Hello all,

I am developing a module for Joomla 1.6 but I am running in to a problem which I believe is being caused by a cache problem.

I am adding javascript declarations as follows in the default.php file of the module

Code: Select all

$document =& JFactory::getDocument();
$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
$document->addScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js');
$document->addScript(JURI::root().'modules'.DS.'mod_portlets'.DS.'js'.DS.'jquery.cookie.js');
$document->addScript(JURI::root().'modules'.DS.'mod_portlets'.DS.'js'.DS.'portlets.js');
This is great at first and the module works fine, but after refreshing a few times or navigating to a different page the module stops working, after investigating with FireBug I realised the JS files were not being inculded in the head anymore.

If I un-publish and re-publish the module then the JS files pop back into the head and the module works as it should, but again after a page or two they disappear again.

The only thing I could think of is that it is some sort of cache issue since the rest of the php for the module seems fine and the module is displaying, just without the JS elements.

Can anyone offer any solutions or reasons as to why this might happen?

Thanks

deleted user

Re: joomla 1.6 Cache/Module problem

Post by deleted user » Thu Aug 12, 2010 3:27 pm

There are a few known cache issues with 1.6 right now. If you turn off the cache in the Global Config then clear your site's cache, you should have no issues for the time being.

KevinB252
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Jun 30, 2010 8:13 am

Re: joomla 1.6 Cache/Module problem

Post by KevinB252 » Thu Aug 12, 2010 3:39 pm

Thanks for the reply.

I stuck in the same cache params that I had seen in other modules like this...

Code: Select all

	<config>
		<fields name="params">
			<fieldset name="cache">
				<field
					name="cache"
					type="list"
					default="1"
					label="COM_MODULES_FIELD_CACHING_LABEL"
					description="COM_MODULES_FIELD_CACHING_DESC">
					<option
						value="1">JGLOBAL_USE_GLOBAL</option>
					<option
						value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
				</field>
				<field
					name="cache_time"
					type="text"
					default="900"
					label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
					description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
				<field
					name="cachemode"
					type="hidden"
					default="static">
					<option
						value="static"></option>
                </field>
			</fieldset>
		</fields>
	</config>
But it made no difference, which makes me believe it is a cache bug.

The only thing that did work is turning the cache off as you suggested.

Cheers.


Locked

Return to “Joomla! 1.6 RC Support [closed]”