The problem occures on panel content editing page, if I bring up any modal window. Window show up correctly but when I hit the "save" button instead of dismissing the modal window I just get a bunch of JSON data. The settings seems to have saved, hitting back button, than refresh on browser shows the new settings.

This happens for (almost?) every modal window, i tried these: CSS settings, cache settings, pane main settings.

I tried with very differend panel panes and on different panels, same result.

Environment:
Drupal 7.15
Panels 7.x-3.3
Ubuntu 10.04 (LAMP related packages from repository)
I use memcache, but same happens without it.

Comments

tommy kaneko’s picture

I get the same behaviour. I am using the Garland theme, and I still get the same.

The error message on the console in the browser says:
Resource interpreted as Document but transferred with MIME type application/json: "http://mydomain.com/panels/ajax/editor/cache-method/panel_context%3Auser...".

I have also picked up an "uncaught error" which is down to a Facebook js file in the modal window before I press "cancel" on it. Do you have js errors in the modal window too?

tommy kaneko’s picture

I can confirm again that it was the Facebook js file, "all.js" that was messing with the js in Panels. I had to disable the FB modules and make my changes in Panels.

edgarpe’s picture

Yes, I can confirm that facebook's javascript causes the problem. I'm using a firefox extension named "blocksite". The problem disappears If I block all facebook domains with it. It simply means the JS files are not loaded by the browser.

Though, I don't know if this is a panels bug, a drupal for facebook bug, or something else.

edgarpe’s picture

Oh, and yes, I had JS errors in console when I opend the modal and made changes in it.

edgarpe’s picture

It looks like Drupal for Facebook was causing it. This patch solves it:
http://drupal.org/node/1791986#comment-6519754

The patch is included in fb-7.x-3.3-beta4

gmclelland’s picture

Status: Active » Closed (works as designed)

Closing based on the feedback from #5

WMarkus’s picture

Issue summary: View changes
Issue tags: +Issue is back again

Today after an upate run I have this behaviour, too.

SlayJay’s picture

experiencing the same issue. NOT using facebook.js

Using very minimal setup:

Nginx
Organic Groups
Entity API
Views
Ctools
Display Suite
Views

SlayJay’s picture

Status: Closed (works as designed) » Active
gmclelland’s picture

If you use the wysiwyg module, make sure you use the latest 2.x-dev. I think I had similar problems and upgrading that module fixed it.

SlayJay’s picture

Status: Active » Closed (works as designed)

I was able to track this down to an issue with the D7 twig theme engine, sorry for the confusion.

Zombocom123’s picture

Hi, i'm experiencing a similar issue. I am editing an already existing site and If i click on certain links (i suppose those that generate modals) Instead i see some JSON output. On the console i have this error:

Error: Syntax error, unrecognized expression: <div id="ctools-modal"> <div class="ctools-modal-content"> <div class="modal-header"> <a class="close" href="#">Close Window<img typeof="foaf:Image" src="http://localhost/sites/all/modules/ctools/images/icon-close-window.png" alt="Close Window" title="Close Window" /> </a> <span id="modal-title" class="modal-title">&nbsp;</span> </div> <div id="modal-content" class="modal-content"> </div> </div> </div>

I am using Drupal 7.22, Jquery 1.9.1, Panels 7.x-3.4 and Chaos Tools 7.x-1.4. There's a lot more modules installed, If needed i'll provide a list

EDIT: I have solved by switching to Jquery 1.7 on administrative pages only through Jquery update

vladimir-m’s picture

Hi @valepu,

In ctools modal template I do something like this:

(function ($) {
  Drupal.theme.prototype.videoModal = function () {
    var html = '';
    html += '  <div id="ctools-modal">';
    html += '    <div class="ctools-modal-content">';
    html += '      <div class="modal-header">';
    html += '        <a class="close" href="#">';
    html +=            Drupal.CTools.Modal.currentSettings.closeImage;
    html += '        </a>';
    html += '        <span id="modal-title" class="modal-title">&nbsp;</span>';
    html += '      </div>';
    html += '      <div id="modal-content" class="modal-content">';
    html += '      </div>';
    html += '    </div>';
    html += '  </div>';

    html = $('<div></div>').append(html);

    return html;
  };
})(jQuery);

html = $('<div></div>').append(html);

It's ugly but works :)

Cheers!

dstorozhuk’s picture

Thanks, @valepu. You save my time!

BOGUƎ’s picture

Yeah, in a dire for a solution on this one too here, it's been happening for a while on a various projects. Definitely feels like a jQuery-related issue: switching back to v1.7 from v1.9 allows to use Panels.