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 viewforum.php?f=614 instead <<
Forum rules
Please use the Forum Post Assistant to give your server setting details which are necessary to determine the problem.
KevinB252
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Jun 30, 2010 8:13 am

joomla 1.6 Cache/Module problem

Postby 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

User avatar
mbabker
Joomla! Ace
Joomla! Ace
Posts: 1600
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: joomla 1.6 Cache/Module problem

Postby mbabker » 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.
Past: Release Lead, CMS Maintainer
Present: Framework Maintainer, Security Team Member, .org System Administrator, Bug Squad Member

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

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

Re: joomla 1.6 Cache/Module problem

Postby 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.


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

Who is online

Users browsing this forum: No registered users and 2 guests