Unknown Response From Server Error

hdmann - January 23, 2008 - 22:23
Project:Panels
Version:5.x-2.0-beta2
Component:Plugins - contexts
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi - I'm getting an Unknown Response from Server Error when I try to add any contexts in the Mini Page Contexts section.

Any ideas?

Thanks,
Heather

#1

merlinofchaos - January 23, 2008 - 23:59

Do you have firebug installed?

#2

hdmann - January 24, 2008 - 01:05

no.

#3

hdmann - January 24, 2008 - 01:10

I looked it up - Firebug that is - and installed it. Heather

#4

merlinofchaos - January 24, 2008 - 02:44

Firebug has an option to let you see the server response from an ajax request. It's pretty easy; I think you hit f12 to open up the console, click 'console', and then click the button. It should give a line about the URL hit and the response. Could you paste that information into this issue for me?

Thanks

#5

hdmann - January 24, 2008 - 17:06

Here it is...

{ "output": "\x3cform action=\"/panels/common/ajax/add/panel_mini/requiredcontext/mini_test\"  method

=\"post\" id=\"panels-common-edit-requiredcontext-form\"\x3e\n\x3cdiv\x3e\x3cinput type=\"hidden\" name

=\"position\" id=\"edit-position\" value=\"0\"  /\x3e\n\x3cdiv class=\"modal-form clear-block\"\x3e\x3cdiv

class=\"description\"\x3eA node object.\x3c/div\x3e\x3cinput type=\"hidden\" name=\"requiredcontext

[name]\" id=\"edit-requiredcontext-name\" value=\"node\"  /\x3e\n\x3cdiv class=\"form-item\"\x3e\n \x3clabel

for=\"edit-requiredcontext-identifier\"\x3eIdentifier: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength

=\"128\" name=\"requiredcontext[identifier]\" id=\"edit-requiredcontext-identifier\"  size=\"60\" value

=\"Node\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eEnter a title to identify this

context on administrative screens.\x3c/div\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\"\x3e\n \x3clabel

for=\"edit-requiredcontext-keyword\"\x3eKeyword: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength

=\"128\" name=\"requiredcontext[keyword]\" id=\"edit-requiredcontext-keyword\"  size=\"60\" value=\"node

\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3eEnter a keyword to use for substitution

in titles.\x3c/div\x3e\n\x3c/div\x3e\n\x3c/div\x3e\x3cinput type=\"submit\" name=\"op\" id=\"edit-next

\" value=\"Save\"  class=\"form-submit\" /\x3e\n\x3cinput type=\"hidden\" name=\"form_token\" id=\"edit-panels-common-edit-requiredcontext-form-form-token

\" value=\"14d9482d8a3636379ca7b84452b6d2a8\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_id\" id=

\"edit-panels-common-edit-requiredcontext-form\" value=\"panels_common_edit_requiredcontext_form\" 

/\x3e\n\n\x3c/div\x3e\x3c/form\x3e\n", "type": "display", "title": "Add required context \"Node\"", "url"

: "http://www.littlewaystosave.com/panels/common/ajax/add/panel_mini/requiredcontext/mini_test" }

Thanks for your help :)

#6

merlinofchaos - January 24, 2008 - 17:13

Huh. That is a valid response.

I've seen this before; the server gives a valid response, but for some reason jquery doesn't parse it. This error confuses me greatly.

#7

hdmann - January 24, 2008 - 20:13

That makes two of us!

I could try deleting panels and starting again (again). I guess if there's nothing obvious a 'reboot' it is.

Thanks.
Heather

#8

hdmann - January 24, 2008 - 20:14

oh - I forgot to say thanks for putting me on to Firebug - that's awesome!

Heather

#9

merlinofchaos - January 24, 2008 - 20:55

BTW, are you using an updated jquery.js rather than the default one?

#10

hdmann - January 25, 2008 - 01:27

updated.

#11

iamscott - January 26, 2008 - 18:03

I'm also getting this error when clicking that "Add argument" button. Is there a known solution/fix for this?

Also, how do I know if I'm using the updated jquery.js version? I'm currently using $Id: jquery.js,v 1.6 2006/12/23. I think on a previous install I used the updated.jquery but functions like collapsible menus stopped working.

Thanks.

#12

hdmann - January 30, 2008 - 21:17

I've deleted everything, including the panels database tables - downloaded the module again - reinstalled and I still get the same error.

Any other thoughts?

Thanks,
Heather

#13

floptikal - February 22, 2008 - 08:47

Not shure what goes on, but here's a hack that worked for me. There seems to be an issue with some themes, so try swapping themes before adding the panel (garland worked for me), and then swap back to your original theme when your done.

#14

