Edit of comments not possible #8452

Closed
opened 2025-11-02 08:06:27 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @tautf on GitHub (Feb 1, 2022).

Gitea Version

1.16.0

Git Version

No response

Operating System

Windows Server

How are you running Gitea?

Windows service that starts gitea.exe

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

When clicking the edit button on issue comment etc. nothing happens and the following issue appears.
Just updated from 1.15.10 to 1.16.0

index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value') at HTMLDivElement.<anonymous> (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:3669) at Generator.next (<anonymous>) at index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5242 at new Promise (<anonymous>) at Ws (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5062) at HTMLDivElement.Bb (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:561) at HTMLDocument.dispatch (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:274187) at HTMLDocument.Nt.handle (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:272017) (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Ws @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Bb @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 dispatch @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1 Nt.handle @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1

Screenshots

No response

Originally created by @tautf on GitHub (Feb 1, 2022). ### Gitea Version 1.16.0 ### Git Version _No response_ ### Operating System Windows Server ### How are you running Gitea? Windows service that starts gitea.exe ### Database SQLite ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description When clicking the edit button on issue comment etc. nothing happens and the following issue appears. Just updated from 1.15.10 to 1.16.0 `index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value') at HTMLDivElement.<anonymous> (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:3669) at Generator.next (<anonymous>) at index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5242 at new Promise (<anonymous>) at Ws (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77:5062) at HTMLDivElement.Bb (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82:561) at HTMLDocument.dispatch (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:274187) at HTMLDocument.Nt.handle (index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1:272017) (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 (anonymous) @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Ws @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:77 Bb @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:82 dispatch @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1 Nt.handle @ index.js?v=63283ac5ef3618dbfa5fcf82866ca1ea:1` ### Screenshots _No response_
Author
Owner

@wxiaoguang commented on GitHub (Feb 1, 2022):

Is it related to local cached files? What about Private Window or Ctrl+F5?

@wxiaoguang commented on GitHub (Feb 1, 2022): Is it related to local cached files? What about Private Window or Ctrl+F5?
Author
Owner

@zeripath commented on GitHub (Feb 1, 2022):

I think this is likely a duplicate of #18281

@zeripath commented on GitHub (Feb 1, 2022): I think this is likely a duplicate of #18281
Author
Owner

@silverwind commented on GitHub (Feb 1, 2022):

Please clear the browser cache including ServiceWorker cache. Issue should resolve within 24 hours of the last visit of the old version.

@silverwind commented on GitHub (Feb 1, 2022): Please clear the browser cache including ServiceWorker cache. Issue should resolve within 24 hours of the last visit of the old version.
Author
Owner

@wxiaoguang commented on GitHub (Feb 2, 2022):

I think this is likely a duplicate of #18281

