Drag and drop not working on a live server, but works fine on localhost - the same copy of the site moved back and forth. The only immediately noticeable difference is php version: 5.3.6 on live server and 5.2.9 on localhost.

Comments

aspilicious’s picture

Version: 7.2 » 8.x-dev

Tried firebug or chrome dev tools to find a js error?

marek.d’s picture

Version: 8.x-dev » 7.2

No I have not checked.

I have also noticed that the hide / show row weights option is missing and instead I see both the directional arrows and the row weights column at the same time.

Again, this does not happen on localhost, only on the live server, and I have just moved the live server copy back to localhost and there it works fine.

Any idea what can cause this?

------------
Just changed the version for this post to 7.2 - had it selected as 8.x-dev before by mistake it seems.

aspilicious’s picture

Version: 7.2 » 8.x-dev

Bugs need to be fixed first in the latest release. And will be backported later. So 8.x it is. No I don't now what it causes.

1) drag and drop of what?
2) Check if firebug or chrome dev tools can find a js error
3) did you cleared your caches? Could be a js aggregation problem.

Its clearly not a drupal core bug so I feel like closing this.

marek.d’s picture

1) Drag and drop of anything - menus, blocks, forums, etc.
2) I found this error: $.cookie is not a function // on line 167 in misc/tabledrag.js
3) I did clear all caches several times.

I am very disappointed the you just "feel like" closing it. I am not sure how you determined that it is clearly not a core issue, when it happens to core functionality.

Once again, I am using Drupal 7.2.

aspilicious’s picture

DO you have cookies disabled in your browser?

aspilicious’s picture

from #271463: "Translate Text" button not working

I had the same issue in D7, and can confirm that in my case it is caused by the jquery.cookie.js script being blocked by my server (you can check for you own server by visiting yoursite.com/misc/jquery.cookie.js).

I took inspiration from #13 above, and renamed the file to jquery_cookie.js (note underscore). I then had to change two files where the .js was used: /modules/system/system.module and /sites/all/modules/l10n_client/l10n_client.module.

Hardly a longterm solution, but it works and I don't know how to propose a more definitive fix (being new to D7). I will see if my hosting provider can relax the MODSecurity rule which is the cause of all the trouble...

It's probably your server blocking the script. What can we do?

marek.d’s picture

Yes, that seems to be the case. I will see if they can help. At the same time, could the above fix be implemented into the core?

Thank you for assistance.

aspilicious’s picture

We don't change external libraries, thats the problem. (even its a silly file name). But I'll ask.

aspilicious’s picture

DO you have an add block extension? Can you try to disable it? That could be the problem.

marek.d’s picture

It is not the add / popup blocker as I have this issue in all browsers and only on live server. I also get a 406 error trying to view the misc/jquery.cookie.js script, so it is my host. We'll see what they say.

In the mean time, as per the post below, enabling "Aggregate JavaScript files" in admin/config/development/performance solved the issue for me.

http://drupal.org/node/594814

aspilicious’s picture

Status: Active » Closed (duplicate)

Ok I'm going to answer in that issue and closing this one.

aspilicious’s picture

Status: Closed (duplicate) » Closed (works as designed)

Decided to put the same info here (because that other issue was not a core issue)

The problem is that your host blocks the file name "jquery.cookie.js" for some reason. Js aggregation aggreagtes js in a file with a random name. This name is abviously not equal to "jquery.cookie.js" so it passes the checks on your host.

2 possibile solutions:
- ask your host why the f*** he doesn't allow it
- change the file name to jquery_cookie.js

We don't like to rename the jquery file in core because its an external library.

----------------------------------

Satisfied?

hazit’s picture

Version: 8.x-dev » 7.22

After hours of %#$@ing around with this problem, I finally solved it.

#6 did not fully fix the problem in my case.

Trying problem page in another browser (Avant) worked for me. Drag and drop functionality for admin/structure/menu/manage/management came back.

I went back to Firefox and cleared all my cookies, and that seemed to do the trick for Firefox. A frustratingly obvious solution after wasting all this time.

Am thinking of bailing on Firefox now - Avant way faster and uses way less memory!

Good luck