Download & Extend

Optimize JavaScript files = breaks POPUPS module

Project:Popups API (Ajax Dialogs)
Version:6.x-2.0-alpha6
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

if you enable the

Optimize CSS files, Optimize and Minify JavaScript files the popup module will stop working as intend

Is there any way that you can fix this, cause if you keep these settings off, the site will be pretty slow :|

the reason im using alpha 5 is that it works very well - the hooks defined work perfectly...

Comments

#1

I have found this problem but only with optimise js. The error is that Drupal.theme() is missing.

#2

Thanks for reply, is there any chance that will be fixed? Cause its pretty annoying when you cant optimize your site.

#3

Subscribing.

#4

Subscribing.

#5

any chance that this is fixed?

#6

mah this totally sucks and just cost me like five hours to debug :>

i'd really appreciate this getting fixed sometime soon because performance is always critical :/

#7

Title:admin/settings/performance = breaks POPUPS module» Optimize CSS files, Optimize and Minify JavaScript files = breaks POPUPS module
Priority:critical» normal

I confirm this...

#8

Title:Optimize CSS files, Optimize and Minify JavaScript files = breaks POPUPS module» Optimize JavaScript files = breaks POPUPS module

There are some semi-columns missing at the end of some function, but fixing this does not fix the issue. Maybe it's because of the use of eval() : http://drupal.org/node/172169

A temporary fix could be to exclude all the Popups .js files from the agregation everytime drupal_add_js() is called.

#9

Status:active» needs review

Here's a patch that got this working for us.

AttachmentSize
patch58.patch 2.86 KB

#10

Just to let you know, Popups is dead in D7, long live jQuery UI and drupal_add_dialog()

#11

Well thats fine, but D6 is the beast today, and I think we all appreciate starbow's work here ; )

I believe that after implementing the patch, and enabling "Optimize Javascript Files", the functionality of AJAX reloading the page from giving a link the class "popups-form" does not work properly. I'm using alpha5.

The popup box loads the new data after Submit, but not the parent page.

Without "optimize js" the parent page reloads properly.

Can anyone verify or deny this?

#12

I tried the patch in #9 and works for normal popups, but breaks for form upon submit, like the avatar upload...Got the bad response form and the picture did not get uploaded...

#13

I use 6.1 stable version, and I'm not intending to use 6.2 because its bugged as hell.

#14

Subscribed.

#15

This has been active for almost a year. Can we not get a final commit/patch for this?

The patch from #9 does bring up the box, but based on the above there are still problems.

Can we get an update if someone has managed to fix this?

#16

I can also confirm this issue. resolution would be appreciated.

#17

ajax_load module had a similar problem - they fixed it by injecting js-paths into Drupal's javascript-settings array instead of digging through script[src] in the header.

http://drupal.org/node/688332
http://drupal.org/node/454292

#18

following fixed it for me:
- install popups (latest dev)
- install & enable ajax_load (latest dev) -> http://drupal.org/project/ajax_load
- apply following patch to popups.js

my patch makes use of the javascript-settings-array (Drupal.settings.AjaxLoad), which contains the currently loaded scripts & css files.

If someone is interested, i'll upload a patch for alpha5 too :)

AttachmentSize
popups_ajax_load.patch 2.08 KB

#19

update!

AttachmentSize
popups_ajax_load.patch 2.13 KB

#20

Here's what we've been using. It also avoids reloading CSS files. There might be some white space issues with this since I'd cleaned up some indenting and had CVS ignore the whitespace changes to make this patch more readable.

AttachmentSize
popups_436094_aggregation.patch 6.41 KB

#21

Status:needs review» fixed

Committing the attached patch to DRUPAL-6--2.

#22

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#23

Version:6.x-2.0-alpha5» 6.x-2.0-alpha6

I have 6.20-alpha6 installed with drupal 6.2 core and whenever I have optimize js enabled, popup forms of class "popup-form-reload" actually reload the source page in the popup, and don't go away after a submit. I realize this could be something that I am doing in the form submit handlers, but it only appears when I enable js optimization. Any help would be appreciated.

#24

I am seeing the same issue as #23. I am using drupal 6.2 core and popups 6.x-2.x-dev from feb 25, 2011.