Hello,

I am not too sure if this is an error in ctools or panels, but based on my searches over last few hours, I think it is ctools error. I am trying to edit the node-template thru panels, when I am on screen to add selection rule, as soon as I select a selection rule like node-type and hit add, it gives me an error which I suppose is an ajax error. I have attached the error screenshot.

I have updated my copy of Drupal to the latest version.
I read on some of the forums related to this module, that uninstalling ctools and Panels module and reinstalling them would resolve the issue. I did that multiple times, but still this error.

Drupal Version :6.17
Panels Version : 6.x-3.5
Ctools Version: 6.x-1.6

Please let me know how this can be fixed. It is really critical to me.
Thanks,

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupaldev5555’s picture

Priority: Critical » Normal

Someone Please help, I have tried almost everything that is mentioned in the forums, but I am still getting this error.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

No screenshot attached. What's the error?

Also be sure to look in your apache/PHP/watchdog log as there may be more information there.

drupaldev5555’s picture

FileSize
49.58 KB

hello merlinofchaos,

You have been a great contributor to Drupal and although I am new to it, but I learnt so much from reading your posts!

I had attached the screenshot but I am not sure why it disappeared.

Attaching the screenshot again.

The error that I am getting as you can see in the screenshot is
http://www.example.com/Drupal/ctools/context/ajax/access/add/page_manage...

Error Description: 400: Bad Request

I get this error specifically when I am trying to add a selection rule. I would also like to mention that I dont get this error when I am adding content to regions or other tasks.
I have read posts of other people who had similar issue and the patches you created were related to the 'Data'

Please let me know if you need more info.

I really appreciate you helping me with this.

drupaldev5555’s picture

Status: Postponed (maintainer needs more info) » Active

Please let me know if you need more information. Once again thanks for helping out.

drupaldev5555’s picture

Please reply, I am really stuck here.

merlinofchaos’s picture

Hmm. That looks suspiciously like what you are working on is getting cached incorrectly. This is kind of a tough one to figure out from what I'm seeing. I'm not entirely sure what to even suggest offhand to investigate this further.

drupaldev5555’s picture

I am running the Drupal installation on Fatcow's webserver. Do you think I should work with them to change any settings that might resolve the issue?
If yes can you please tell me what kind of setting should I change that might potentially help in resolving the error? Is it something to do with the way Fatcow caches in the backend?

merlinofchaos’s picture

Unfortunately I know nothing about Fatcow, so I'm unable to provide any advice. :/

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

You are not the first person to discuss having issues on Fatcow. Maybe there is something in their server setup that is causing problems. It's hard for me to tell, unfortunately, what the issues might be. :/

Someone with some knowledge is going to probably need to test on Fatcow to see what it is they're doing.

dreadlocks1221’s picture

I am running the latest drupal 6 on a dreamhost server and I get the same error

dreadlocks1221’s picture

FileSize
308.72 KB

addition: I just attached a screenshot from chrome which should provide more diagnostic information, I also found a post on another module for a similar issue? response 16 seems to have a fix but I dont know if it works with ctools:

http://drupal.org/node/417570

merlinofchaos’s picture

I see you're running jquery_update -- what version of jquery is that updating you to? If it's 1.4, there is a core patch you need.

dreadlocks1221’s picture

Using v1.4.2, can you post a link to the patch and tell me which file it patches?

dreadlocks1221’s picture

Status: Postponed (maintainer needs more info) » Active
merlinofchaos’s picture

Status: Active » Fixed

You need this patch if running jquery 1.4* http://drupal.org/node/479368#comment-3198886

jorgbert’s picture

I'm experiencing the same problem on PowWeb hosting.

"An error occurred at "http://www.mysite.com/ctools/context/ajax/access/add/page_manager_task_h.... Error Description: 400: Bad Request"

Drupal 6.19
ctools-6.x-1.x-dev_2010-0902
panels-6.x-3.x-dev_2010-0903
jquery_ui-6.x-1.x-dev_2010-0711
jquery.ui-1.6

Contexts, etc work fine in Panels. "Selection rules" blows up when I select "String: URL path" and click .

Any ideas on where to look will be greatly appreciated! :)

jorgbert’s picture

Tried patch http://drupal.org/node/479368#comment-3198886 on 6.19 common.inc. Made no difference.

jorgbert’s picture

Status: Fixed » Needs work

Latest patch supplied made no difference.

merlinofchaos’s picture

Unfortunately, error code 400 means the webserver is rejecting the request for some reason. I have no idea why it is, and so I have no idea what to suggest to fix it.

jorgbert’s picture

Thank you so much for looking at my info. I'll dig into the code and see if I can influence the results.

