Hi,

I'm using Content Lock on a website my company is currently working on. We have an issue over different environments where the environments that are using Nginx don't seem to be unlocking content when the user navigates away from the page. On my development environment using apache it works fine and everything else between environments is identical. Are there any settings you can think of that may be causing this bug?

Thanks for the great module and any advice you can give.

Adam

P.S. Using PHP 5.2, and Nginx 0.7

CommentFileSizeAuthor
#3 content_lock_js-1130220.patch596 byteshalcyonCorsair

Comments

ergonlogic’s picture

Category: support » bug

I'm seeing the same thing running under nginx, though I haven't tried it on apache yet.

eugenmayer’s picture

Category: bug » support

Well, we are not officially supporting nginx nor drupal is that officially. Please debug and provide a patch, until that this stays optional.

I have zero nginx experience, so cant help here

halcyonCorsair’s picture

Title: Content is not unlocked when navigating away from the page (nginx error?) » Content is not unlocked when navigating away from the page (javascript error)
Category: support » bug
Priority: Normal » Major
Status: Active » Needs review
Issue tags: +JavaScript
StatusFileSize
new596 bytes

This looks like a straight up javascript issue. With nginx the AJAX get request was looking for a url like:

/node/<nid>/<domain name>/index.php?q=ajax/content_lock/<nid>/canceledit&k=.....

This was obviously returning a 404.

Patch attached to make the call relative to the basepath.

wiifm’s picture

Status: Needs review » Reviewed & tested by the community

Awesome patch, can confirm this still works on Apache 2.2 - keen to see this patch committed asap ;)

Thanks
Sean

acbramley’s picture

Tested as well. Nice :D

Adam

eugenmayer’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Good catch.

should be in for 2.7

todd nienkerk’s picture

+1 for a 2.7 release with this patch applied.

ohnobinki’s picture

Assigned: Unassigned » ohnobinki
ohnobinki’s picture

Status: Patch (to be ported) » Fixed

This should be fixed in 70d2d35. I haven't been able to test this on nginx, but I removed the old JS's attempt to add index.php to the mix. I'm pretty sure that the changes I made follow those in the patch...

So please reopen this bug if that changeset does not fix the issue.

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