@zeripath @silverwind If we make static files served in /assets/public-{ver}/js/index.js, then we do not need to ask users to clear their cache again and again (like this one https://github.com/go-gitea/gitea/issues/18476 Unable to drag and drop issue cards from Kanban project), we can be sure that users always get correct files after every release.

Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack.

@wxiaoguang commented on GitHub (Feb 2, 2022): > I think this is likely a duplicate of #18281 @zeripath @silverwind If we make static files served in `/assets/public-{ver}/js/index.js`, then we do not need to ask users to clear their cache again and again (like this one https://github.com/go-gitea/gitea/issues/18476 `Unable to drag and drop issue cards from Kanban project`), we can be sure that users always get correct files after every release. Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack. * https://github.com/go-gitea/gitea/pull/18348
Author
Owner

@silverwind commented on GitHub (Feb 2, 2022):

Yes, dynamic assets filenames are one solution, but most collaborators prefer the dynamic part in the filename, not in a folder name and this is also default webpack behaviour IIRC.

@silverwind commented on GitHub (Feb 2, 2022): Yes, dynamic assets filenames are one solution, but most collaborators prefer the dynamic part in the filename, not in a folder name and this is also default webpack behaviour IIRC.
Author
Owner

@wxiaoguang commented on GitHub (Feb 2, 2022):

but most collaborators prefer the dynamic part in the filename, not in a folder name and this is also default webpack behaviour IIRC.

most sometimes is not correct. Before MVVM, most developers think jQuery is the best solution. I only care about what's the right thing to do.

Arguing things without a feasible solution from time to time won't solve problems, maybe one year later there are still a lot of users complaining about "why should I refresh my cache when upgrading Gitea".

@wxiaoguang commented on GitHub (Feb 2, 2022): > but most collaborators prefer the dynamic part in the filename, not in a folder name and this is also default webpack behaviour IIRC. `most` sometimes is not correct. Before MVVM, most developers think jQuery is the best solution. I only care about what's the right thing to do. Arguing things without a feasible solution from time to time won't solve problems, maybe one year later there are still a lot of users complaining about "why should I refresh my cache when upgrading Gitea".
Author
Owner

@tautf commented on GitHub (Feb 2, 2022):

To all, at the day of the update it did not work. Clearing the cache didn't help as well.
Today, it works fine. Multiple clients with different os and browsers. So likely its related to the browsers.

@tautf commented on GitHub (Feb 2, 2022): To all, at the day of the update it did not work. Clearing the cache didn't help as well. Today, it works fine. Multiple clients with different os and browsers. So likely its related to the browsers.
Author
Owner

@zeripath commented on GitHub (Feb 2, 2022):

@zeripath @silverwind If we make static files served in /assets/public-{ver}/js/index.js, then we do not need to ask users to clear their cache again and again (like this one #18476 Unable to drag and drop issue cards from Kanban project), we can be sure that users always get correct files after every release.

Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack.

I have and had no problem with /assets/public-{ver}/js/index.js

My only problem was with /public-{ver}/... and the creation of new top-level dirs that would require more username restrictions.

@zeripath commented on GitHub (Feb 2, 2022): > @zeripath @silverwind If we make static files served in `/assets/public-{ver}/js/index.js`, then we do not need to ask users to clear their cache again and again (like this one #18476 `Unable to drag and drop issue cards from Kanban project`), we can be sure that users always get correct files after every release. > > Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack. > > * [Use separate asset path for different build #18348](https://github.com/go-gitea/gitea/pull/18348) I have and had no problem with `/assets/public-{ver}/js/index.js` My only problem was with `/public-{ver}/...` and the creation of new top-level dirs that would require more username restrictions.
Author
Owner

@lunny commented on GitHub (Feb 2, 2022):

@zeripath @silverwind If we make static files served in /assets/public-{ver}/js/index.js, then we do not need to ask users to clear their cache again and again (like this one #18476 Unable to drag and drop issue cards from Kanban project), we can be sure that users always get correct files after every release.
Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack.

I have and had no problem with /assets/public-{ver}/js/index.js

My only problem was with /public-{ver}/... and the creation of new top-level dirs that would require more username restrictions.

The top level is /assets which has been reserved. So I don't think there is any problem here.
But I also don't like to add hash in the directory. Why not files? For files, we can have xxxxx-1-index.js and xxxxx-2-index.js in future. It could be splitted. I assume the generated index.js will become more big. But for a directory with hash, it's more difficult to do that.

@lunny commented on GitHub (Feb 2, 2022): > > @zeripath @silverwind If we make static files served in `/assets/public-{ver}/js/index.js`, then we do not need to ask users to clear their cache again and again (like this one #18476 `Unable to drag and drop issue cards from Kanban project`), we can be sure that users always get correct files after every release. > > Changing directory name is the best solution now, it introduces the most minimal change and works for all files which are not managed by webpack. > > > > * [Use separate asset path for different build #18348](https://github.com/go-gitea/gitea/pull/18348) > > I have and had no problem with `/assets/public-{ver}/js/index.js` > > My only problem was with `/public-{ver}/...` and the creation of new top-level dirs that would require more username restrictions. The top level is `/assets` which has been reserved. So I don't think there is any problem here. But I also don't like to add hash in the directory. Why not files? For files, we can have `xxxxx-1-index.js` and `xxxxx-2-index.js` in future. It could be splitted. I assume the generated index.js will become more big. But for a directory with hash, it's more difficult to do that.
Author
Owner

@wxiaoguang commented on GitHub (Feb 2, 2022):

But I also don't like to add hash in the directory. Why not files?

Please see the original closed PR, it already explained why. No one has done the refactoring of CodeMirror and other non-webpack resources.

For files, we can have xxxxx-1-index.js and xxxxx-2-index.js in future. It could be splitted. I assume the generated index.js will become more big. But for a directory with hash, it's more difficult to do that.

Why it could be a problem? We can have version in directory and hash in filename at the same time. I do not know why it's more difficult to do that. And explained in the original PR, even if using version in directory name, we can still use hash in filename in future. This mechanism could never be a blocker.

@wxiaoguang commented on GitHub (Feb 2, 2022): > But I also don't like to add hash in the directory. Why not files? Please see the original closed PR, it already explained why. No one has done the refactoring of CodeMirror and other non-webpack resources. > For files, we can have `xxxxx-1-index.js` and `xxxxx-2-index.js` in future. It could be splitted. I assume the generated index.js will become more big. But for a directory with hash, it's more difficult to do that. Why it could be a problem? We can have version in directory and hash in filename at the same time. I do not know why `it's more difficult to do that`. And explained in the original PR, even if using version in directory name, we can still use hash in filename in future. This mechanism could never be a blocker.
Author
Owner

@wxiaoguang commented on GitHub (Apr 7, 2022):

It's highly likely related the cache problem, or maybe some issues which have been fixed (eg: https://github.com/go-gitea/gitea/issues/18281)

This one can be closed and there are already many other cache related issues.

@wxiaoguang commented on GitHub (Apr 7, 2022): It's highly likely related the cache problem, or maybe some issues which have been fixed (eg: https://github.com/go-gitea/gitea/issues/18281) This one can be closed and there are already many other cache related issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8452