"Someone edited the page the same time you did" even though I know I'm the only one editing it
### Summary
After importing a project from another instance, when I attempt to edit its
wiki, GitLab claims someone edited the page at the same time I did, but it's
not the case. It prevents me from saving my changes.
### Steps to reproduce
Unfortunately it doesn't happen with all projects and I don't know why it does with some projects
and not other ones:
1. Import a project from another instance.
1. Open the wiki.
1. Press the _Edit_ (pencil) button.
1. Edit contents.
1. Click the _Save changes_ button.
### Example Project
https://gitlab.com/jeromebelleman/foo
### What is the current *bug* behavior?
After importing a project from another instance,
editing its wiki and clicking the _Save changes_ button doesn't actually
save, but leaves the user in the editing page and causes this message to appear
instead:
> Someone edited the page the same time you did. Please check out the page and make sure your changes will not unintentionally remove theirs.
This happens even when I know I'm the only one editing.
### What is the expected *correct* behavior?
Editing a wiki page and clicking the _Save changes_ button should save without further ado.
### Relevant logs and/or screenshots
### Output of checks
This bug happens with GitLab.com as well as the GitLab 14.9 instance we host.
#### Results of GitLab environment info
<details>
<summary>Expand for output related to GitLab environment info</summary>
<pre>
System information
System: Ubuntu 18.04
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.7.5p203
Gem Version: 3.1.4
Bundler Version:2.2.33
Rake Version: 13.0.6
Redis Version: 6.2.6
Sidekiq Version:6.4.0
Go Version: unknown
GitLab information
Version: 14.9.2-ee
Revision: 3034418fb31
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 12.7
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: jwt, openid_connect
GitLab Shell
Version: 13.24.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
</pre>
</details>
#### Results of GitLab application Check
<details>
<summary>Expand for output related to the GitLab application check</summary>
<pre>
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.24.0 ? ... OK (13.24.0)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Projects have namespace: ...
2/1 ... yes
1/2 ... yes
7/43 ... yes
11/54 ... yes
7/55 ... yes
7/56 ... yes
8/58 ... yes
8/59 ... yes
11/61 ... yes
11/62 ... yes
11/63 ... yes
7/67 ... yes
7/68 ... yes
7/69 ... yes
7/70 ... yes
7/71 ... yes
7/72 ... yes
7/73 ... yes
7/74 ... yes
11/75 ... yes
16/76 ... yes
16/80 ... yes
16/81 ... yes
16/82 ... yes
8/83 ... yes
11/84 ... yes
7/85 ... yes
16/86 ... yes
16/87 ... yes
11/88 ... yes
11/89 ... yes
11/90 ... yes
11/91 ... yes
11/92 ... yes
11/93 ... yes
11/94 ... yes
15/96 ... yes
11/97 ... yes
36/102 ... yes
36/103 ... yes
14/104 ... yes
36/105 ... yes
11/109 ... yes
11/111 ... yes
36/112 ... yes
36/113 ... yes
36/114 ... yes
36/115 ... yes
36/116 ... yes
36/117 ... yes
36/118 ... yes
36/119 ... yes
36/120 ... yes
36/122 ... yes
36/123 ... yes
36/127 ... yes
11/128 ... yes
36/129 ... yes
36/130 ... yes
36/131 ... yes
36/132 ... yes
36/133 ... yes
36/134 ... yes
36/135 ... yes
36/136 ... yes
36/137 ... yes
36/139 ... yes
36/140 ... yes
36/141 ... yes
36/142 ... yes
36/143 ... yes
36/144 ... yes
36/146 ... yes
36/147 ... yes
36/148 ... yes
36/149 ... yes
36/150 ... yes
36/151 ... yes
36/152 ... yes
36/153 ... yes
36/154 ... yes
36/155 ... yes
36/156 ... yes
36/157 ... yes
36/158 ... yes
36/159 ... yes
36/160 ... yes
36/161 ... yes
36/162 ... yes
36/163 ... yes
36/164 ... yes
36/165 ... yes
36/166 ... yes
36/167 ... yes
36/168 ... yes
36/169 ... yes
36/170 ... yes
36/171 ... yes
36/172 ... yes
36/173 ... yes
8/177 ... yes
12/178 ... yes
7/179 ... yes
11/180 ... yes
151/181 ... yes
8/182 ... yes
11/183 ... yes
Redis version >= 5.0.0? ... yes
Ruby version >= 2.7.2 ? ... yes (2.7.5)
Git user has default SSH configuration? ... yes
Active users: ... 30
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
</pre>
</details>
issue