Hi am using autosave module. before I face 403 forbidden I faced another problem where I was getting j is not found error through inspect elements when trying to create article page and my page interface was different form what expected. the autosave was not working but the system was not crashing neither. my expected page, the initial error and the faulty page are attached in the images below. however the autosave was working with one of the roles in my system. surprisingly the problem was in a permission to administer menu items. when i gave this permission to all the roles this problem was solved.(I really have no clue how does it relate to the problem). now the autosave is working, I get the expected page and it restores the previous draft properly but when i log out and log in, after restoring when autosave handler tries to save again I get another error through inspect element which is autosave/handler 403 forbidden. the image is attached as new error. just to remind none of these errors causes the system crash, the errors are only visible through inspect elements console panel but the autosave does not work after logging in the system and restoring for the first time.

What I have tried so far
1- Autosave version 7.x-2.x-dev
2- Clearing the cache after installation
3- Updating jquery to 1.5, 1.7
4- Following the other issue for 403 error in Ajax (setting $menu = TRUE; and changing "===" to "==" in autosave module)
5- Disabling the Compress cached pages and Aggregate JavaScript files.

Some modules that i use which might be related are workbench and multifield. however, the autosave was working in the initial phase of development and this error occurred later.
Any help is highly appreciated. thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

errand’s picture

Hello!
I'm having the same problem when using languages prefixes

jamesdixon’s picture

Status: Active » Needs review
FileSize
476 bytes

I had the same issue here. For me the issue was I wasn't using a path that was a system path like node/1234/edit or node/add/mycontent.

We had a edit form embedded in a block on a path with an alias. Because of this permissions would fail in autosave_menu_get_item($path), because it couldn't look up the menu item.

The following patch fixed this for me, but I didn't test it for a lot of different path types, so results may vary.

pribeh’s picture

I'm experiencing the same. @jamesdixon, thanks for taking a stab at this and I'm glad you're patch works in your instance however it does not resolve mine.
@jacktiong92 I also run workbench so perhaps its related.