Autosave is not working for me. I have a multi-language site with different content types. Some have WYSIWYG and some just title and image field. But autosace is not working. In firebug I can see the ajax request for the autosaving and if gets a 403 from the server. Tested as user 1 och normal user.

Have tested the solution in #1768660: Access denied on Log Messages but that did not help me in version 7.

I will update this issue the following days with further finds. Will test clean multi-language site. And try to find a solution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kristofferwiklund’s picture

Works with Drupal 7.23 Minimal installation. So now I just need to find the parts that break it. So I have a good version and a bad version. Lets the debugging start. :)

yvesvanlaer’s picture

Hey kristofferwiklund, found something?

yvesvanlaer’s picture

For some reason menu items is FALSE.

in autosave.module line 264

function autosave_save_access() {
...

$menu = isset($menu_item['access']) ? $menu_item['access'] : FALSE;
  $menu = TRUE;
  return $token && $menu;
}

Adding "$menu = TRUE;" fixes the issue. But I can't figure out why this is turning false.
Anybody has a clue how to debug?

kristofferwiklund’s picture

I did have time. This spare time project got low priority then a customer project got high priority. Will try to find some time for it.

RemovE’s picture

Try in autosave.module on line 408 remove one '=' from '==='

Change:

if ($url_part === LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX) {

to:

if ($url_part == LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX) {
kristofferwiklund’s picture

Yes. That did the trick. Now the autosave seems to be working in my limited testing.

Time to but the customer to the test.

lklimek’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.71 KB

Solution in comment 5 solves the issue. Please see attached patch.

lklimek’s picture

FileSize
651 bytes

Fixed patch

dariogcode’s picture

I have the same issue. The error dissapear after apply the patch but I'm receiving a new error: "Uncaught TypeError: Cannot read property 'formid' of undefined". I think the conflict is with image ajax calls, if I don't use this field the error dissapear and everything works fine. If this isn't related I can open another issue.

czigor’s picture

Status: Needs review » Fixed

Committed, thanks!

  • czigor committed 143d794 on 7.x-2.x authored by lklimek
    Issue #2069235 by lklimek: Autosave not working. Getting 403 for the...

Status: Fixed » Closed (fixed)

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