Affects Version/s: 4.5.1
Fix Version/s: 5.0.0
Component/s: Direct Edit
Release Notes Summary:Fixed a capability to edit custom xpath
The consequent improvement done in 4.5.1 with
NXDRIVE-1768 introduced a bug in few Qt slots arguments.
Drive is using a Qt signal to launch Direct Edit on a given document.
The function recieving the signal has that signature:
In recent Python versions (3.8+), / means that all arguments on its left are "positional-only", e.g: one must call the function like edit(arg1, arg2, ...) and edit(server_url=arg1, doc_id=arg2, ...) is forbidden.
* means that all arguments at is right are "keyword-only", e.g.: one must pass a key=value pair for those arguments such as user="alice" and download_url="...".
Combined, that means we forced the function to be called like:
But the Qt signal does not understand that new notation: it recieved 4 arguments and does not care if one is "position-only" or "keyword-only".
Results: user and download_url were always set to None.
That's the root cause of the problem.
Then, Drive was seeing an empty download_url and so it was using the default blob location, which is file:content (download_url is used to guess an eventual custom xpath).
But that xpath was not found as blobs are effectively stored elsewhere.
That command mimics a click on the Direct Edit button in from Web-UI:
In 4.5.1, Drive will recieve those arguments:
In 4.5.0 and upcoming 5.0.0:
Edit: a similar issue was present in EngineModel.get().