We are using Panels Everywhere with great success on our new corporate Internet and Intranet websites. They are all internally hosted on Windows 2003 and give us no problems. Panels is really, really nice!

You are awesome!

jorgbert’s picture

The error is actually produced on line 13 of misc/jquery.js

jquery.js line 13 400 Bad Request
jQuery 1.2.6

=============
PHP 5.2.12
jason support enabled 1.2.1
Drupal 6.19
ctools-6.x-1.7
panels-6.x-3.7
jquery_ui-6.x-1.3
jquery.ui-1.6

http://www.mysite.com/admin/build/pages/ajax/operation/node_view/handler...
http://www.mysite.com/misc/tableheader.js?m&_=1284092463324
http://www.mysite.com/ctools/context/ajax/access/add/page_manager_task_h...

[Error happens here in a really ugly line of Javascript]
http://www.mysite.com/misc/jquery.js?mm (line 13)

jorgbert’s picture

Updated with jQuery Update to 1.3.2. Now I get a 400 at jquery.min.js?m (line 19)

jQuery UI 1.6
jQuery Update 1.3.2

jorgbert’s picture

Updated jQuery to 1.4.2.js and 1.4.2.min.js
Applied 479368_drupal_to_js_all_escaped_13.patch

Still get http://www.mysite.com/ctools/context/ajax/access/add/page_manager_task_h...

Referer is http://www.mysite.com/admin/build/pages/nojs/operation/node_view/actions...

Error now produced at jquery.min.js?L (line 130)

g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===

It is odd that other choices work, but adding "Selection Rules" makes it blow up.

Also it seems like Add variant won't actually save.

Daniel Norton’s picture

Issue tags: +jQuery

See this related issue mentioned in Comment #4 above. It includes a patch to resolve that problem:

#910284: Reference to undefined JavaScript variable “jQuery” for anonymous visitors

praestigiare’s picture

I am almost certain this problem is related to the colon (%3A) in the url, which IIS 7 disallows, even if escaped, except in the query string. And unfortunately for those of us on IIS, this check is made before URL rewriting is carried out, which would place it in the query string.

The solution is either to patch the module to remove this character, to disable clean urls, or possibly use a different url rewriting solution - I am still trying to solve this on my setup.

Stan Turyn’s picture

Hello,

I have encountered a similar error - i.e. Page Manager produses Ajax error.

In my case the problem was that we run the site behind reverse SSL proxy forwarding to non-SSL Apache.

To solve: specify $base_url in Drupal's settings.php and use https://... there.

Hope this helps someone.

Anonymous’s picture

Version: 6.x-1.6 » 6.x-1.8

I have a client that uses FatCow and I ran into this problem when needing to make a change to a selection rule. The asterisk (%2A) was apparently something that the server did not like. The work-around for me was exactly what was described in post #26: use https://.

I presume this probably has something to do with mod_security, but attempting to disable mod_security didn't help (and sometimes resulted in random Internal Server Errors, go figure).

Hodgekins’s picture

I have this exact problem and I'm using iPage.

The way I got round it was by creating the variant on my computer and exporting it into page manager on my production site.

Apologies, I know this doesn't solve the problem in any way, but hopefully it might help someone.

mwangi’s picture

Component: Page Manager » User interface
Status: Needs work » Active

Yes, it is the IIS that is blocking the panel update.

I disabled friendly urls in Drupal and updated the panel as needed.

Then I re-enabled friendly urls and voila!

thanks for the info identifying IIS as the real culprit - you saved me many hours

GaëlG’s picture

Thanks mwangi. The clean-url workaround worked for me.

stupiddingo’s picture

FileSize
4.99 KB

After much research, I can report success using the following solution for IIS7. The error is caused by IIS7 finding a colon (%3A encoded) in the URL which IIS treats as an illegal character.

Solution is to add the following to your web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
...
    <system.web>
		<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="*,&amp;,\" />
	</system.web>
</configuration>

And make sure you set the Application Pool to be .Net Framework 4.0 which is required for the parameters in the httpRuntime settings above to function.
Application Pool Basic Settings

Tested on D7 using Panels 7.x-3.0 & CTools 7.x-1.0-rc1 on IIS7 64bit, but should work for all version of Panels since it is the colon which is causing IIS to return a 400 error. You could set requestPathInvalidCharacters="" to allow all, but the setting above simply removes ":" from the list.

Sources:
* Dirk.Net Ampersand and the Request URL in IIS
* Jacob Krall's answer on Stack Overflow to How to use a colon in a URL
* Christopher Crooker, Use any Character you want in a URL
* Scott Hanselman cautioning you not to do this

Michsk’s picture

Just so you know, this also happens in D7 with apache. I remembered reading something about this error and drupal for firebug module. Disabling that module fixed it for me.