O_o - March 10, 2008 - 09:49

I have the exact same problem with "Unknown Response From Server Error". Not only does this affect the "Context" page, it also makes my mini-panels views to show up with empty content (actually they don't show up at all). When I switch to Garland I can see the content in the mini-panels. This is something that must have been introduced in the 5.x-2.0-beta2 release since I did not have these problems in 2.0-alpha14.

This is how my response looks like when pressing the "Add required context" button.

{ "relationships_table": "\x3cdiv class=\"buttons\"\x3e\x3ctable id=\"relationship-add-table\"\x3e\n

\x3ctbody\x3e\n \x3ctr class=\"odd\"\x3e\x3ctd class=\"title\"\x3e\x3cdiv class=\"form-item\"\x3e\n

\x3cselect name=\"buttons[relationship][item]\" class=\"form-select\" id=\"edit-buttons-relationship-item

\" \x3e\x3coption value=\"term_from_node\"\x3eTerm from node\x3c/option\x3e\x3coption value=\"book_parent

\"\x3eBook parent\x3c/option\x3e\x3c/select\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd class=\"add\" width

=\"60%\"\x3e\x3cinput type=\"submit\" name=\"op\" id=\"edit-buttons-relationship-add\" value=\"Add relationship

\"  class=\"form-submit relationship-add\" /\x3e\n\x3c/td\x3e \x3c/tr\x3e\n\x3c/tbody\x3e\x3c/table\x3e

\n\x3c/div\x3e", "type": "add", "output": "\x3ctr id=\"requiredcontext-row-0\" class=\"requiredcontext-row

odd\"\x3e\x3ctd class=\"title\"\x3e\x26nbsp;Node\x3c/td\x3e\x3ctd class=\"operation\"\x3e\x3cinput type

=\"image\" class=\"form-submit requiredcontext-settings\" name=\"requiredcontext[settings]\" value=\"Configure

\" id=\"requiredcontext-settings-0\"  src=\"/intranet/modules/panels/images/configure.gif\" alt=\"Configure

this item\" title=\"Configure this item\" /\x3e\n\x3cinput type=\"image\" class=\"form-submit requiredcontext-up

\" name=\"requiredcontext[up]\" value=\"Up\" id=\"requiredcontext-up-0\"  src=\"/intranet/modules/panels

/images/go-up.png\" alt=\"Move this item up\" title=\"Move this item up\" /\x3e\n\x3cinput type=\"image

\" class=\"form-submit requiredcontext-down\" name=\"requiredcontext[down]\" value=\"Down\" id=\"requiredcontext-down-0

\"  src=\"/intranet/modules/panels/images/go-down.png\" alt=\"Move this item down\" title=\"Move this

item down\" /\x3e\n\x3cinput type=\"image\" class=\"form-submit requiredcontext-top\" name=\"requiredcontext

[top]\" value=\"Top\" id=\"requiredcontext-top-0\"  src=\"/intranet/modules/panels/images/go-top.png

\" alt=\"Move this item to the top of the list\" title=\"Move this item to the top of the list\" /\x3e

\n\x3cinput type=\"image\" class=\"form-submit requiredcontext-bottom\" name=\"requiredcontext[bottom

]\" value=\"Bottom\" id=\"requiredcontext-bottom-0\"  src=\"/intranet/modules/panels/images/go-bottom

.png\" alt=\"Move this item to the bottom of the list\" title=\"Move this item to the bottom of the list

\" /\x3e\n\x3cinput type=\"image\" class=\"form-submit requiredcontext-remove\" name=\"requiredcontext

[remove]\" value=\"Remove\" id=\"requiredcontext-remove-0\"  src=\"/intranet/modules/panels/images/delete

.png\" alt=\"Remove this item\" title=\"Remove this item\" /\x3e\n\x3c/td\x3e\x3c/tr\x3e", "position"

: 0 }

Any idea of what could be the reason for this? It is clearly theme related in some way but I cannot indentify the exact cause of the problem. What is bugging me more is that the mini-panels doesn't work at all in my theme since 5.x-2.0-beta2. I will be happy to assist in any way to solve this problem. Just let me know how I can help.

#15

DonTino - March 18, 2008 - 11:05

same problem here, I'll try to switch the theme first and let you know if it helped

#16

DonTino - March 18, 2008 - 11:19

not working, still getting the server error

any help???

Tino

#17

DonTino - March 18, 2008 - 11:36

ok I installed firebug as well and did what was told above

however I get the following response:

'Loading... '

nothing changes it just shows 'Loading...', is it a problem on my side?

Tino

#18

Gundalo - May 15, 2008 - 23:49

I did some looking into this, since I'm having the same problem...

