When Aloha is enabled it is impossible to use Panels IPE. Panels IPE loads fine and I can see buttons like "Add new pane", after clicking on it Panels overlay opens with "Loading..." title and then I get some output on white page, along the lines of...
[ {"command":"settings", "settings":{"basePath":"\u002Fmaga\u002F", "pathPrefix":"", "ajaxPageState":{"theme":"maga", "theme_token":"9EpEMBHlBNaxJUnhjF9eqSa5_uYRFqOw1NixdQZ-45Q"}, "overlay":{"paths":{"admin":"field
This is probably because of ExtJS as noted in readme.txt. So can/should I use jQuery version of Aloha? Should it work? If not, how do you usually deal with this kind of incompabilities in Aloha module? This should not be the first if I understand subtext of readme.txt.
Comment | File | Size | Author |
---|---|---|---|
#10 | aloha-remove.png | 135.82 KB | mansspams |
#3 | aloha-ipe-errors.png | 112.61 KB | mansspams |
Comments
Comment #1
muhleder CreditAttribution: muhleder commentedIt *may* be because of ExtJS. Actually we haven't had a single report that turned out to be because of ExtJS yet. Do you have admin module installed?
If you could open the console in Firefox or Chrome and let us know if you see a js error. You should be able to set errors to persist so that you will still be able to see the error on the new page load.
Comment #2
mansspams CreditAttribution: mansspams commentedI opened support request in Panels queue #1593652: Make modal.js more robust, maybe someone will visit this queue and suggest where to look first. Please close it if you feel that it is not needed.
Here are also some errors from watchdog.
4x this one (same number as panes)
Comment #3
mansspams CreditAttribution: mansspams commentedI don't have admin module installed.
Attached are errors I noticed in Firebug. Top one is actual error, second one is after page reload and code dump.
It seems that aloha somehow is influencing paths somewhere in ajaxland. It's wild and uneducated guess.
Comment #4
muhleder CreditAttribution: muhleder commentedIs there a stack trace available with that error? Looks like that comes from within jquery so really we'd like to know what called the function where the error happens.
Comment #5
mansspams CreditAttribution: mansspams commentedIm sorry, how do I get stack trace? Im not very familiar with js debug. Should I paste here some more text from what you saw in screenshots or should I add some debug line somewhere in code?
Comment #6
muhleder CreditAttribution: muhleder commentedYou should be able to see the stack trace by clicking onto the error, here's a little help page from the ExtJS site.
http://www.sencha.com/learn/debugging-ext-js-applications
Comment #7
mansspams CreditAttribution: mansspams commentedThis could be ctools bug. I finally got that stack trace and did not notice aloha.js in there. But I notice modal.js from ctools, in particular, line 403 which reads
var position = $(parents[i]).css('position');
If I uncomment whole FOR block and modals work as expected. Wonder what in aloha.js would trigger this error.
I will move this to ctools queue and see what folks there has to say.
Comment #8
muhleder CreditAttribution: muhleder commentedIt could be that something in ExtJS is messing with javascript prototypes, so the javascript environment isn't what ctools expects.
I think this should probably be back in the aloha queue until we can rule that out.
Comment #9
mansspams CreditAttribution: mansspams commentedOk, back and some more info... i think I found immediate problem.
Ctools -dev version modal.js has this FOR block around line 403. Without aloha it iterates 2 times without error, with aloha it iterates 3 times, because third time it runs with "i" value of "remove" (first two times are with values 0 and 1 and produces same correct result).
I noticed that ExtJS added body id, maybe it changes something else in DOM?
Comment #10
mansspams CreditAttribution: mansspams commentedThis "remove" is not there without Aloha. Now question is - in which module there is a bug? Is this "remove" has a right to exist there? If yes, we should probably move to ctools again.
Comment #11
muhleder CreditAttribution: muhleder commentedMy money is on the problem being ExtJS. There is some workaround code in our aloha.js to remove the 'remove' from Array prototypes which ExtJS puts in.
Maybe this isn't being called early enough or the 'remove' is added to another object type. You could try decreasing the weight of aloha module in the system table to try to get this code called before ctools.
Comment #12
mansspams CreditAttribution: mansspams commentedUpdated hook_install, uninstalled/installed aloha, checked db if weight correct, clear caches, still same problem.
Comment #13
muhleder CreditAttribution: muhleder commentedOk, so the Array prototype now has a method 'remove' due to ExtJs. The ctools js iterates over an array using the for in technique, which is technically incorrect.
http://stackoverflow.com/questions/3010840/loop-through-array-in-javascript
You should be able to change the iteration technique to something more robust and fix this. jQuery.each , or
should work.
Basically ctools js needs to be more robust to deal with the bad practices in ExtJs. The aloha library is looking to switch to the jquery-ui version in June which should also fix this issue.
Comment #14
muhleder CreditAttribution: muhleder commentedJust to clarify this is in the code in ctool's modals.js#403
Comment #15
Summit CreditAttribution: Summit commentedHi,
Having same problems
Not only using Panels IPE. But when enabled Aloha I am not able to add content to a panel-page.
The error is than occuring.
greetings, Martijn
Comment #16
mansspams CreditAttribution: mansspams commentedTry patch over at #1593652: Make modal.js more robust