Related issue:
Admin language causes file uploads to save node

==
I set admin language = English
I create a node have language set as "Neutral / a language not same as admin language"
Then I add images to node => ok.
But when I try to remove a image from node:
+ 1st click remove button: status message is node is updated (it mean it update althrough I haven't clicked on Save button, amazing); and more strange is: image is still appear in node editing form.
+ Then I click 2nd click on "remove" button: then image disappear on node-edit-form
+ Then I click "Save" to save node then I receive this error:
"The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved."
==
Quick hack solution:
I goto admin_language settings:
1, disable admin_language (if you call it a solution)
or
2, And add a path pattern for using admin_language is: node/*/edit then everything OK.
So this bug is by admin_language module

==
I have a question:
In this old patch: (3 year ago) : have node/*/edit in it, and it's committed. So why current version of admin_language I don't see node/*/edit in ADMIN_LANGUAGE_DEFAULT_PAGES (in admin_language.module)

==
This bug is very difficult to track down, so please solve this bug one and for all to avoid it happen in the future. Not only with path like: "node/*/edit", but also other path;
Maybe: Add more clearly documeantation, even in module page
or / and: add more path pattern as ADMIN_LANGUAGE_DEFAULT_PAGES

Comments

rodrigoaguilera’s picture

It was very difficult for me also to track down the issue.

I can confirm that your steps can reproduce the issue.

rodrigoaguilera’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new449 bytes

A patch that includes the path for media ajax calls

ludo.r’s picture

I just ran into that issue.

#2 patch doesn't solve the problem for me.
When using language path prefix or not, it doesn't make a difference.

However, adding "node/*/edit" as just said above solves the problem.

mesnitu’s picture

I run into this issue. I updated to the dev version following this issue https://www.drupal.org/node/1933120
and apply the patch from https://www.drupal.org/comment/5446262#comment-5446262, but it didn't resolve nothing.
I merge this patch #2 with the other one, and now it's working . So I have this:

define('ADMIN_LANGUAGE_DEFAULT_PAGES', "admin\nadmin/*\nadmin_menu/*\nnode/add/*\nnode/*/edit\nnode/*/devel\nnode/*/translate\nfile/ajax/*\nmedia/ajax/*\nsystem/ajax");
rodrigoaguilera’s picture

Status: Needs review » Needs work

Then those path should be added to the patch too

pslcbs’s picture

Thanks @rodrigoaguilera & @mesnitu for pointing me on the solution to this issue that was driving me crazy!!

stefan.r’s picture

stefan.r’s picture

Status: Needs work » Fixed

Committed #4

Status: Fixed » Closed (fixed)

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

ParisLiakos’s picture

norman.lol’s picture

Vote to reopen. Still occurs on node edit pages with media browser image fields. Trying to remove an image (added through media browser priorily) triggers the bug and error message and prevents the node from getting saved.

stefan.r’s picture

@leymannx can you check with your inspector in the console tab which path the request is being made to? this patch added media/ajax, is it another path? Or did you perhaps overwrite the default list of paths manually and need add it there?

Zipbic’s picture

I'm also experiencing the same problem through the media browser.
When i click the "remove" button a request is made to "/media/ajax/field_campaign_image/und/0/form-hashvalue...."

tramsaal’s picture

The same bug just happened to me, disabling the admin_language module solved the issue. So the bug is still there.

pawlus’s picture

I can confirm this, bug's still there (reinstalled the module completely after applying patch).

umac_de’s picture

@ Pawlus,tramsaal - same problem here, but found my solution in the error.log:
Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini

joshf’s picture

If you're editing a node with a translated taxonomy term field, you may also be getting bitten by this bug: https://www.drupal.org/project/i18n/issues/3003386
It seems very much like an admin_interface bug but in this case it's an i18n issue.

pawlus’s picture

Thanks so much , @joshf, that was exactly what was causing the problem.