In the JSON outputted by the server, there is a TAB character in front of everything.

under advice from merlinofchaos, I printed out something from my own custom module, and sure enough, a tab character shows up in front of it.

So there is something somewhere printing a tab character (or displaying it ouside of ?> )

In my setup it was activity.module... at the beginning of the file is a tab character, then <?.

It could be a different module for the rest of you guys. I found it by copying the tab character and searching for "[tab-char]<?"...
it could also be at the end, so search for "?>[tab-char]" also.

I'll post an issue to the activity module.

later,
jon

#19

CorpX - May 23, 2008 - 07:47

Hi guys,

I decided to play with different settings and found the source of this problem for me. Try changing themes... WOrks in Garlard but not in my custom theme. Doesn't make any sense, but I think that this may be causing it for others.

I'm a Theme dev, noto a php dev - but I hope this helps Merlin and team.

--
COrpX

#20

CorpX - May 23, 2008 - 19:18

Here's another piece of trouble shooting info - My theme is conflicting with this even if I am using garland as my administrator theme.

Trouble shooting results ...

1. Garland theme - no administrator theme - it worked
2. custom theme - no administrator theme - received unknown Response from Server Error
3. custom theme - Garland theme as administrator theme - received unknown Response from Server Error

What I found weird is that the default site theme is breaking the UI even in cases where the Garland theme (set as admin theme) is being loaded for the panels administration pages.

--
J.

#21

sdboyer - May 23, 2008 - 21:52

Keep these reports of when/where you got these js errors coming if you have em, folks - I suspect that jon's info in #18 is gonna prove to take care of most/all of this, but this is a particularly elusive problem, so every little bit of information helps.

#22

phonydream2 - May 26, 2008 - 14:23

Would it be possible to manually enter contexts into the database for this section? It's make or break functionality for me and I can't isolate the cause of the error. It's possible the error is only affecting the admin page and not the panels themselves, in which case it'd be useful to just enter the values in manually.

#23

ChristieLuv - May 28, 2008 - 18:51

Hi everyone! I was getting the same error, what a coinkidink, I'm using a custom template.php as well! I figured out what the issue was at least on my end. It was the code Advanced Profile Kit asks you to install in your template.php when your installing Advanced Profile Kit. I just installed it in the wrong way. Once I checked how to put it in the right way it worked! I was able to add a relationship and everything! So if this is your case you might want to try that out.

This is the code I'm talking about that Advanced Profile Kit asks you to install:

<?php
 
if (module_exists('advanced_profile')) {
   
$vars = advanced_profile_addvars($hook, $vars);
  }
?>

Here is the link where they ask you to install it:

http://drupal.org/node/214350

Read this to see how to put it in the right way:

http://drupal.org/node/207841

~Christie

#24

phonydream2 - May 29, 2008 - 06:27

Christieluv,

When you say you had installed it the 'wrong way', could you be a little more specific? What changes did you make?

#25

ChristieLuv - May 29, 2008 - 14:10

Hi! I put it in like this, with the php tags included inside my template.php code that already had php tags wrapping it and I forgot to include the _phptemplate_variables function:

<?php
 
if (module_exists('advanced_profile')) {
   
$vars = advanced_profile_addvars($hook, $vars);
  }
?>

The right way for me to put it in was this:

function _phptemplate_variables($hook, $vars) {
  if (module_exists('advanced_profile')) {
    $vars = advanced_profile_addvars($hook, $vars);
  }

/***EXISTING CODE IN THE FUNCTION, IF ANY***/


  return $vars;
}

BUT the correct way to stick it in is different with every template.php, thats why its a good idea to read the page that explains how to put it in.

You can go ahead and use this code above without reading it if your style doesn't have a template.php yet or if your style does have a template.php but doesn't have this function in it: _phptemplate_variables

~Christie

#26

phonydream2 - May 30, 2008 - 06:36

Thanks ChristieLuv for responding.

I put the following code at the end of the _phptemplate_variables($hook, $vars) function, but it doesn't solve the issue:

foreach($vars as $key=>$val) {
  $vars[$key] = trim($val);
}
return $vars;

I'm trying to trim excess tab and whitespace characters from each value in the $vars array.

#27

phonydream2 - May 30, 2008 - 06:36

Is there a program (application or script) that will iterate through every .module file in a folder (and subfolders) that will strip the tab and whitespace characters from them?

That would be very useful, if only to identify the cause of the error as not being from tab and whitespace at the beginning/end of a module file as suggested in #18

#28

rentex - July 5, 2008 - 18:01

Im experiencing this in Panels 5.x-2.0-beta3 as well.
Anyone found out what the cause is?

 
 

Drupal is a registered trademark of Dries Buytaert.