Restored data of a text file is not refreshed in Text Editor

Hi.

Nextcloud version (eg, 18.0.6) : 19.0.0
Operating system and version (eg, Ubuntu 20.04) : XigmaNAS RootOnZFS 12.1.0.4 - Ingva (revision 7542) via OBI
Apache or nginx version (eg, Apache 2.4.25) : lighttpd/1.4.55 (ssl)
PHP version (eg, 7.1) : PHP 7.4.5 (cli) (built: Apr 17 2020 03:37:23) ( NTS )

The issue you are facing: The File Editor does not refresh the data properly when a version is restored.

Is this the first time you’ve seen this error? (Y/N) : Newbie. First install.

Steps to replicate it:

I have changed a Readme.md file several times, in order to see how versions feature work.

  1. Inside the text editor, I open the sidebar, I click on the 3 dots, I restore the file to the previous version and I close the editor. I wait for a minute, por example.

  2. Then, I click again on the Readme.md file, but the text is not restored! However, in the sidebar, the text displayed is the correct one, the restored one. In the Versions pane the image of the first version corresponds to the previous data which is what is currently displayed in the text editor.

If I download the file and open it, the data is the correct one, the restored one.

# PHP Version 7.4.5

|System|FreeBSD nas4free.local 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 #0 r360028M: Fri Apr 17 01:52:46 CEST 2020 root@dev.zoon01@xigmanas.com:/usr/obj/xigmanas/usr/src/amd64.amd64/sys/XIGMANAS-amd64 amd64|
| --- | --- |
|Build Date|Apr 17 2020 03:36:40|
|Configure Command|'./configure' '--with-pear' '--with-openssl' '--with-gettext' '--with-libxml' '--enable-mysqlnd' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-external-pcre' '--with-zlib-dir=/usr' '--with-config-file-path=/usr/local/etc' '--with-config-file-scan-dir=/usr/local/etc/php' '--enable-pdo' '--with-pdo-mysql=mysqlnd' '--with-pdo-sqlite=/usr/local' '--with-sqlite3' '--with-iconv-dir=/usr/local' '--with-bz2=/usr' '--with-curl' '--enable-gd' '--with-freetype' '--with-jpeg' '--enable-intl' '--with-ldap=/usr/local' '--enable-mbstring' '--with-pcre-dir=/usr/local' '--with-mcrypt=/usr/local' '--with-gmp=/usr/local' '--enable-bcmath' '--enable-hash' '--with-mhash' '--enable-ftp' '--with-imap=/usr/local' '--with-imap-ssl=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-tokenizer' '--with-xmlrpc' '--with-zip' '--with-zlib=/usr' '--enable-opcache' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd12.1' 'build_alias=amd64-portbld-freebsd12.1' 'PKG_CONFIG=pkgconf' 'LDFLAGS= -L/usr/lib -lcrypto -lssl -fstack-protector-strong ' 'LIBS=' 'CPP=cpp' 'OPENSSL_CFLAGS=-I/usr/include' 'OPENSSL_LIBS=-L/usr/lib -lssl -lcrypto' 'CXXFLAGS=-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -DLDAP_DEPRECATED -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++11 '|
|Server API|CGI/FastCGI|
|Virtual Directory Support|disabled|
|Configuration File (php.ini) Path|/usr/local/etc|
|Loaded Configuration File|/usr/local/etc/php.ini|
|Scan this dir for additional .ini files|/usr/local/etc/php|
|Additional .ini files parsed|/usr/local/etc/php/apcu.ini, /usr/local/etc/php/ext-20-smbclient.ini, /usr/local/etc/php/opcache.ini, /usr/local/etc/php/z-nextowncloud-php.ini|
|PHP API|20190902|
|PHP Extension|20190902|
|Zend Extension|320190902|
|Zend Extension Build|API320190902,NTS|
|PHP Extension Build|API20190902,NTS|
|Debug Build|no|
|Thread Safety|disabled|
|Zend Signal Handling|enabled|
|Zend Memory Manager|enabled|
|Zend Multibyte Support|provided by mbstring|
|IPv6 Support|enabled|
|DTrace Support|disabled|
|Registered PHP Streams|https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip, smb|
|Registered Stream Socket Transports|tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3|
|Registered Stream Filters|zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk|

[[image]](http://www.zend.com/)This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

Why the text editor does still show old data instead the restored one?

Thanks!