Skip to content

Edit of comments not possible #18522

Closed
Closed
@tautf

Description

@tautf

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

Activity

wxiaoguang

wxiaoguang commented on Feb 1, 2022

@wxiaoguang
Contributor

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

zeripath

zeripath commented on Feb 1, 2022

@zeripath
Contributor

I think this is likely a duplicate of #18281

changed the title [-]Edit of comments noot possible[/-] [+]Edit of comments not possible[/+] on Feb 1, 2022
silverwind

silverwind commented on Feb 1, 2022

@silverwind
Member

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

wxiaoguang

wxiaoguang commented on Feb 2, 2022

@wxiaoguang
Contributor

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 #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.

silverwind

silverwind commented on Feb 2, 2022

@silverwind
Member

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.

wxiaoguang

wxiaoguang commented on Feb 2, 2022

@wxiaoguang
Contributor

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".

tautf

tautf commented on Feb 2, 2022

@tautf
Author

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.

zeripath

zeripath commented on Feb 2, 2022

@zeripath
Contributor

@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.

lunny

lunny commented on Feb 2, 2022

@lunny
Member

@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.

wxiaoguang

wxiaoguang commented on Feb 2, 2022

@wxiaoguang
Contributor

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

wxiaoguang commented on Apr 7, 2022

@wxiaoguang
Contributor

It's highly likely related the cache problem, or maybe some issues which have been fixed (eg: #18281)

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

locked and limited conversation to collaborators on May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lunny@silverwind@zeripath@wxiaoguang@tautf

      Issue actions

        Edit of comments not possible · Issue #18522 · go-gitea/gitea