Line 216 of views_plugin_cache.inc has a return before it caches the js. The code below the return needs to be updated to d7 so the js will be cached.

Comments

merlinofchaos’s picture

This needs to be fixed prior to -rc -- that kinda blows the caching up if we're not properly caching javascript.

dawehner’s picture

Status: Active » Needs work
StatusFileSize
new2.04 KB

Here is a first version.

redndahead’s picture

Status: Needs work » Needs review
StatusFileSize
new2.46 KB

There is my take on it. Was able to get settings working also.

redndahead’s picture

StatusFileSize
new2.44 KB

White space cleanup.

redndahead’s picture

dereine said in irc that the current patch looked good, but asked me to create a simpletest for this. I'm not quite figuring out how to do this, showing my simpletest knowledge. If anyone has a chance to pick this up before I can figure it out that would be great.

redndahead’s picture

I've been working on the test for a while, but I'm not figuring it out. My guess is I need to enable a view that has caching turned on and sometime during the execution of that view add a drupal_add_js. So that get's cached. Run the view again with a different drupal_add_js() and test with an assertRaw to make sure the first javascript is being added and the second one isn't.

Anyone have ideas on how to do this?

rfay’s picture

dawehner’s picture

Category: bug » task
Priority: Major » Normal
Status: Needs review » Active
Issue tags: +Needs tests

Commited the patch, looks really fine.

dawehner’s picture

Title: Javascript is not cached » Tests for Javascript caching
dawehner’s picture

StatusFileSize
new1.24 KB

Here is a first working patch.