[x]):template: repo/diff/section_unified:1:11: executing "repo/diff/section_unified" at <.file>: can't evaluate field file in type *models.DiffFile
If no change is made to the files, it sucessfully shows "There are no changes to show.", but if something changes, it doesn't work (stuck on "Loading…"), and analyzing the POST request it returns the error above.
I tried:
I'm out of ideas.
Could you reproduce that on https://try.gitea.io ?
Tested now.
Yes. Using Firefox, IE and Edge on Windows. Same problem.
Tried on another computer too (Ubuntu, Firefox).
@alpe12 could you give a link where you tested on https://try.gitea.io ?
Just created this empty file and tried to edit it (and preview).
https://try.gitea.io/alpe12/test/_edit/master/testfile

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
This issue has been resolved.
Closed now and feel free to reopen it.
@lunny I also have this problem with dockerised gitea 1.9.1, ubuntu, sqlite, firefox latest.
It just says "Loading..." and doesn't show preview.
The console has this error:
Failed to load ‘http://localhost:3000/api/v1/repos/bob/techno/markdown’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘TypeError: NetworkError when attempting to fetch resource.’.
And the suspicious thing is that gitea is running on a different port, not the 3000 shown above. And everything else works...
@lonix1 That should be your configuration's problem. You can go discord or discourse forum to discuss your problem.
@lunny Thanks for the tip, I found the problem in the config. :+1:
For anyone else with this problem, please note that the docs don't explain properly. If you are using docker, and you use ports 4000:3000 (for example) instead of the default 3000:3000, then this must be in the config:
ini
HTTP_PORT = 3000 # internal docker port
ROOT_URL = http://localhost:4000/ # external docker port
I thought they must both be equal to the internal docker port, but that is not correct. ROOT_URL must be set to the external docker port!
Most helpful comment
@lunny Thanks for the tip, I found the problem in the config. :+1:
For anyone else with this problem, please note that the docs don't explain properly. If you are using docker, and you use ports 4000:3000 (for example) instead of the default 3000:3000, then this must be in the config:
ini HTTP_PORT = 3000 # internal docker port ROOT_URL = http://localhost:4000/ # external docker portI thought they must both be equal to the internal docker port, but that is not correct.
ROOT_URLmust be set to the external docker port!