I’ve created a document in OnlyOffice on macOS that contains fields, like those inserted via “Insert” → “Date & time” when the “Update automatically” option is checked. On other platforms - at least on Linux, I cannot test on Windows -, when I open a document, all fields seem to be automatically updated with the current value. That doesn’t seem to happen on macOS: the value for the fields are still the ones they had when the document was last saved, and I have to update them manually via F9 or the contextual menu.
Is this the intended behavior, or is it a bug? It seems weird that the behavior is different depending on the platform.
Thanks!
OS version: macOS Ventura 13.7.5
OnlyOffice version: 8.3.3
Downloaded from: official website
Thank you for your message and for providing such detailed information!
We’ll do our best to reproduce the issue on macOS and analyze what might be causing the inconsistent behavior across platforms. Once we’ve investigated the problem, I’ll get back to you with an update. Thanks again for your help and patience!
Thank you for your quick response, Nikolas. I’ve worked a bit with fields on macOS in OnlyOffice lately, and it seems there are a few issues - I just created a new post with another one. I’ve had other weird ones that I could not reproduce systematically, but I’ll try to find a way.
Anyway, if you need other precisions or if you need someone to test something, feel free to ask me, I’ll be glad to help!
I’ve already replied to you about the other issue I had with fields on macOS (“Toggle field codes” not working as expected), and as it turns out, the document causing the issue is the same one. You can get it here. When I open this particular document, the fields in it are not updated. If I create a new document and insert a field in it, it does work as expected, and the fields are updated on open.
By the way, I’m not the only one who managed to create a document showing the problem: I actually made the test for a friend of mine who got the same issue. Strangely, I managed to reproduce the problem on my first try.
Update: I just transferred the problematic document to another PC with another OS (Linux openSuse Leap 15.6), and I’m getting the same behavior: the field is not updated when I open the document, I have to do it explicitely every time.
Enabling non-printing characters display shows the problem with this file. You see, there is pilcrow character, i.e. paragraph character, in the field, which is considered to be a part of the field, but it interferes with the field logic.
I’ve created a file anew to demonstrate this:
Here I have highlighted a field with pilcrow character outside the field:
Here is field with pilcrow inside the file just like in your document:
First field updates automatically as nothing interferes with its logic, but the second one indeed produces the behavior you are describing. You just needed to start a new paragraph outside the field to avoid this problem.
Thanks a lot, this gives a solution to the problem and will allow me and my friend to fix the weird behavior.
Now I have tried to create again a field that includes the paragraph ending just as you showed, but I just couldn’t succeed. I have no idea how I did it in the first place, and the weird thing is, my friend did it too. Any idea about how that could have happened? I obviously haven’t messed up with the internal XML code or whatever, I just created the field using the standard “Insert” → “Field” from the toolbar. And yet, I ended up with a paragraph ending inside it and so did my friend… Maybe it would be nice to include something that would prevent this from happening, like, ever, since it seems to only cause problems.
Once field is inserted, whether it is Insert > Field or Date & Time with automatic update, it becomes active, so pressing Enter results in this behavior and it is expected. You can see that after insertion the field is highlighted with gray, it means the cursor is actually inside the field itself.