After updating to 3.2: when I try to add content to a region in Panels, I get something like:

AJAX HTTP error.
HTTP result code: 500
Information:
Path: /panels/ajax/editor/select-content/panel_context%3Anode_view%3Anode_view_panel_context_10/region2
StatusText: Internal Server Error
ResponseText:
500 - Internal server error.
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Needless to say this is critical for our site. Everything else seems to work. Anyone?

Best,
Thomas

Comments

thomas1977’s picture

From outside this seems connected to the 3.1 issues mentioned in the release notes for 3.2:

"3.1 included some bad IPE logic that made it impossible to add new panes to any region; this release fixes that bug."

I went directly from 3.0 to 3.2 - does this have anything to do with the issue still being present?

Would it be safe to downgrade to 3.0 until the issue gets ironed out?

snowfire’s picture

I get the same error when trying to add content to a panel:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /ProcessInstruments/?q=panels/ajax/editor/select-content/1/right
StatusText: Internal Server Error
ResponseText: test
test

new drupal install - 7.12, panels 7.3.2, wisiwig and ckeditor disabled. windows server running php5.
any ideas what could be causing this?

thomas1977’s picture

@ snowfire

Just for the record: I'm running windows server as well. Don't know if this has got anything to do with it.

snowfire’s picture

@thomas1977
- I disabled the admin overlay, and I can now add content.
found another error with 403 and flexible layout.

thomas1977’s picture

Tried switching off the overlay module, but that doesn't make any difference in my setup. Wonder what's going on...

Co-operatives UK’s picture

Same problem here - on a windows server as well. Tried disabling the overlay but that had no effect.

thomas1977’s picture

@ Co-operatives UK

Just out of curiosity: did you have a clean install with 3.2, or did you (like I did) update from 3.0 or 3.1 to 3.2?

rarioj’s picture

To get it to work, I had to remove line 86 in the file panels/includes/add-content.inc.

So the final function will look like this:

function template_preprocess_panels_add_content_link(&$vars) {
  $vars['title'] = filter_xss_admin($vars['content_type']['title']);
  $vars['description'] = isset($vars['content_type']['description']) ? $vars['content_type']['description'] : $title;
  $vars['icon'] = ctools_content_admin_icon($vars['content_type']);
  $vars['url'] = $vars['renderer']->get_url('add-pane', $vars['region'], $vars['content_type']['type_name'], $vars['content_type']['subtype_name']);

  $vars['image_button'] = ctools_ajax_image_button($vars['icon'], $vars['url'], $vars['description'], 'panels-modal-add-config');
  $vars['text_button'] = ctools_ajax_text_button($vars['title'], $vars['url'], $vars['description'], 'panels-modal-add-config');
}
thomas1977’s picture

@ rarioj

Thanks. However, I'm not too fond of the idea of having to hack module core files. Bad experiences in the past. I'd much prefer an update that fixes the issue.

rarioj’s picture

Me neither. But the cause of the error seems to be the someone leaving out debug message (CMIIW). Thus, I provided the quick fix.

merlinofchaos’s picture

Status: Active » Fixed

Removed the message and pushed.

This error is partly because your site is using the PHP setting to print errors to the screen; this can cause issues with AJAX in general and you should turn this off. And while that message should not be there, it's way too easy to get a notice or a warning that would break AJAX this way.

thomas1977’s picture

Tested. Works now. Thanks!

Co-operatives UK’s picture

An upgrade from 3.1.

Status: Fixed » Closed (fixed)

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

xaa’s picture

#8 seems working just fine.
simply comment the line 86: error_log('test');, refresh the page and no more error

  • Commit cd0bb6f on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    Issue #1514030: Remove accidentaly left in debug message.